[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJZ5v0jdy+L-2+WH8sOVdM4WrUek5atqUohqj0MJRzwHi2w9Qw@mail.gmail.com>
Date: Wed, 29 Nov 2023 22:06:31 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Huang Rui <ray.huang@....com>, "Jain, Ayush" <ayush.jain3@....com>
Cc: "rafael@...nel.org" <rafael@...nel.org>,
"viresh.kumar@...aro.org" <viresh.kumar@...aro.org>,
"Yuan, Perry" <Perry.Yuan@....com>,
"Karny, Wyes" <Wyes.Karny@....com>,
"Limonciello, Mario" <Mario.Limonciello@....com>,
"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RESEND PATCH] amd-pstate: Only print supported epp values for
performance governor
On Fri, Nov 3, 2023 at 11:00 AM Huang Rui <ray.huang@....com> wrote:
>
> On Fri, Nov 03, 2023 at 05:48:15PM +0800, Jain, Ayush wrote:
> > show_energy_performance_available_preferences() to show only supported
> > values which is performance in performance governor policy.
> >
> > -------Before--------
> > $ cat /sys/devices/system/cpu/cpu1/cpufreq/scaling_driver
> > amd-pstate-epp
> > $ cat /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
> > performance
> > $ cat /sys/devices/system/cpu/cpu1/cpufreq/energy_performance_preference
> > performance
> > $ cat /sys/devices/system/cpu/cpu1/cpufreq/energy_performance_available_preferences
> > default performance balance_performance balance_power power
> >
> > -------After--------
> > $ cat /sys/devices/system/cpu/cpu1/cpufreq/scaling_driver
> > amd-pstate-epp
> > $ cat /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
> > performance
> > $ cat /sys/devices/system/cpu/cpu1/cpufreq/energy_performance_preference
> > performance
> > $ cat /sys/devices/system/cpu/cpu1/cpufreq/energy_performance_available_preferences
> > performance
> >
> > Fixes: ffa5096a7c33 ("cpufreq: amd-pstate: implement Pstate EPP support for the AMD processors")
> >
> > Suggested-by: Wyes Karny <wyes.karny@....com>
> > Signed-off-by: Ayush Jain <ayush.jain3@....com>
> > Reviewed-by: Wyes Karny <wyes.karny@....com>
>
> Nice catch, thanks for the fix.
>
> Acked-by: Huang Rui <ray.huang@....com>
Applied as 6.7-rc material, thanks!
> >
> > ---
> > drivers/cpufreq/amd-pstate.c | 7 ++++++-
> > 1 file changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
> > index 9a1e194d5cf8..e6c5a57662e4 100644
> > --- a/drivers/cpufreq/amd-pstate.c
> > +++ b/drivers/cpufreq/amd-pstate.c
> > @@ -850,11 +850,16 @@ static ssize_t show_energy_performance_available_preferences(
> > {
> > int i = 0;
> > int offset = 0;
> > + struct amd_cpudata *cpudata = policy->driver_data;
> > +
> > + if (cpudata->policy == CPUFREQ_POLICY_PERFORMANCE)
> > + return sysfs_emit_at(buf, offset, "%s\n",
> > + energy_perf_strings[EPP_INDEX_PERFORMANCE]);
> >
> > while (energy_perf_strings[i] != NULL)
> > offset += sysfs_emit_at(buf, offset, "%s ", energy_perf_strings[i++]);
> >
> > - sysfs_emit_at(buf, offset, "\n");
> > + offset += sysfs_emit_at(buf, offset, "\n");
> >
> > return offset;
> > }
> > --
> > 2.34.1
> >
Powered by blists - more mailing lists