From: Michael Kao <michael.kao@mediatek.com>
To: Zhang Rui <rui.zhang@intel.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
<linux-pm@vger.kernel.org>, <srv_heupstream@mediatek.com>
Cc: Eduardo Valentin <edubezval@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Matthias Brugger <matthias.bgg@gmail.com>, <hsinyi@chromium.org>,
<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-mediatek@lists.infradead.org>,
Michael Kao <michael.kao@mediatek.com>
Subject: [PATCH] [v2] thermal: core: add upper and lower limits to power_actor_set_power
Date: Wed, 7 Oct 2020 10:43:32 +0800 [thread overview]
Message-ID: <20201007024332.30322-1-michael.kao@mediatek.com> (raw)
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
WARNING: multiple messages have this Message-ID (diff)
From: Michael Kao <michael.kao@mediatek.com>
To: Zhang Rui <rui.zhang@intel.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
<linux-pm@vger.kernel.org>, <srv_heupstream@mediatek.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Michael Kao <michael.kao@mediatek.com>,
Eduardo Valentin <edubezval@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
linux-mediatek@lists.infradead.org, hsinyi@chromium.org,
Matthias Brugger <matthias.bgg@gmail.com>,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH] [v2] thermal: core: add upper and lower limits to power_actor_set_power
Date: Wed, 7 Oct 2020 10:43:32 +0800 [thread overview]
Message-ID: <20201007024332.30322-1-michael.kao@mediatek.com> (raw)
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
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
WARNING: multiple messages have this Message-ID (diff)
From: Michael Kao <michael.kao@mediatek.com>
To: Zhang Rui <rui.zhang@intel.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
<linux-pm@vger.kernel.org>, <srv_heupstream@mediatek.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Michael Kao <michael.kao@mediatek.com>,
Eduardo Valentin <edubezval@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
linux-mediatek@lists.infradead.org, hsinyi@chromium.org,
Matthias Brugger <matthias.bgg@gmail.com>,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH] [v2] thermal: core: add upper and lower limits to power_actor_set_power
Date: Wed, 7 Oct 2020 10:43:32 +0800 [thread overview]
Message-ID: <20201007024332.30322-1-michael.kao@mediatek.com> (raw)
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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2020-10-07 2:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-07 2:43 Michael Kao [this message]
2020-10-07 2:43 ` [PATCH] [v2] thermal: core: add upper and lower limits to power_actor_set_power Michael Kao
2020-10-07 2:43 ` Michael Kao
2020-10-07 10:55 ` Lukasz Luba
2020-10-07 10:55 ` Lukasz Luba
2020-10-07 10:55 ` Lukasz Luba
2020-11-24 9:36 ` [thermal: thermal/next] thermal: core: Add " thermal-bot for Michael Kao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201007024332.30322-1-michael.kao@mediatek.com \
--to=michael.kao@mediatek.com \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=edubezval@gmail.com \
--cc=hsinyi@chromium.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=matthias.bgg@gmail.com \
--cc=robh+dt@kernel.org \
--cc=rui.zhang@intel.com \
--cc=srv_heupstream@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.