mbox series

[0/6] AMD Pstate Fixes And Enhancements

Message ID cover.1706690577.git.perry.yuan@amd.com (mailing list archive)
Headers show
Series AMD Pstate Fixes And Enhancements | expand

Message

Yuan, Perry Jan. 31, 2024, 8:50 a.m. UTC
The patch series adds some fixes and enhancements to the AMD pstate driver.
It enables CPPC v2 for certain processors in the family 17H, as requested
by TR40 processor users who expect improved performance and lower system
temperature. 

Additionally, it fixes the initialization of nominal_freq for each cpudata
and changes latency and delay values to be read from platform firmware firstly
for more accurate timing. 

A new quirk is also added for legacy processors that lack CPPC capabilities,
which caused the pstate driver to fail loading. 

I would greatly appreciate any feedbacks.

Thank you!


Perry Yuan (6):
  ACPI: CPPC: enable AMD CPPC V2 support for family 17h processors
  cpufreq:amd-pstate: fix the nominal freq value set
  cpufreq:amd-pstate: initialize nominal_freq of each cpudata
  cpufreq:amd-pstate: get pstate transition delay and latency value from
    ACPI tables
  cppc_acpi: print error message if CPPC is unsupported
  cpufreq:amd-pstate: add quirk for the pstate CPPC capabilities missing

 arch/x86/kernel/acpi/cppc.c  |   2 +-
 drivers/acpi/cppc_acpi.c     |   6 +-
 drivers/cpufreq/amd-pstate.c | 112 ++++++++++++++++++++++++++++-------
 include/linux/amd-pstate.h   |   6 ++
 4 files changed, 102 insertions(+), 24 deletions(-)

Comments

Tor Vic Jan. 31, 2024, 11:36 a.m. UTC | #1
On 1/31/24 09:50, Perry Yuan wrote:
> The patch series adds some fixes and enhancements to the AMD pstate driver.
> It enables CPPC v2 for certain processors in the family 17H, as requested
> by TR40 processor users who expect improved performance and lower system
> temperature.
> 
> Additionally, it fixes the initialization of nominal_freq for each cpudata
> and changes latency and delay values to be read from platform firmware firstly
> for more accurate timing.
> 
> A new quirk is also added for legacy processors that lack CPPC capabilities,
> which caused the pstate driver to fail loading.
> 
> I would greatly appreciate any feedbacks.
> 

Hi Perry,

Which tree or patchset is this based on?
It doesn't apply cleanly onto either 6.7 or 6.8.

First I had to revert [1], then apply [2] before applying this patchset 
and finally reapply [1].
I did not apply the "prefcore" patchset which I keep in a separate branch.

Is this correct or did I mess up something with my branches?

---
[1] 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v6.8-rc2&id=febab20caebac959fdc3d7520bc52de8b1184455

[2] 
https://lore.kernel.org/linux-pm/cover.1706255676.git.perry.yuan@amd.com/

Cheers,
Tor Vic

> Thank you!
> 
> 
> Perry Yuan (6):
>    ACPI: CPPC: enable AMD CPPC V2 support for family 17h processors
>    cpufreq:amd-pstate: fix the nominal freq value set
>    cpufreq:amd-pstate: initialize nominal_freq of each cpudata
>    cpufreq:amd-pstate: get pstate transition delay and latency value from
>      ACPI tables
>    cppc_acpi: print error message if CPPC is unsupported
>    cpufreq:amd-pstate: add quirk for the pstate CPPC capabilities missing
> 
>   arch/x86/kernel/acpi/cppc.c  |   2 +-
>   drivers/acpi/cppc_acpi.c     |   6 +-
>   drivers/cpufreq/amd-pstate.c | 112 ++++++++++++++++++++++++++++-------
>   include/linux/amd-pstate.h   |   6 ++
>   4 files changed, 102 insertions(+), 24 deletions(-)
>
Yuan, Perry Feb. 2, 2024, 9:12 a.m. UTC | #2
[AMD Official Use Only - General]

Hi Vic

> -----Original Message-----
> From: Tor Vic <torvic9@mailbox.org>
> Sent: Wednesday, January 31, 2024 7:37 PM
> To: Yuan, Perry <Perry.Yuan@amd.com>; rafael.j.wysocki@intel.com; Limonciello,
> Mario <Mario.Limonciello@amd.com>; viresh.kumar@linaro.org; Huang, Ray
> <Ray.Huang@amd.com>; Shenoy, Gautham Ranjal
> <gautham.shenoy@amd.com>; Petkov, Borislav <Borislav.Petkov@amd.com>
> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Huang, Shimmer
> <Shimmer.Huang@amd.com>; Du, Xiaojian <Xiaojian.Du@amd.com>; Meng, Li
> (Jassmine) <Li.Meng@amd.com>; linux-pm@vger.kernel.org; linux-
> kernel@vger.kernel.org
> Subject: Re: [PATCH 0/6] AMD Pstate Fixes And Enhancements
>
>
>
> On 1/31/24 09:50, Perry Yuan wrote:
> > The patch series adds some fixes and enhancements to the AMD pstate driver.
> > It enables CPPC v2 for certain processors in the family 17H, as
> > requested by TR40 processor users who expect improved performance and
> > lower system temperature.
> >
> > Additionally, it fixes the initialization of nominal_freq for each
> > cpudata and changes latency and delay values to be read from platform
> > firmware firstly for more accurate timing.
> >
> > A new quirk is also added for legacy processors that lack CPPC
> > capabilities, which caused the pstate driver to fail loading.
> >
> > I would greatly appreciate any feedbacks.
> >
>
> Hi Perry,
>
> Which tree or patchset is this based on?
> It doesn't apply cleanly onto either 6.7 or 6.8.
>
> First I had to revert [1], then apply [2] before applying this patchset and finally
> reapply [1].
> I did not apply the "prefcore" patchset which I keep in a separate branch.
>
> Is this correct or did I mess up something with my branches?


Hi Tor,

I have rebased the series to Linux-pm 6.8 rc2, you can pull the Linux-pm/bleeding-edge and apply the patches on top of that.
The part 1 prefer core patches are already merged into Linux-pm tree, so you can just merge this series
Here is the V2 https://lore.kernel.org/lkml/cover.1706863981.git.perry.yuan@amd.com/


git clone https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
git checkout bleeding-edge

Perry.

>
> ---
> [1]
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v6.
> 8-rc2&id=febab20caebac959fdc3d7520bc52de8b1184455
>
> [2]
> https://lore.kernel.org/linux-pm/cover.1706255676.git.perry.yuan@amd.com/
>
> Cheers,
> Tor Vic
>
> > Thank you!
> >
> >
> > Perry Yuan (6):
> >    ACPI: CPPC: enable AMD CPPC V2 support for family 17h processors
> >    cpufreq:amd-pstate: fix the nominal freq value set
> >    cpufreq:amd-pstate: initialize nominal_freq of each cpudata
> >    cpufreq:amd-pstate: get pstate transition delay and latency value from
> >      ACPI tables
> >    cppc_acpi: print error message if CPPC is unsupported
> >    cpufreq:amd-pstate: add quirk for the pstate CPPC capabilities
> > missing
> >
> >   arch/x86/kernel/acpi/cppc.c  |   2 +-
> >   drivers/acpi/cppc_acpi.c     |   6 +-
> >   drivers/cpufreq/amd-pstate.c | 112 ++++++++++++++++++++++++++++-------
> >   include/linux/amd-pstate.h   |   6 ++
> >   4 files changed, 102 insertions(+), 24 deletions(-)
> >