Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a76cb352 authored by Paras Nagda's avatar Paras Nagda Committed by Gerrit - the friendly Code Review server
Browse files

msm: vidc_3x: correct the flags set for bus mode



Currently the flags which are set based on the
property read on bus mode are not correct, as
a result of which the Venus buses are not voted
correctly and are always set to 0.

Initializing the flag based on the above read
will make the Venus buses to vote correctly and no
issue will be seen when the video is suspended
via power key press.

Change-Id: I0675f95267b4fe4a14138cbc4258282f81c52886
Signed-off-by: default avatarParas Nagda <pnagda@codeaurora.org>
parent dda0a79f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -820,6 +820,8 @@ static int msm_vidc_populate_bus(struct device *dev,
			&bus->mode);
	if (!rc && !strcmp(bus->mode, PERF_GOV))
		bus->is_prfm_gov_used = true;
	else
		bus->is_prfm_gov_used = false;

	rc = of_property_read_u32_array(dev->of_node, "qcom,bus-range-kbps",
			range, ARRAY_SIZE(range));
+9 −15
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2012-2016, 2018-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2016, 2018-2021, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -769,22 +769,14 @@ static int __unvote_buses(struct venus_hfi_device *device)
{
	int rc = 0;
	struct bus_info *bus = NULL;
	unsigned long freq = 0, zero = 0;
	unsigned long freq = 0;

	venus_hfi_for_each_bus(device, bus) {
		if (!bus->is_prfm_gov_used) {
			freq = __calc_bw(bus, &device->bus_vote);
			rc = __vote_bandwidth(bus, &freq);
		} else
			rc = __vote_bandwidth(bus, &zero);

			if (rc)
				goto err_unknown_device;
	}

	if (rc)
		dprintk(VIDC_WARN, "Failed to unvote some buses\n");

err_unknown_device:
	return rc;
}
@@ -795,7 +787,7 @@ static int __vote_buses(struct venus_hfi_device *device,
	int rc = 0;
	struct bus_info *bus = NULL;
	struct vidc_bus_vote_data *new_data = NULL;
	unsigned long freq = 0, zero = 0;
	unsigned long freq = 0;

	if (!num_data) {
		dprintk(VIDC_DBG, "No vote data available\n");
@@ -822,8 +814,10 @@ static int __vote_buses(struct venus_hfi_device *device,
		if (!bus->is_prfm_gov_used) {
			freq = __calc_bw(bus, &device->bus_vote);
			rc = __vote_bandwidth(bus, &freq);
		} else
			rc = __vote_bandwidth(bus, &zero);
		} else {
			freq = bus->range[1];
			rc = __vote_bandwidth(bus, &freq);
		}

		if (rc)
			return rc;