aboutsummaryrefslogtreecommitdiff
path: root/drivers/hwmon/pwm-fan.c
diff options
context:
space:
mode:
authorViresh Kumar <[email protected]>2021-02-17 11:18:58 +0530
committerDaniel Lezcano <[email protected]>2021-02-17 18:53:19 +0100
commita51afb13311cd85b2f638c691b2734622277d8f5 (patch)
treebc31c4757f28e409db5bc0f96115f2ab8305a029 /drivers/hwmon/pwm-fan.c
parent74369d041a0a3e9e57de50efd4bd4bc10564e254 (diff)
thermal: cpufreq_cooling: freq_qos_update_request() returns < 0 on error
freq_qos_update_request() returns 1 if the effective constraint value has changed, 0 if the effective constraint value has not changed, or a negative error code on failures. The frequency constraints for CPUs can be set by different parts of the kernel. If the maximum frequency constraint set by other parts of the kernel are set at a lower value than the one corresponding to cooling state 0, then we will never be able to cool down the system as freq_qos_update_request() will keep on returning 0 and we will skip updating cpufreq_state and thermal pressure. Fix that by doing the updates even in the case where freq_qos_update_request() returns 0, as we have effectively set the constraint to a new value even if the consolidated value of the actual constraint is unchanged because of external factors. Cc: v5.7+ <[email protected]> # v5.7+ Reported-by: Thara Gopinath <[email protected]> Fixes: f12e4f66ab6a ("thermal/cpu-cooling: Update thermal pressure in case of a maximum frequency capping") Signed-off-by: Viresh Kumar <[email protected]> Reviewed-by: Lukasz Luba <[email protected]> Tested-by: Lukasz Luba <[email protected]> Reviewed-by: Rafael J. Wysocki <[email protected]> Tested-by: Thara Gopinath<[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Link: https://lore.kernel.org/r/b2b7e84944937390256669df5a48ce5abba0c1ef.1613540713.git.viresh.kumar@linaro.org
Diffstat (limited to 'drivers/hwmon/pwm-fan.c')
0 files changed, 0 insertions, 0 deletions