From: bugzilla-daemon@kernel.org
To: linux-pm@vger.kernel.org
Subject: [Bug 216189] amd-pstate stops working after S3 suspend
Date: Thu, 30 Jun 2022 08:26:21 +0000 [thread overview]
Message-ID: <bug-216189-137361-XsuNU4FK1J@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-216189-137361@https.bugzilla.kernel.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=216189
Joe (sujinzhou2008@126.com) changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sujinzhou2008@126.com
--- Comment #3 from Joe (sujinzhou2008@126.com) ---
Hello,
The fixed patch has been accepted. It will be updated in 5.19.
Here is the detail
On Thu, Jun 23, 2022 at 9:53 AM Huang Rui <ray.huang@amd.com> wrote:
>
> On Thu, Jun 23, 2022 at 11:15:09AM +0800, Su, Jinzhou (Joe) wrote:
> > When system resumes from S3, the CPPC enable register will be
> > cleared and reset to 0. So sets this bit to enable CPPC interface by
> > writing 1 to this register.
> >
> > Signed-off-by: Jinzhou Su <Jinzhou.Su@amd.com>
>
> Signed-off-by: Jinzhou Su <Jinzhou.Su@amd.com>
> Cc: stable@vger.kernel.org
>
> You can add one line below your commit description to Cc stable
> mailing list. And next time in V2, it's better to use subject-prefix
> optional to mark it as v2 like below:
>
> git format-patch --subject-prefix="PATCH v2" HEAD~
>
> Other looks good for me, patch is
>
> Acked-by: Huang Rui <ray.huang@amd.com>
>
> > ---
> > drivers/cpufreq/amd-pstate.c | 24 ++++++++++++++++++++++++
> > 1 file changed, 24 insertions(+)
> >
> > diff --git a/drivers/cpufreq/amd-pstate.c
> > b/drivers/cpufreq/amd-pstate.c index 7be38bc6a673..9ac75c1cde9c
> > 100644
> > --- a/drivers/cpufreq/amd-pstate.c
> > +++ b/drivers/cpufreq/amd-pstate.c
> > @@ -566,6 +566,28 @@ static int amd_pstate_cpu_exit(struct cpufreq_policy
> *policy)
> > return 0;
> > }
> >
> > +static int amd_pstate_cpu_resume(struct cpufreq_policy *policy) {
> > + int ret;
> > +
> > + ret = amd_pstate_enable(true);
> > + if (ret)
> > + pr_err("failed to enable amd-pstate during resume,
> > + return %d\n", ret);
> > +
> > + return ret;
> > +}
> > +
> > +static int amd_pstate_cpu_suspend(struct cpufreq_policy *policy) {
> > + int ret;
> > +
> > + ret = amd_pstate_enable(false);
> > + if (ret)
> > + pr_err("failed to disable amd-pstate during suspend,
> > + return %d\n", ret);
> > +
> > + return ret;
> > +}
> > +
> > /* Sysfs attributes */
> >
> > /*
> > @@ -636,6 +658,8 @@ static struct cpufreq_driver amd_pstate_driver = {
> > .target = amd_pstate_target,
> > .init = amd_pstate_cpu_init,
> > .exit = amd_pstate_cpu_exit,
> > + .suspend = amd_pstate_cpu_suspend,
> > + .resume = amd_pstate_cpu_resume,
> > .set_boost = amd_pstate_set_boost,
> > .name = "amd-pstate",
> > .attr = amd_pstate_attr,
> > --
Applied with some edits in the subject and changelog, and a CC:stable tag
added, as 5.19-rc material.
Thanks!
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are the assignee for the bug.
next prev parent reply other threads:[~2022-06-30 8:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-29 15:21 [Bug 216189] New: amd-pstate stops working after S3 suspend bugzilla-daemon
2022-06-29 15:34 ` [Bug 216189] " bugzilla-daemon
2022-06-29 15:35 ` bugzilla-daemon
2022-06-30 8:26 ` bugzilla-daemon [this message]
2022-06-30 8:33 ` bugzilla-daemon
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=bug-216189-137361-XsuNU4FK1J@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@kernel.org \
--cc=linux-pm@vger.kernel.org \
/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.