[PATCH 0/1] platform/x86: hp-wmi: fix platform profile issues on generic HP laptops
Marco Scardovi <[email protected]>
| Newsgroups | dev.linux.lists.regressions,org.kernel.vger.linux-kernel,org.kernel.vger.platform-driver-x86 |
|---|---|
| Message-ID | <[email protected]> |
Hi everyone, I was looking for [1] and come with a quick fix for it. Please review it and let me know if you have any questions/suggestions. TL;DR: The driver was blindly registering all 4 profiles (quiet, cool, balanced, performance) without checking which ones were actually supported by the BIOS. This patch fixes a platform_profile regression on generic (non-Omen/non-Victus) HP laptops, where switching or querying power profiles fails with the error: "platform_profile: Failed to get profile for handler hp-wmi" We resolve this by: 1. Dynamically probing supported thermal profiles at boot time. 2. Initializing and updating a cached active_platform_profile. 3. Falling back to the cached profile if the BIOS query fails or returns an unmapped value. This has been verified to build cleanly and resolves the reported Bugzilla issues 221569 and 220008. [1] https://lore.kernel.org/platform-driver-x86/[email protected]/ Marco Scardovi (1): platform/x86: hp-wmi: fix platform profile issues on generic HP laptops drivers/platform/x86/hp/hp-wmi.c | 53 +++++++++++++++++++++++++++++--- 1 file changed, 48 insertions(+), 5 deletions(-) -- 2.54.0