platform/x86: hp-wmi: fix platform profile values for Victus 15-fb0xxx (8A3D)
PATCH 1/1 platform/x86: hp-wmi: fix platform profile values for Victus 15-fb0xxx (8A3D)
Currently Victus 15-fb0xxx (8A3D) takes victus_s_thermal_params, which causes it to register as incorrect EC layout while cold boot.
- On other hand windows Omen Gaming Hub registers EC offset as 0x95,
- which is set in driver as HP_OMEN_EC_THERMAL_PROFILE_OFFSET.
- So, address it by adding victus_s_ec_thermal_params.
- Also perfcontrol modes as performance (0x1), default (0x0), quiet (0x3) registers. So, add support for quiet mode.
Also, hp_wmi_fan_speed_max_reset() caused fans to freeze during loads at 0RPM, introduce a 'if' statement to resolve it by calling hp_wmi_fan_speed_max_set(0), and passing platform active again to reactive curves. Test data:
auto/max:
hp-isa-0000
Adapter: ISA adapter fan1: 5400 RPM fan2: 5200 RPM
mannual[255]:
hp-isa-0000
Adapter: ISA adapter fan1: 5800 RPM fan2: 5800 RPM
--- drivers/platform/x86/hp/hp-wmi.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-)
drivers/platform/x86/hp/hp-wmi.c +28 -2
@@ -121,6 +121,13 @@ static const struct thermal_profile_params victus_s_thermal_params = { .ec_tp_offset = HP_EC_OFFSET_UNKNOWN, }; +static const struct thermal_profile_params victus_s_ec_thermal_params = { + .performance =HP_VICTUS_S_THERMAL_PROFILE_PERFORMANCE , + .balanced =HP_VICTUS_S_THERMAL_PROFILE_DEFAULT , + .low_power =HP_VICTUS_S_THERMAL_PROFILE_DEFAULT , + .ec_tp_offset =HP_OMEN_EC_THERMAL_PROFILE_OFFSET , +}; +static const struct thermal_profile_params omen_v1_thermal_params = { .performance =HP_OMEN_V1_THERMAL_PROFILE_PERFORMANCE , .balanced =HP_OMEN_V1_THERMAL_PROFILE_DEFAULT ,
@@ -164,6 +171,11 @@ static const struct hp_wmi_board_params victus_s_board_params = { .fan_profile = &victus_s_fan_profile_params, }; +static const struct hp_wmi_board_params victus_s_ec_board_params = { + .thermal_profile = &victus_s_ec_thermal_params, + .fan_profile = &victus_s_fan_profile_params, +}; +static const struct hp_wmi_board_params omen_v1_board_params = { .thermal_profile = &omen_v1_thermal_params, .fan_profile = &victus_s_fan_profile_params,
@@ -245,7 +257,7 @@ static const struct dmi_system_id hp_wmi_feature_boards[] __initconst = { }, { .matches = { DMI_MATCH(DMI_BOARD_NAME, "8A3D") }, - .driver_data = (void *)&victus_s_board_params, + .driver_data = (void *)&victus_s_ec_board_params, }, { .matches = { DMI_MATCH(DMI_BOARD_NAME, "8A44") },
@@ -2121,10 +2133,14 @@ static int platform_profile_victus_s_get_ec(enum platform_profile_option *profil* but logically it should have tp == 0x30 || tp == 0x31, as * corrected by the Omen Gaming Hub on windows. Hence accept both * of these values. +* Since boards like 8A3D write 0x3 to EC offset 0x95 to +* engage quiet mode. Map this to PLATFORM_PROFILE_LOW_POWER. */ if (tp == victus_s_thermal_params.performance || tp == omen_v1_thermal_params.performance) { *profile =PLATFORM_PROFILE_PERFORMANCE ; + }else if (tp ==HP_VICTUS_THERMAL_PROFILE_QUIET ) { + *profile =PLATFORM_PROFILE_LOW_POWER ; }else if (tp == victus_s_thermal_params.balanced || tp == omen_v1_thermal_params.balanced) {/*
@@ -2657,7 +2673,17 @@ static int hp_wmi_apply_fan_settings(struct hp_wmi_hwmon_priv *priv) secs_to_jiffies(KEEP_ALIVE_DELAY_SECS));return 0 ;case PWM_MODE_AUTO : -if (hp_wmi_fan_control_supported ()) { +/* +* Victus models like 8A3D, calling hp_wmi_fan_speed_max_reset() +* freezes fans at 0 RPM under load. Instead, disable max fans and re-apply +* the active platform profile, so the EC firmware thermal curves regain control. +*/ +if (hp_wmi_thermal_profile () == &victus_s_ec_thermal_params) { + ret =hp_wmi_fan_speed_max_set (0 ); +if (ret <0 ) +return ret; + ret =platform_profile_victus_s_set_ec (active_platform_profile); + }else if (hp_wmi_fan_control_supported ()) { ret =hp_wmi_get_fan_count_userdefine_trigger ();if (ret <0 )return ret;
base-commit: 5b0764a53235d3c77e1ed674e836e1b3fe1a4b1f
Signature · 1 line
2.55.0
PATCH v2 1/1 platform/x86: hp-wmi: fix platform profile values for Victus 15-fb0xxx (8A3D)
Currently Victus 15-fb0xxx (8A3D) takes victus_s_thermal_params, which causes it to register as incorrect EC layout while cold boot.
- On other hand windows Omen Gaming Hub registers EC offset as 0x95,
- which is set in driver as HP_OMEN_EC_THERMAL_PROFILE_OFFSET.
- So, address it by adding victus_s_ec_thermal_params.
- Also perfcontrol modes as performance (0x1), default (0x0), quiet (0x3) registers. So, add support for quiet mode.
Also, hp_wmi_fan_speed_max_reset() caused fans to freeze during loads at 0RPM, introduce a 'if' statement to resolve it by calling hp_wmi_fan_speed_max_set(0), and passing platform active again to reactive curves. Test data:
auto/max:
hp-isa-0000
Adapter: ISA adapter fan1: 5400 RPM fan2: 5200 RPM
mannual[255]:
hp-isa-0000
Adapter: ISA adapter fan1: 5800 RPM fan2: 5800 RPM
--- drivers/platform/x86/hp/hp-wmi.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-)
drivers/platform/x86/hp/hp-wmi.c +28 -2
@@ -121,6 +121,13 @@ static const struct thermal_profile_params victus_s_thermal_params = { .ec_tp_offset = HP_EC_OFFSET_UNKNOWN, }; +static const struct thermal_profile_params victus_s_ec_thermal_params = { + .performance =HP_VICTUS_THERMAL_PROFILE_PERFORMANCE , + .balanced =HP_VICTUS_THERMAL_PROFILE_DEFAULT , + .low_power =HP_VICTUS_THERMAL_PROFILE_QUIET , + .ec_tp_offset =HP_OMEN_EC_THERMAL_PROFILE_OFFSET , +}; +static const struct thermal_profile_params omen_v1_thermal_params = { .performance =HP_OMEN_V1_THERMAL_PROFILE_PERFORMANCE , .balanced =HP_OMEN_V1_THERMAL_PROFILE_DEFAULT ,
@@ -164,6 +171,11 @@ static const struct hp_wmi_board_params victus_s_board_params = { .fan_profile = &victus_s_fan_profile_params, }; +static const struct hp_wmi_board_params victus_s_ec_board_params = { + .thermal_profile = &victus_s_ec_thermal_params, + .fan_profile = &victus_s_fan_profile_params, +}; +static const struct hp_wmi_board_params omen_v1_board_params = { .thermal_profile = &omen_v1_thermal_params, .fan_profile = &victus_s_fan_profile_params,
@@ -245,7 +257,7 @@ static const struct dmi_system_id hp_wmi_feature_boards[] __initconst = { }, { .matches = { DMI_MATCH(DMI_BOARD_NAME, "8A3D") }, - .driver_data = (void *)&victus_s_board_params, + .driver_data = (void *)&victus_s_ec_board_params, }, { .matches = { DMI_MATCH(DMI_BOARD_NAME, "8A44") },
@@ -2121,10 +2133,14 @@ static int platform_profile_victus_s_get_ec(enum platform_profile_option *profil* but logically it should have tp == 0x30 || tp == 0x31, as * corrected by the Omen Gaming Hub on windows. Hence accept both * of these values. +* Since boards like 8A3D write 0x3 to EC offset 0x95 to +* engage quiet mode. Map this to PLATFORM_PROFILE_LOW_POWER. */ if (tp == victus_s_thermal_params.performance || tp == omen_v1_thermal_params.performance) { *profile =PLATFORM_PROFILE_PERFORMANCE ; + }else if (tp == victus_s_ec_thermal_params.low_power) { + *profile =PLATFORM_PROFILE_LOW_POWER ; }else if (tp == victus_s_thermal_params.balanced || tp == omen_v1_thermal_params.balanced) {/*
@@ -2657,7 +2673,17 @@ static int hp_wmi_apply_fan_settings(struct hp_wmi_hwmon_priv *priv) secs_to_jiffies(KEEP_ALIVE_DELAY_SECS));return 0 ;case PWM_MODE_AUTO : -if (hp_wmi_fan_control_supported ()) { +/* +* Victus models like 8A3D, calling hp_wmi_fan_speed_max_reset() +* freezes fans at 0 RPM under load. Instead, disable max fans and re-apply +* the active platform profile, so the EC firmware thermal curves regain control. +*/ +if (hp_wmi_thermal_profile () == &victus_s_ec_thermal_params) { + ret =hp_wmi_fan_speed_max_set (0 ); +if (ret <0 ) +return ret; + ret =platform_profile_victus_s_set_ec (active_platform_profile); + }else if (hp_wmi_fan_control_supported ()) { ret =hp_wmi_get_fan_count_userdefine_trigger ();if (ret <0 )return ret;
base-commit: 5b0764a53235d3c77e1ed674e836e1b3fe1a4b1f
Signature · 1 line
2.55.0
Ilpo Järvinen
maintainerQuoted 87 lines · Sourav Nayak
Currently Victus 15-fb0xxx (8A3D) takes
victus_s_thermal_params, which causes it to register as incorrect EC layout while cold boot.- On other hand windows Omen Gaming Hub registers EC offset as
0x95,
- which is set in driver asHP_OMEN_EC_THERMAL_PROFILE_OFFSET.
- So, address it by addingvictus_s_ec_thermal_params.- Also perfcontrol modes as performance (
0x1), default (0x0), quiet (0x3) registers. So, add support for quiet mode.Also,
hp_wmi_fan_speed_max_reset()caused fans to freeze during loads at 0RPM, introduce a 'if' statement to resolve it by callinghp_wmi_fan_speed_max_set(0), and passing platform active again to reactive curves. Test data:auto/max:
hp-isa-0000Adapter: ISA adapter fan1: 5400 RPM fan2: 5200 RPMmannual[255]:
hp-isa-0000Adapter: ISA adapter fan1: 5800 RPM fan2: 5800 RPMTested-by Sourav Nayak <[email protected]>Signed-off-by Sourav Nayak <[email protected]>--- drivers/platform/x86/hp/hp-wmi.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-)drivers/platform/x86/hp/hp-wmi.c +17
-1@@ -121,6 +121,13 @@ static const struct thermal_profile_params victus_s_thermal_params = { .ec_tp_offset = HP_EC_OFFSET_UNKNOWN, }; +static const struct thermal_profile_params victus_s_ec_thermal_params = { + .performance =HP_VICTUS_THERMAL_PROFILE_PERFORMANCE , + .balanced =HP_VICTUS_THERMAL_PROFILE_DEFAULT , + .low_power =HP_VICTUS_THERMAL_PROFILE_QUIET , + .ec_tp_offset =HP_OMEN_EC_THERMAL_PROFILE_OFFSET , +}; +static const struct thermal_profile_params omen_v1_thermal_params = { .performance =HP_OMEN_V1_THERMAL_PROFILE_PERFORMANCE , .balanced =HP_OMEN_V1_THERMAL_PROFILE_DEFAULT ,@@ -164,6 +171,11 @@ static const struct hp_wmi_board_params victus_s_board_params = { .fan_profile = &victus_s_fan_profile_params, }; +static const struct hp_wmi_board_params victus_s_ec_board_params = { + .thermal_profile = &victus_s_ec_thermal_params, + .fan_profile = &victus_s_fan_profile_params, +}; +static const struct hp_wmi_board_params omen_v1_board_params = { .thermal_profile = &omen_v1_thermal_params, .fan_profile = &victus_s_fan_profile_params,@@ -245,7 +257,7 @@ static const struct dmi_system_id hp_wmi_feature_boards[] __initconst = { }, { .matches = { DMI_MATCH(DMI_BOARD_NAME, "8A3D") }, - .driver_data = (void *)&victus_s_board_params, + .driver_data = (void *)&victus_s_ec_board_params, }, { .matches = { DMI_MATCH(DMI_BOARD_NAME, "8A44") },@@ -2121,10 +2133,14 @@ static int platform_profile_victus_s_get_ec(enum platform_profile_option *profil* but logically it should have tp == 0x30 || tp == 0x31, as * corrected by the Omen Gaming Hub on windows. Hence accept both * of these values. +* Since boards like 8A3D write 0x3 to EC offset 0x95 to +* engage quiet mode. Map this to PLATFORM_PROFILE_LOW_POWER. */ if (tp == victus_s_thermal_params.performance || tp == omen_v1_thermal_params.performance) { *profile =PLATFORM_PROFILE_PERFORMANCE ; + }else if (tp == victus_s_ec_thermal_params.low_power) { + *profile =PLATFORM_PROFILE_LOW_POWER ; }else if (tp == victus_s_thermal_params.balanced || tp == omen_v1_thermal_params.balanced) {/*
drivers/platform/x86/hp/hp-wmi.c static int hp_wmi_apply_fan_settings(struct hp_wmi_hwmon_priv *priv) · line 2681
Quoted 10 lines
drivers/platform/x86/hp/hp-wmi.c +6
-1@@ -2657,7 +2673,17 @@ static int hp_wmi_apply_fan_settings(struct hp_wmi_hwmon_priv *priv) secs_to_jiffies(KEEP_ALIVE_DELAY_SECS));return 0 ;case PWM_MODE_AUTO : -if (hp_wmi_fan_control_supported ()) { +/* +* Victus models like 8A3D, calling hp_wmi_fan_speed_max_reset() +* freezes fans at 0 RPM under load. Instead, disable max fans and re-apply +* the active platform profile, so the EC firmware thermal curves regain control. +*/ +if (hp_wmi_thermal_profile () == &victus_s_ec_thermal_params) {
Please do not add magic if's like this.
Instead, use the board params data structure to store the information in a more generic way (add a quirk there?).
Quoted 11 lines
drivers/platform/x86/hp/hp-wmi.c +5
-0+ ret =hp_wmi_fan_speed_max_set (0 ); +if (ret <0 ) +return ret; + ret =platform_profile_victus_s_set_ec (active_platform_profile); + }else if (hp_wmi_fan_control_supported ()) { ret =hp_wmi_get_fan_count_userdefine_trigger ();if (ret <0 )return ret;base-commit:
5b0764a53235d3c77e1ed674e836e1b3fe1a4b1f
Signature · 1 line
i.
v3 cover platform/x86: hp-wmi: fix platform profile values and fan freeze Victus 15-fb0xxx (8A3D)
changes for v3:
made patches seprate for clean merge (thought it would be better?)
- v3 changes are mainly for fan freeze pointed out by ilpo,
- added a bool in fan profile params struct 'hp_wmi_fan_speed_auto_reapply', created a new victus_s_ec_fan_profile_prams with new bool.
- also made that bool a wraper and re-made the 'if' statement with it
Sourav Nayak (2):
platform/x86: hp-wmi: fix platform profile values for Victus 15-fb0xxx
(8A3D)
platform/x86: hp-wmi: fix fan freeze during load for Victus 15-fb0xxx
(8A3D)drivers/platform/x86/hp/hp-wmi.c | 44 ++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-)
Signature · 1 line
2.55.0
PATCH v3 1/2 platform/x86: hp-wmi: fix platform profile values for Victus 15-fb0xxx (8A3D)
Currently Victus 15-fb0xxx (8A3D) takes victus_s_thermal_params, which causes it to register as incorrect EC layout while cold boot.
- On other hand windows Omen Gaming Hub registers EC offset as 0x95,
- which is set in driver as HP_OMEN_EC_THERMAL_PROFILE_OFFSET.
- So, address it by adding victus_s_ec_thermal_params.
- Also perfcontrol modes as performance (0x1), default (0x0), quiet (0x3) registers. So, add support for quiet mode.
--- drivers/platform/x86/hp/hp-wmi.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)
drivers/platform/x86/hp/hp-wmi.c +17 -1
@@ -125,6 +125,13 @@ static const struct thermal_profile_params victus_s_thermal_params = { .ec_tp_offset = HP_EC_OFFSET_UNKNOWN, }; +static const struct thermal_profile_params victus_s_ec_thermal_params = { + .performance =HP_VICTUS_THERMAL_PROFILE_PERFORMANCE , + .balanced =HP_VICTUS_THERMAL_PROFILE_DEFAULT , + .low_power =HP_VICTUS_THERMAL_PROFILE_QUIET , + .ec_tp_offset =HP_OMEN_EC_THERMAL_PROFILE_OFFSET , +}; +static const struct thermal_profile_params omen_v1_thermal_params = { .performance =HP_OMEN_V1_THERMAL_PROFILE_PERFORMANCE , .balanced =HP_OMEN_V1_THERMAL_PROFILE_DEFAULT ,
@@ -168,6 +175,11 @@ static const struct hp_wmi_board_params victus_s_board_params = { .fan_profile = &victus_s_fan_profile_params, }; +static const struct hp_wmi_board_params victus_s_ec_board_params = { + .thermal_profile = &victus_s_ec_thermal_params, + .fan_profile = &victus_s_fan_profile_params, +}; +static const struct hp_wmi_board_params omen_v1_board_params = { .thermal_profile = &omen_v1_thermal_params, .fan_profile = &victus_s_fan_profile_params,
@@ -251,7 +263,7 @@ static const struct dmi_system_id hp_wmi_feature_boards[] __initconst = { }, { .matches = { DMI_MATCH(DMI_BOARD_NAME, "8A3D") }, - .driver_data = (void *)&victus_s_board_params, + .driver_data = (void *)&victus_s_ec_board_params, }, { .matches = { DMI_MATCH(DMI_BOARD_NAME, "8A44") },
@@ -2395,10 +2407,14 @@ static int platform_profile_victus_s_get_ec(enum platform_profile_option *profil* but logically it should have tp == 0x30 || tp == 0x31, as * corrected by the Omen Gaming Hub on windows. Hence accept both * of these values. +* Since boards like 8A3D write 0x3 to EC offset 0x95 to +* engage quiet mode. Map this to PLATFORM_PROFILE_LOW_POWER. */ if (tp == victus_s_thermal_params.performance || tp == omen_v1_thermal_params.performance) { *profile =PLATFORM_PROFILE_PERFORMANCE ; + }else if (tp == victus_s_ec_thermal_params.low_power) { + *profile =PLATFORM_PROFILE_LOW_POWER ; }else if (tp == victus_s_thermal_params.balanced || tp == omen_v1_thermal_params.balanced) {/*
Signature · 1 line
2.55.0
PATCH v3 2/2 platform/x86: hp-wmi: fix fan freeze during load for Victus 15-fb0xxx (8A3D)
In reply to Sourav Nayakhp_wmi_fan_speed_max_reset() caused fans to freeze during loads at 0RPM, So, assign a custom victus_s_ec_fan_profile_params for 8A3D,
introduce a 'if' statement with hp_wmi_fan_speed_auto_reapply to resolve it by calling hp_wmi_fan_speed_max_set(0), and passing platform active again to reactive curves.
Test data:
auto/max:
hp-isa-0000
Adapter: ISA adapter
fan1: 5400 RPM
fan2: 5200 RPM
mannual[255]:
hp-isa-0000
Adapter: ISA adapter
fan1: 5800 RPM
fan2: 5800 RPM
--- drivers/platform/x86/hp/hp-wmi.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-)
drivers/platform/x86/hp/hp-wmi.c +26 -2
@@ -155,6 +155,7 @@ static const struct thermal_profile_params omen_v1_no_ec_thermal_params = {struct hp_wmi_fan_profile_params {int (*get_fan_speed)(int fan); +bool fan_speed_auto_reapply;bool fan_table; };
@@ -170,6 +171,12 @@ static const struct hp_wmi_fan_profile_params victus_s_fan_profile_params = { .fan_table = true, }; +static const struct hp_wmi_fan_profile_params victus_s_ec_fan_profile_params = { + .get_fan_speed = hp_wmi_get_fan_speed_victus_s, + .fan_speed_auto_reapply = true, + .fan_table = true, +}; +static const struct hp_wmi_board_params victus_s_board_params = { .thermal_profile = &victus_s_thermal_params, .fan_profile = &victus_s_fan_profile_params,
@@ -177,7 +184,7 @@ static const struct hp_wmi_board_params victus_s_board_params = {static const struct hp_wmi_board_params victus_s_ec_board_params = { .thermal_profile = &victus_s_ec_thermal_params, - .fan_profile = &victus_s_fan_profile_params, + .fan_profile = &victus_s_ec_fan_profile_params, };static const struct hp_wmi_board_params omen_v1_board_params = {
@@ -2286,6 +2293,13 @@ static bool hp_wmi_fan_control_supported(void)return params && params->get_fan_speed; } +static bool hp_wmi_fan_speed_auto_reapply (void ) +{ +const struct hp_wmi_fan_profile_params *params =hp_wmi_fan_profile (); + +return params && params->fan_speed_auto_reapply; +} +static bool hp_wmi_fan_table_supported (void ) {const struct hp_wmi_fan_profile_params *params =hp_wmi_fan_profile ();
@@ -2945,7 +2959,17 @@ static int hp_wmi_apply_fan_settings(struct hp_wmi_hwmon_priv *priv) secs_to_jiffies(KEEP_ALIVE_DELAY_SECS));return 0 ;case PWM_MODE_AUTO : -if (hp_wmi_fan_control_supported ()) { +/* +* Victus models like 8A3D, calling hp_wmi_fan_speed_max_reset() +* freezes fans at 0 RPM under load. Instead, disable max fans and re-apply +* the active platform profile, so the EC firmware thermal curves regain control. +*/ +if (hp_wmi_fan_speed_auto_reapply ()) { + ret =hp_wmi_fan_speed_max_set (0 ); +if (ret <0 ) +return ret; + ret =platform_profile_victus_s_set_ec (active_platform_profile); + }else if (hp_wmi_fan_control_supported ()) { ret =hp_wmi_get_fan_count_userdefine_trigger ();if (ret <0 )return ret;
Signature · 1 line
2.55.0
Ilpo Järvinen
maintainerRe: [PATCH v3 2/2] platform/x86: hp-wmi: fix fan freeze during load for Victus 15-fb0xxx (8A3D)
On Sat, 21 Nov 2026, Sourav Nayak wrote:
Thanks for the update.
This looks better but the changelog needs work.
Quoted 1 line
hp_wmi_fan_speed_max_reset()caused fans to freeze during loads at 0RPM,
This reads badly, as if something is missing. Do not assume shortlog preceeds the changelog body, the body should be totally independent from shortlog and fully readable on its own.
It think you want to tell right from the start that is happens on a particular HW.
Quoted 2 lines
So, assign a custom
victus_s_ec_fan_profile_paramsfor 8A3D, introduce a 'if' statement withhp_wmi_fan_speed_auto_reapplyto resolve it by
No need to tell you 'introduce a 'if' statement'. Please write with the changelog with assumption that the readers are experienced kernel developers, but not necessarily familiar with this driver or HW).
You should instead be telling that you add "fan_speed_auto_reapply", what it does on a high-level (the code details about if statements are too low-level and can be easily read from the diff below), and mention "use fan_speed_auto_reapply for board 8A3D.
Any function name quoted should have () added to it.
Quoted 1 line
calling
hp_wmi_fan_speed_max_set(0), and passing platform active again to reactive curves.
Please reflow the paragraph to up to 72 chars.
Quoted 8 lines
Test data:
auto/max:
hp-isa-0000
Adapter: ISA adapter
fan1: 5400 RPM
fan2: 5200 RPM
Quoted 7 lines
mannual[255]:
hp-isa-0000
Adapter: ISA adapter
fan1: 5800 RPM
fan2: 5800 RPMTested-by Sourav Nayak <[email protected]>
The assumption is that you've tested the patches you create :-) so these tested-by tags can be dropped.
Quoted 54 lines
Signed-off-by Sourav Nayak <[email protected]>--- drivers/platform/x86/hp/hp-wmi.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-)drivers/platform/x86/hp/hp-wmi.c +15
-1@@ -155,6 +155,7 @@ static const struct thermal_profile_params omen_v1_no_ec_thermal_params = {struct hp_wmi_fan_profile_params {int (*get_fan_speed)(int fan); +bool fan_speed_auto_reapply;bool fan_table; };@@ -170,6 +171,12 @@ static const struct hp_wmi_fan_profile_params victus_s_fan_profile_params = { .fan_table = true, }; +static const struct hp_wmi_fan_profile_params victus_s_ec_fan_profile_params = { + .get_fan_speed = hp_wmi_get_fan_speed_victus_s, + .fan_speed_auto_reapply = true, + .fan_table = true, +}; +static const struct hp_wmi_board_params victus_s_board_params = { .thermal_profile = &victus_s_thermal_params, .fan_profile = &victus_s_fan_profile_params,@@ -177,7 +184,7 @@ static const struct hp_wmi_board_params victus_s_board_params = {static const struct hp_wmi_board_params victus_s_ec_board_params = { .thermal_profile = &victus_s_ec_thermal_params, - .fan_profile = &victus_s_fan_profile_params, + .fan_profile = &victus_s_ec_fan_profile_params, };static const struct hp_wmi_board_params omen_v1_board_params = {@@ -2286,6 +2293,13 @@ static bool hp_wmi_fan_control_supported(void)return params && params->get_fan_speed; } +static bool hp_wmi_fan_speed_auto_reapply (void ) +{ +const struct hp_wmi_fan_profile_params *params =hp_wmi_fan_profile (); + +return params && params->fan_speed_auto_reapply; +} +static bool hp_wmi_fan_table_supported (void ) {const struct hp_wmi_fan_profile_params *params =hp_wmi_fan_profile ();
drivers/platform/x86/hp/hp-wmi.c static int hp_wmi_apply_fan_settings(struct hp_wmi_hwmon_priv *priv) · line 2965
Quoted 8 lines
drivers/platform/x86/hp/hp-wmi.c +4
-1@@ -2945,7 +2959,17 @@ static int hp_wmi_apply_fan_settings(struct hp_wmi_hwmon_priv *priv) secs_to_jiffies(KEEP_ALIVE_DELAY_SECS));return 0 ;case PWM_MODE_AUTO : -if (hp_wmi_fan_control_supported ()) { +/* +* Victus models like 8A3D, calling hp_wmi_fan_speed_max_reset() +* freezes fans at 0 RPM under load. Instead, disable max fans and re-apply +* the active platform profile, so the EC firmware thermal curves regain control.
Please limit comments to 80 chars per line.
Quoted 11 lines
drivers/platform/x86/hp/hp-wmi.c +7
-0+*/ +if (hp_wmi_fan_speed_auto_reapply ()) { + ret =hp_wmi_fan_speed_max_set (0 ); +if (ret <0 ) +return ret; + ret =platform_profile_victus_s_set_ec (active_platform_profile); + }else if (hp_wmi_fan_control_supported ()) { ret =hp_wmi_get_fan_count_userdefine_trigger ();if (ret <0 )return ret;
Signature · 1 line
i.
v4 cover platform/x86: hp-wmi: fix platform profile values and fan freeze Victus 15-fb0xxx (8A3D)
changes for v3:
made patches seprate for clean merge (thought it would be better?)
- v3 changes are mainly for fan freeze pointed out by ilpo,
- added a bool in fan profile params struct 'hp_wmi_fan_speed_auto_reapply' created a new victus_s_ec_fan_profile_prams with new bool.
- also made that bool a wraper and re-made the 'if' statement with it
changes for v4:
as per feedback from ilpo,
- drop tested-by tags from both commits.
- redo of commit msg for 'fix fan freeze during load for Victus 15-fb0xxx'.
- redo of commit comment added (on check no warnings were produced).
Sourav Nayak (2):
platform/x86: hp-wmi: fix platform profile values for Victus 15-fb0xxx
(8A3D)
platform/x86: hp-wmi: fix fan freeze during load for Victus 15-fb0xxx
(8A3D)drivers/platform/x86/hp/hp-wmi.c | 46 ++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-)
Signature · 1 line
2.55.0
PATCH v4 1/2 platform/x86: hp-wmi: fix platform profile values for Victus 15-fb0xxx (8A3D)
Currently Victus 15-fb0xxx (8A3D) takes victus_s_thermal_params, which causes it to register as incorrect EC layout while cold boot.
- On other hand windows Omen Gaming Hub registers EC offset as 0x95,
- which is set in driver as HP_OMEN_EC_THERMAL_PROFILE_OFFSET.
- So, address it by adding victus_s_ec_thermal_params.
- Also perfcontrol modes as performance (0x1), default (0x0), quiet (0x3) registers. So, add support for quiet mode.
--- drivers/platform/x86/hp/hp-wmi.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)
drivers/platform/x86/hp/hp-wmi.c +17 -1
@@ -125,6 +125,13 @@ static const struct thermal_profile_params victus_s_thermal_params = { .ec_tp_offset = HP_EC_OFFSET_UNKNOWN, }; +static const struct thermal_profile_params victus_s_ec_thermal_params = { + .performance =HP_VICTUS_THERMAL_PROFILE_PERFORMANCE , + .balanced =HP_VICTUS_THERMAL_PROFILE_DEFAULT , + .low_power =HP_VICTUS_THERMAL_PROFILE_QUIET , + .ec_tp_offset =HP_OMEN_EC_THERMAL_PROFILE_OFFSET , +}; +static const struct thermal_profile_params omen_v1_thermal_params = { .performance =HP_OMEN_V1_THERMAL_PROFILE_PERFORMANCE , .balanced =HP_OMEN_V1_THERMAL_PROFILE_DEFAULT ,
@@ -168,6 +175,11 @@ static const struct hp_wmi_board_params victus_s_board_params = { .fan_profile = &victus_s_fan_profile_params, }; +static const struct hp_wmi_board_params victus_s_ec_board_params = { + .thermal_profile = &victus_s_ec_thermal_params, + .fan_profile = &victus_s_fan_profile_params, +}; +static const struct hp_wmi_board_params omen_v1_board_params = { .thermal_profile = &omen_v1_thermal_params, .fan_profile = &victus_s_fan_profile_params,
@@ -251,7 +263,7 @@ static const struct dmi_system_id hp_wmi_feature_boards[] __initconst = { }, { .matches = { DMI_MATCH(DMI_BOARD_NAME, "8A3D") }, - .driver_data = (void *)&victus_s_board_params, + .driver_data = (void *)&victus_s_ec_board_params, }, { .matches = { DMI_MATCH(DMI_BOARD_NAME, "8A44") },
@@ -2395,10 +2407,14 @@ static int platform_profile_victus_s_get_ec(enum platform_profile_option *profil* but logically it should have tp == 0x30 || tp == 0x31, as * corrected by the Omen Gaming Hub on windows. Hence accept both * of these values. +* Since boards like 8A3D write 0x3 to EC offset 0x95 to +* engage quiet mode. Map this to PLATFORM_PROFILE_LOW_POWER. */ if (tp == victus_s_thermal_params.performance || tp == omen_v1_thermal_params.performance) { *profile =PLATFORM_PROFILE_PERFORMANCE ; + }else if (tp == victus_s_ec_thermal_params.low_power) { + *profile =PLATFORM_PROFILE_LOW_POWER ; }else if (tp == victus_s_thermal_params.balanced || tp == omen_v1_thermal_params.balanced) {/*
Signature · 1 line
2.55.0
PATCH v4 2/2 platform/x86: hp-wmi: fix fan freeze during load for Victus 15-fb0xxx (8A3D)
In reply to Sourav NayakOn Victus 15-fb0xxx (8A3D) model, Calling hp_wmi_fan_speed_max_reset() causes fans to freeze during loads at 0RPM in auto mode,
So, fix this regression by a flag to struct hp_wmi_fan_profile_params and enable it for 8A3D in victus_s_ec_fan_profile_params.
When fan_speed_auto_reapply() is called, It disables maximum fan speed via hp_wmi_fan_speed_max_set(0), and passes to active platform profile to reactive curves via platform_profile_victus_s_set_ec().
Test data:
auto/max:
hp-isa-0000
Adapter: ISA adapter
fan1: 5400 RPM
fan2: 5200 RPM
mannual[255]:
hp-isa-0000
Adapter: ISA adapter
fan1: 5800 RPM
fan2: 5800 RPM
--- drivers/platform/x86/hp/hp-wmi.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-)
drivers/platform/x86/hp/hp-wmi.c +28 -2
@@ -155,6 +155,7 @@ static const struct thermal_profile_params omen_v1_no_ec_thermal_params = {struct hp_wmi_fan_profile_params {int (*get_fan_speed)(int fan); +bool fan_speed_auto_reapply;bool fan_table; };
@@ -170,6 +171,12 @@ static const struct hp_wmi_fan_profile_params victus_s_fan_profile_params = { .fan_table = true, }; +static const struct hp_wmi_fan_profile_params victus_s_ec_fan_profile_params = { + .get_fan_speed = hp_wmi_get_fan_speed_victus_s, + .fan_speed_auto_reapply = true, + .fan_table = true, +}; +static const struct hp_wmi_board_params victus_s_board_params = { .thermal_profile = &victus_s_thermal_params, .fan_profile = &victus_s_fan_profile_params,
@@ -177,7 +184,7 @@ static const struct hp_wmi_board_params victus_s_board_params = {static const struct hp_wmi_board_params victus_s_ec_board_params = { .thermal_profile = &victus_s_ec_thermal_params, - .fan_profile = &victus_s_fan_profile_params, + .fan_profile = &victus_s_ec_fan_profile_params, };static const struct hp_wmi_board_params omen_v1_board_params = {
@@ -2286,6 +2293,13 @@ static bool hp_wmi_fan_control_supported(void)return params && params->get_fan_speed; } +static bool hp_wmi_fan_speed_auto_reapply (void ) +{ +const struct hp_wmi_fan_profile_params *params =hp_wmi_fan_profile (); + +return params && params->fan_speed_auto_reapply; +} +static bool hp_wmi_fan_table_supported (void ) {const struct hp_wmi_fan_profile_params *params =hp_wmi_fan_profile ();
@@ -2945,7 +2959,19 @@ static int hp_wmi_apply_fan_settings(struct hp_wmi_hwmon_priv *priv) secs_to_jiffies(KEEP_ALIVE_DELAY_SECS));return 0 ;case PWM_MODE_AUTO : -if (hp_wmi_fan_control_supported ()) { +/* +* Victus models like 8A3D, calling +* hp_wmi_fan_speed_max_reset() freezes fans at 0 RPM +* under load. Instead, disable max fans and re-apply +* the active platform profile, so the EC firmware +* thermal curves regain control. +*/ +if (hp_wmi_fan_speed_auto_reapply ()) { + ret =hp_wmi_fan_speed_max_set (0 ); +if (ret <0 ) +return ret; + ret =platform_profile_victus_s_set_ec (active_platform_profile); + }else if (hp_wmi_fan_control_supported ()) { ret =hp_wmi_get_fan_count_userdefine_trigger ();if (ret <0 )return ret;
Signature · 1 line
2.55.0