diff options
author | Michael Kao <[email protected]> | 2020-10-07 10:43:32 +0800 |
---|---|---|
committer | Daniel Lezcano <[email protected]> | 2020-10-26 19:46:35 +0100 |
commit | 4ab17ed1318609da5c36cb7e427a1d24e52a7d6f (patch) | |
tree | 2049206eb50789f8266cc985369bab4622ac8523 | |
parent | 3650b228f83adda7e5ee532e2b90429c03f7b9ec (diff) |
thermal: core: Add upper and lower limits to power_actor_set_power
The upper and lower limits of thermal throttle state in the
DT do not apply to the Intelligent Power Allocation (IPA) governor.
Add the clamping for cooling device upper and lower limits in the
power_actor_set_power() used by IPA.
Signed-off-by: Michael Kao <[email protected]>
Reviewed-by: Lukasz Luba <[email protected]>
Tested-by: Lukasz Luba <[email protected]>
Signed-off-by: Daniel Lezcano <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
-rw-r--r-- | drivers/thermal/thermal_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index c6d74bc1c90b..2ea3633b5d66 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -672,7 +672,7 @@ int power_actor_set_power(struct thermal_cooling_device *cdev, if (ret) return ret; - instance->target = state; + instance->target = clamp_val(state, instance->lower, instance->upper); mutex_lock(&cdev->lock); cdev->updated = false; mutex_unlock(&cdev->lock); |