1
0
Fork 0
alistair23-linux/drivers/thermal
Finley Xiao d3b7bacd11 thermal/drivers/cpufreq_cooling: Fix wrong frequency converted from power
commit 371a3bc79c upstream.

The function cpu_power_to_freq is used to find a frequency and set the
cooling device to consume at most the power to be converted. For example,
if the power to be converted is 80mW, and the em table is as follow.
struct em_cap_state table[] = {
	/* KHz     mW */
	{ 1008000, 36, 0 },
	{ 1200000, 49, 0 },
	{ 1296000, 59, 0 },
	{ 1416000, 72, 0 },
	{ 1512000, 86, 0 },
};
The target frequency should be 1416000KHz, not 1512000KHz.

Fixes: 349d39dc57 ("thermal: cpu_cooling: merge frequency and power tables")
Cc: <stable@vger.kernel.org> # v4.13+
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20200619090825.32747-1-finley.xiao@rock-chips.com
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-22 09:33:16 +02:00
..
broadcom thermal: brcmstb_thermal: Do not use DT coefficients 2020-03-05 16:43:50 +01:00
intel thermal: int3403_thermal: Downgrade error message 2020-07-22 09:33:15 +02:00
qcom drivers: thermal: qcom: tsens: Fix memory leak from qfprom read 2019-08-28 21:05:08 +08:00
samsung treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
st treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
tegra thermal: tegra: Fix a typo 2019-08-28 17:56:45 +08:00
ti-soc-thermal thermal/drivers/ti-soc-thermal: Avoid dereferencing ERR_PTR 2020-06-24 17:50:23 +02:00
Kconfig thermal: db8500: Finalize device tree conversion 2019-09-24 22:54:49 -07:00
Makefile thermal: Introduce Amazon's Annapurna Labs Thermal Driver 2019-05-14 07:00:26 -07:00
armada_thermal.c thermal: armada: Fix -Wshift-negative-value 2019-08-28 16:41:02 +08:00
clock_cooling.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 285 2019-06-05 17:36:37 +02:00
cpu_cooling.c thermal/drivers/cpufreq_cooling: Fix wrong frequency converted from power 2020-07-22 09:33:16 +02:00
da9062-thermal.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
db8500_thermal.c thermal: db8500: Depromote debug print 2020-03-05 16:43:50 +01:00
devfreq_cooling.c
dove_thermal.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
fair_share.c thermal/drivers/core: Use governor table to initialize 2019-06-27 21:22:14 +08:00
gov_bang_bang.c thermal/drivers/core: Use governor table to initialize 2019-06-27 21:22:14 +08:00
hisi_thermal.c
imx_thermal.c thermal/drivers: imx: Fix missing of_node_put() at probe time 2020-07-22 09:32:52 +02:00
kirkwood_thermal.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
max77620_thermal.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 422 2019-06-05 17:37:15 +02:00
mtk_thermal.c Revert "thermal: mediatek: fix register index error" 2020-07-22 09:33:03 +02:00
of-thermal.c of: thermal: Improve print information 2019-05-13 20:35:34 -07:00
power_allocator.c thermal/drivers/core: Use governor table to initialize 2019-06-27 21:22:14 +08:00
qoriq_thermal.c thermal: qoriq: Use __maybe_unused instead of #if CONFIG_PM_SLEEP 2019-08-28 16:33:27 +08:00
rcar_gen3_thermal.c thermal/drivers/rcar_gen3: Fix undefined temperature if negative 2020-07-09 09:37:53 +02:00
rcar_thermal.c thermal: rcar_thermal: update calculation formula for R-Car Gen3 SoCs 2019-05-14 07:00:42 -07:00
rockchip_thermal.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288 2019-06-05 17:36:37 +02:00
spear_thermal.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
step_wise.c thermal/drivers/core: Use governor table to initialize 2019-06-27 21:22:14 +08:00
tango_thermal.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
thermal-generic-adc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
thermal_core.c thermal: Fix deadlock in thermal thermal_zone_device_check 2019-12-13 08:43:21 +01:00
thermal_core.h thermal/drivers/core: Use governor table to initialize 2019-06-27 21:22:14 +08:00
thermal_helpers.c
thermal_hwmon.c thermal_hwmon: Sanitize thermal_zone type 2019-09-24 09:56:08 +08:00
thermal_hwmon.h thermal: hwmon: inline helpers when CONFIG_THERMAL_HWMON is not set 2019-01-02 04:43:00 -08:00
thermal_mmio.c thermal: thermal_mmio: remove some dead code 2019-09-22 13:44:52 -07:00
thermal_sysfs.c
uniphier_thermal.c thermal: uniphier: Convert to SPDX identifier 2019-01-02 04:47:16 -08:00
user_space.c thermal/drivers/core: Use governor table to initialize 2019-06-27 21:22:14 +08:00
zx2967_thermal.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00