[PATCH v2 0/1] platform/x86: hp-wmi: fix platform profile issues on generic HP laptops

From: Marco Scardovi

Date: Tue Jun 23 2026 - 12:46:42 EST


Hi Krishna,

Thank you for your review :) Your points were indeed correct so I came
up with another way to fix it.

Here is v2 of the patch to fix platform_profile support on generic HP
laptops. To answer your question the patch has been tested by Milan,
who reported bug 221569. For 220008 I had not any response from TuralTo
unfortunately but the underlying problem was the same AFAICS.

@milan please test this out and let me know like you did before.

Changes in v2:
- Drop active_platform_profile fallback/caching and mutex logic for
generic HP laptops. Propagate WMI query errors directly to userspace
instead of silencing them, as suggested.
- Restructure the probe function to explicitly set platform profile
choices in each path rather than relying on a confusing combination
of early returns and fall-throughs.

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 dynamically probing supported thermal profiles at
boot time by temporarily setting each profile and checking the return
code, then restoring the original profile.

Marco Scardovi (1):
platform/x86: hp-wmi: fix platform profile issues on generic HP
laptops

drivers/platform/x86/hp/hp-wmi.c | 37 ++++++++++++++++++++++++++------
1 file changed, 30 insertions(+), 7 deletions(-)

--
2.54.0