WSL2-Linux-Kernel/drivers/thermal
Ye Zhang a7c6a643b2 thermal: devfreq_cooling: Fix perf state when calculate dfc res_util
commit a26de34b3c77ae3a969654d94be49e433c947e3b upstream.

The issue occurs when the devfreq cooling device uses the EM power model
and the get_real_power() callback is provided by the driver.

The EM power table is sorted ascending,can't index the table by cooling
device state,so convert cooling state to performance state by
dfc->max_state - dfc->capped_state.

Fixes: 615510fe13 ("thermal: devfreq_cooling: remove old power model and use EM")
Cc: 5.11+ <stable@vger.kernel.org> # 5.11+
Signed-off-by: Ye Zhang <ye.zhang@rock-chips.com>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Lukasz Luba <lukasz.luba@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-10 16:19:37 +02:00
..
broadcom
intel thermal: intel: BXT_PMIC: select REGMAP instead of depending on it 2023-03-11 13:57:32 +01:00
qcom thermal/drivers/tsens: limit num_sensors to 9 for msm8939 2023-03-10 09:39:10 +01:00
samsung
st
tegra thermal/core: Rename 'trips' to 'num_trips' 2023-02-01 08:27:15 +01:00
ti-soc-thermal
Kconfig
Makefile
amlogic_thermal.c
armada_thermal.c
cpufreq_cooling.c
cpuidle_cooling.c
da9062-thermal.c
db8500_thermal.c
devfreq_cooling.c thermal: devfreq_cooling: Fix perf state when calculate dfc res_util 2024-04-10 16:19:37 +02:00
dove_thermal.c
gov_bang_bang.c
gov_fair_share.c thermal: Validate new state in cur_state_store() 2023-02-01 08:27:15 +01:00
gov_power_allocator.c thermal/core: Rename 'trips' to 'num_trips' 2023-02-01 08:27:15 +01:00
gov_step_wise.c
gov_user_space.c
hisi_thermal.c thermal/drivers/hisi: Drop second sensor hi3660 2023-03-10 09:39:18 +01:00
imx8mm_thermal.c thermal/drivers/imx8mm_thermal: Validate temperature range 2022-12-31 13:14:31 +01:00
imx_sc_thermal.c
imx_thermal.c
k3_bandgap.c
khadas_mcu_fan.c
kirkwood_thermal.c
max77620_thermal.c
mtk_thermal.c Revert "thermal/drivers/mediatek: Use devm_of_iomap to avoid resource leak in mtk_thermal_probe" 2023-07-05 18:25:05 +01:00
qoriq_thermal.c
rcar_gen3_thermal.c
rcar_thermal.c
rockchip_thermal.c
spear_thermal.c
sprd_thermal.c
sun8i_thermal.c thermal/drivers/sun8i: Fix some error handling paths in sun8i_ths_probe() 2023-07-23 13:46:46 +02:00
thermal-generic-adc.c
thermal_core.c thermal: core: prevent potential string overflow 2023-11-20 11:08:15 +01:00
thermal_core.h
thermal_helpers.c thermal/core: Rename 'trips' to 'num_trips' 2023-02-01 08:27:15 +01:00
thermal_hwmon.c
thermal_hwmon.h
thermal_mmio.c
thermal_netlink.c thermal/core: Rename 'trips' to 'num_trips' 2023-02-01 08:27:15 +01:00
thermal_netlink.h
thermal_of.c
thermal_sysfs.c thermal: Validate new state in cur_state_store() 2023-02-01 08:27:15 +01:00
uniphier_thermal.c