From: Chanwoo Choi <cwchoi00@gmail.com>
To: aiyengar1990@gmail.com, MyungJoo Ham <myungjoo.ham@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Chanwoo Choi <cw00.choi@samsung.com>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
Boris Brezillon <boris.brezillon@collabora.com>,
Steven Price <steven.price@arm.com>,
Liviu Dudau <liviu.dudau@arm.com>,
Jonas Karlman <jonas@kwiboo.se>,
Dong Aisheng <aisheng.dong@nxp.com>
Subject: Re: [PATCH v3 1/2] PM / devfreq: Resume at the frequency from before suspend
Date: Thu, 26 Nov 2026 22:49:08 +0900 [thread overview]
Message-ID: <b9eba3d4-c3c7-495a-ba45-34f993ccac1c@gmail.com> (raw)
In-Reply-To: <20261119-devfreq-suspend-sync-v3-1-ef19fbf94d83@gmail.com>
On 11/20/2026 6:16 AM, Arun Iyengar via B4 Relay wrote:
> From: Arun Iyengar <aiyengar1990@gmail.com>
>
> Since commit 62453f1ba5d5 ("PM / devfreq: Use more accurate returned
> new_freq as resume_freq"), devfreq_set_target() records the frequency it
> sets as resume_freq, so the suspend transition in
> devfreq_suspend_device() overwrites it with the suspend frequency. The
> device then resumes at its suspend frequency and stays there until the
> governor's next update; with runtime PM (e.g. lima on RK3528) that is
> after every idle period.
>
> Keep the frequency from before the suspend transition as resume_freq.
>
> Fixes: 62453f1ba5d5 ("PM / devfreq: Use more accurate returned new_freq as resume_freq")
> Signed-off-by: Arun Iyengar <aiyengar1990@gmail.com>
> ---
> drivers/devfreq/devfreq.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
> index f25304bca37f..795a01d012ec 100644
> --- a/drivers/devfreq/devfreq.c
> +++ b/drivers/devfreq/devfreq.c
> @@ -1144,6 +1144,7 @@ EXPORT_SYMBOL(devm_devfreq_remove_device);
> */
> int devfreq_suspend_device(struct devfreq *devfreq)
> {
> + unsigned long resume_freq;
> int ret;
>
> if (!devfreq)
> @@ -1161,7 +1162,10 @@ int devfreq_suspend_device(struct devfreq *devfreq)
>
> if (devfreq->suspend_freq) {
> mutex_lock(&devfreq->lock);
> + /* devfreq_set_target() overwrites resume_freq; keep the pre-suspend one */
> + resume_freq = devfreq->previous_freq;
> ret = devfreq_set_target(devfreq, devfreq->suspend_freq, 0);
> + devfreq->resume_freq = resume_freq;
> mutex_unlock(&devfreq->lock);
> if (ret)
> return ret;
>
Looks good to me.
I'll add Cc: stable@vger.kernel.org and wrap the comment line when applying.
Applied it. Thanks.
--
Best Regards,
Chanwoo Choi
Principal Engineer, Samsung Electronics
next prev parent reply other threads:[~2026-11-26 13:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 21:16 [PATCH v3 0/2] PM / devfreq: Do not change the frequency of a suspended device Arun Iyengar via B4 Relay
2026-11-19 21:16 ` [PATCH v3 1/2] PM / devfreq: Resume at the frequency from before suspend Arun Iyengar via B4 Relay
2026-11-26 13:49 ` Chanwoo Choi [this message]
2026-11-19 21:16 ` [PATCH v3 2/2] PM / devfreq: Do not change the frequency of a suspended device Arun Iyengar via B4 Relay
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=b9eba3d4-c3c7-495a-ba45-34f993ccac1c@gmail.com \
--to=cwchoi00@gmail.com \
--cc=aisheng.dong@nxp.com \
--cc=aiyengar1990@gmail.com \
--cc=boris.brezillon@collabora.com \
--cc=chanwoo@kernel.org \
--cc=cw00.choi@samsung.com \
--cc=jonas@kwiboo.se \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=liviu.dudau@arm.com \
--cc=myungjoo.ham@samsung.com \
--cc=steven.price@arm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®