platform/x86: hp-wmi: fix platform profile issues on generic HP laptops
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest1 patch 3 repliesIn review
- v11 patch 2 repliesSuperseded
Changes in v2 from the cover letter
- 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.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | platform/x86: hp-wmi: fix platform profile issues on generic HP laptopsdrivers/ | +30 | 3 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/1] platform/x86: hp-wmi: fix platform profile issues on generic HP laptops
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(-)
Signature · 1 line
2.54.0