* [PATCH] [v2] thermal: core: add upper and lower limits to power_actor_set_power
@ 2020-10-07 2:43 Michael Kao
2020-10-07 10:55 ` Lukasz Luba
2020-11-24 9:36 ` [thermal: thermal/next] thermal: core: Add " thermal-bot for Michael Kao
0 siblings, 2 replies; 3+ messages in thread
From: Michael Kao @ 2020-10-07 2:43 UTC (permalink / raw)
To: Zhang Rui, Daniel Lezcano, linux-pm, srv_heupstream
Cc: Eduardo Valentin, Rob Herring, Mark Rutland, Matthias Brugger,
hsinyi, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Michael Kao
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 <michael.kao@mediatek.com>
---
drivers/thermal/thermal_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 72bf159bcecc..a260e4a575f3 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -674,7 +674,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);
--
2.18.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] [v2] thermal: core: add upper and lower limits to power_actor_set_power
2020-10-07 2:43 [PATCH] [v2] thermal: core: add upper and lower limits to power_actor_set_power Michael Kao
@ 2020-10-07 10:55 ` Lukasz Luba
2020-11-24 9:36 ` [thermal: thermal/next] thermal: core: Add " thermal-bot for Michael Kao
1 sibling, 0 replies; 3+ messages in thread
From: Lukasz Luba @ 2020-10-07 10:55 UTC (permalink / raw)
To: Michael Kao, Zhang Rui, Daniel Lezcano, linux-pm, srv_heupstream
Cc: Eduardo Valentin, Rob Herring, Mark Rutland, Matthias Brugger,
hsinyi, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek
On 10/7/20 3:43 AM, Michael Kao wrote:
> 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 <michael.kao@mediatek.com>
> ---
> drivers/thermal/thermal_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
> index 72bf159bcecc..a260e4a575f3 100644
> --- a/drivers/thermal/thermal_core.c
> +++ b/drivers/thermal/thermal_core.c
> @@ -674,7 +674,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);
>
Please check the patch with scripts/checkpatch.pl before sending.
It's again base64 encoded, I was able to apply it on my end with
--ignore-whitespace, but still some odd char is there.
If Daniel is OK to fix it when applying to the thermal branch, then:
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Tested-by: Lukasz Luba <lukasz.luba@arm.com>
I would send a few patches on top of this one, to fully support the
upper and lower limits in IPA.
Regards,
Lukasz
^ permalink raw reply [flat|nested] 3+ messages in thread
* [thermal: thermal/next] thermal: core: Add upper and lower limits to power_actor_set_power
2020-10-07 2:43 [PATCH] [v2] thermal: core: add upper and lower limits to power_actor_set_power Michael Kao
2020-10-07 10:55 ` Lukasz Luba
@ 2020-11-24 9:36 ` thermal-bot for Michael Kao
1 sibling, 0 replies; 3+ messages in thread
From: thermal-bot for Michael Kao @ 2020-11-24 9:36 UTC (permalink / raw)
To: linux-pm; +Cc: Michael Kao, Lukasz Luba, Daniel Lezcano, rui.zhang, amitk
The following commit has been merged into the thermal/next branch of thermal:
Commit-ID: 4ab17ed1318609da5c36cb7e427a1d24e52a7d6f
Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//4ab17ed1318609da5c36cb7e427a1d24e52a7d6f
Author: Michael Kao <michael.kao@mediatek.com>
AuthorDate: Wed, 07 Oct 2020 10:43:32 +08:00
Committer: Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Mon, 26 Oct 2020 19:46:35 +01:00
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 <michael.kao@mediatek.com>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Tested-by: Lukasz Luba <lukasz.luba@arm.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20201007024332.30322-1-michael.kao@mediatek.com
---
drivers/thermal/thermal_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index c6d74bc..2ea3633 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);
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-11-24 9:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-07 2:43 [PATCH] [v2] thermal: core: add upper and lower limits to power_actor_set_power Michael Kao
2020-10-07 10:55 ` Lukasz Luba
2020-11-24 9:36 ` [thermal: thermal/next] thermal: core: Add " thermal-bot for Michael Kao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).