linux-stable/drivers/thermal
Finley Xiao febe56f213 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:32:12 +02:00
..
broadcom thermal: brcmstb_thermal: Do not use DT coefficients 2020-03-05 16:42:22 +01:00
int340x_thermal
qcom
samsung
st
tegra
ti-soc-thermal thermal/drivers/ti-soc-thermal: Avoid dereferencing ERR_PTR 2020-06-25 15:32:54 +02:00
armada_thermal.c
clock_cooling.c
cpu_cooling.c thermal/drivers/cpufreq_cooling: Fix wrong frequency converted from power 2020-07-22 09:32:12 +02:00
da9062-thermal.c
db8500_thermal.c
devfreq_cooling.c
dove_thermal.c
fair_share.c
gov_bang_bang.c
hisi_thermal.c
imx_thermal.c
intel_bxt_pmic_thermal.c
intel_pch_thermal.c
intel_powerclamp.c
intel_quark_dts_thermal.c
intel_soc_dts_iosf.c
intel_soc_dts_iosf.h
intel_soc_dts_thermal.c
Kconfig
kirkwood_thermal.c
Makefile
max77620_thermal.c
mtk_thermal.c Revert "thermal: mediatek: fix register index error" 2020-07-22 09:32:05 +02:00
of-thermal.c
power_allocator.c
qcom-spmi-temp-alarm.c
qoriq_thermal.c
rcar_gen3_thermal.c thermal: rcar_gen3_thermal: fix interrupt type 2020-01-27 14:50:48 +01:00
rcar_thermal.c thermal: rcar_thermal: Prevent hardware access during system suspend 2019-12-01 09:17:00 +01:00
rockchip_thermal.c
spear_thermal.c
step_wise.c
tango_thermal.c
thermal-generic-adc.c
thermal_core.c thermal: Fix deadlock in thermal thermal_zone_device_check 2019-12-13 08:52:50 +01:00
thermal_core.h
thermal_helpers.c
thermal_hwmon.c
thermal_hwmon.h
thermal_sysfs.c
uniphier_thermal.c
user_space.c
x86_pkg_temp_thermal.c
zx2967_thermal.c