Merge "msm: vidc_3x: correct the flags set for bus mode"
This commit is contained in:
commit
ed3e23c18b
2 changed files with 12 additions and 16 deletions
|
@ -1,6 +1,6 @@
|
|||
// 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));
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// 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)
|
||||
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;
|
||||
|
|
Loading…
Add table
Reference in a new issue