platform/x86: hp-wmi: fix power limit failure for Victus 15-fb0xxx (8A3D)
PATCH 1/1 platform/x86: hp-wmi: fix power limit failure for Victus 15-fb0xxx (8A3D)
Victus 15-fb0xxx (8A3D) does not support 0x29 query, Casuing severe CPU power limit after disconnect/connect of charger.
- Fix this regression by restoring user selected profile,
- It matches behaviour written in omen_power_source_event.
Error output:
[ +14.861905] hp_wmi: query 0x29 returned error 0x29 [ +0.000036] hp_wmi: Failed to actualize power limits: 41
Tested-by Sourav Nayak <[email protected]>
Signed-off-by Sourav Nayak <[email protected]>
--- drivers/platform/x86/hp/hp-wmi.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
drivers/platform/x86/hp/hp-wmi.c +19 -0
@@ -2355,6 +2355,25 @@ static int victus_s_powersource_event(struct notifier_block *nb,return NOTIFY_DONE ; } +/* +* For board 8A3D (victus_s_ec), query 0x29 is unsupported and makes +* CPU power limit to 4-6W. Match omen_power_source_event omen/victus behavior: +* if returning to AC and the profile differs from EC, restore the user-selected profile. +*/ +if (hp_wmi_thermal_profile () == &victus_s_ec_thermal_params) { +if (power_supply_is_system_supplied () >0 || + active_platform_profile != actual_profile) +return NOTIFY_DONE ; + + err =platform_profile_victus_s_set_ec (active_platform_profile); +if (err <0 ) { +pr_warn ("Failed to restore platform profile (%d)\n" , err); +return NOTIFY_DONE ; + } + +return NOTIFY_OK ; + } +/* * Switching to battery power source while Performance mode is active * needs manual triggering of CPU power limits. Same goes when switching
base-commit: 5b0764a53235d3c77e1ed674e836e1b3fe1a4b1f
prerequisite-patch-id: 81b94f3910be80ec60f3b82188d4b141ac6c34d7
Signature · 1 line
2.55.0