Bug 215177

Summary: Stop exporting platform_profile interface for Lenovo T14/P14s Gen2 AMD
Product: Drivers Reporter: bjoern.daase
Component: Platform_x86Assignee: Mark Pearson (mpearson-lenovo)
Status: RESOLVED CODE_FIX    
Severity: normal CC: bugzilla, mario.limonciello, mpearson-lenovo
Priority: P1    
Hardware: AMD   
OS: Linux   
Kernel Version: 5.15.5 Subsystem:
Regression: No Bisected commit-id:

Description bjoern.daase 2021-11-30 16:20:48 UTC
The T14/P14s Gen2 AMD (and maybe more?) have a completely broken platform profile implementation. While advertising three profiles, they do not change anything. See https://forums.lenovo.com/t5/Other-Linux-Discussions/T14-AMD-subpar-CPU-performance/m-p/5089829?page=1#5386521 for details.

As some user space software (e.g. platform-profiles-daemon) expects them to work correctly when they are available, they should not be exported for broken devices.

Therefore, I suggest to stop exporting a platform_profile interface for the Lenovo T14/P14s Gen2 AMD.
Comment 1 Mario Limonciello (AMD) 2021-11-30 21:16:25 UTC
It's fortunate that it's a noop right now and not causing a performance degradation.   Presumably these systems DYTC interface *does* work on Windows though, and with the modified calls right?

I suppose there are two short term ways to approach this:
1) Quirk thinkpad_acpi to these systems/ broken BIOS versions to disable platform profiles.  This assumes it will be fixed in a future BIOS version.
2) Quirk thinkpad_acpi to use the corrected argument mapping on these systems, mentioned in that linked issue.

IMO between those two options the second sounds better.

In the longer term though I think the discrepancy of expectations needs to be fixed in thinkpad_acpi.
Comment 2 bjoern.daase 2021-11-30 22:25:22 UTC
That's indeed the better option. 
I just wasn't sure there is anyone who has the knowledge to fix this who also wants to fix this, as this definitely sounds more complex than simply disabling them.
Comment 3 Mark Pearson 2021-12-01 03:16:28 UTC
Just to note here, as is stated in the Lenovo forum thread where this was originally raised, I am looking into this with the AMD platforms FW team to see if we can add support.
I'll update once I have a better understanding of the best way to solve it.
Comment 4 Mario Limonciello (AMD) 2022-07-07 19:44:54 UTC
This has been fixed in 5.18 and later:
https://github.com/torvalds/linux/commit/e1c21608e3cfc4b44ecdf04e12986b6564667095