Re: [PATCH 1/6] platform/x86: msi-wmi-platform: Move guard out of switch in platform_write()
From: Derek John Clark
Date: Thu Dec 03 2026 - 21:04:44 EST
On Mon, Oct 26, 2026 at 9:44 AM Antheas Kapenekakis <lkml@xxxxxxxxxxx> wrote:
>
> <snip>
> > > SimpleDeckyTDP uses a combination of RyzenAdj for AMD and RAPL for
> > > Intel. When set to 7W, users report 25W power consumption when using
> > > the kernel driver and 15W when using simpledeckytdp on A8. 15W is the
> > > correct value for a 7W envelope on an X840u APU.
> > >
> > > STAPM should not be required to use or deviate from STT. Both of them
> > > should have equivalent behavior and match ryzenadj as the underlying
> > > DPTC hooks are the same, ryzenadj just accesses the mailbox directly.
> > > Using STAPM is a workaround for buggy vendor firmware that does not
> > > control boost values correctly (SPPT/FPPT) and is what the first
> > > generation Lenovo Legion Go did as well before they fixed it.
> > >
> > > STAPM as a workaround works because it uses timers to control boost
> > > values, so they decay after 2-3 minutes to the steady state TDP set by
> > > the firmware. STT boosts for as long as the device thermal envelope
> > > allows. STAPM is deprecated by AMD, only STT should be used going
> > > forward. +CC Mario
> >
> > It's up to the OEM to decide whether they have programmed their firmware
> > to to use STT or STAPM. They should not be used at the same time.
>
> On BIOS configuration, not on runtime! The patches here based on RE
> configure STAPM on custom mode on demand. I did not even know this was
> possible.
Antheas,
The DLL is a bit opaque, but from my reading of it the expectation for
1T8K is that STAPM (They call it AMDSTAMP) will be off for all custom
writing. That is what my A8 patch reflects in this sub-series. When
setPowerLimitAMD is called it checks Should_ResetAMDSTAMP, and if true
it sets Is_On to false and clears the bool. This is human readable in
ILSpy on the API_UserScenario DLL that comes with m center if you want
to check my understanding. Another read on it would be good to clear
this up.
Thanks,
Derek
> The purpose is to make the "custom slider" behave. Lenovo did the same
> thing on the original Legion Go because they were not setting boost
> values, and STAPM decays to the correct value eventually. Should we
> bake this in the driver?
>
> > If their BIOS/EC is using one and reverse engineered software is using
> > the other, you will expect problems.
>
> Correctly implemented ACPI should 1-1 match both modes, so we do not
> care what the manufacturer did. Caring means their boost values are
> not being properly set.
>
> Antheas
>
> > >
> > > This points to a BIOS firmware issue. You should consider getting in
> > > touch with your MSI contact for feedback and to plan a fix. I do not
> > > have an MSI contact. And yes, I am not happy my users have to rely on
> > > third party unvetted plugins for basic power controls.
> > >
>