mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] platform/x86: hp-wmi: fix platform profile values for Victus 15-fb0xxx (8A3D)
@ 2026-10-24 20:26 Sourav Nayak
  2026-10-25  3:45 ` [PATCH V2] " Sourav Nayak
  0 siblings, 1 reply; 3+ messages in thread
From: Sourav Nayak @ 2026-10-24 20:26 UTC (permalink / raw)
  To: ilpo.jarvinen; +Cc: platform-driver-x86, linux-kernel, 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 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

Tested-by: Sourav Nayak <nonameblank007@gmail.com>
Signed-off-by: Sourav Nayak <nonameblank007@gmail.com>
---
 drivers/platform/x86/hp/hp-wmi.c | 30 ++++++++++++++++++++++++++++--
 1 file changed, 28 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
index 615b4cf6fc45..c35bbe1427e3 100644
--- a/drivers/platform/x86/hp/hp-wmi.c
+++ b/drivers/platform/x86/hp/hp-wmi.c
@@ -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
-- 
2.55.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH V2] platform/x86: hp-wmi: fix platform profile values for Victus 15-fb0xxx (8A3D)
  2026-10-24 20:26 [PATCH] platform/x86: hp-wmi: fix platform profile values for Victus 15-fb0xxx (8A3D) Sourav Nayak
@ 2026-10-25  3:45 ` Sourav Nayak
  2026-11-20 21:42   ` Ilpo Järvinen
  0 siblings, 1 reply; 3+ messages in thread
From: Sourav Nayak @ 2026-10-25  3:45 UTC (permalink / raw)
  To: nonameblank007; +Cc: ilpo.jarvinen, linux-kernel, platform-driver-x86

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

Tested-by: Sourav Nayak <nonameblank007@gmail.com>
Signed-off-by: Sourav Nayak <nonameblank007@gmail.com>
---
 drivers/platform/x86/hp/hp-wmi.c | 30 ++++++++++++++++++++++++++++--
 1 file changed, 28 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
index 615b4cf6fc45..ee6de96b3280 100644
--- a/drivers/platform/x86/hp/hp-wmi.c
+++ b/drivers/platform/x86/hp/hp-wmi.c
@@ -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
-- 
2.55.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH V2] platform/x86: hp-wmi: fix platform profile values for Victus 15-fb0xxx (8A3D)
  2026-10-25  3:45 ` [PATCH V2] " Sourav Nayak
@ 2026-11-20 21:42   ` Ilpo Järvinen
  0 siblings, 0 replies; 3+ messages in thread
From: Ilpo Järvinen @ 2026-11-20 21:42 UTC (permalink / raw)
  To: Sourav Nayak; +Cc: LKML, platform-driver-x86

On Sun, 25 Oct 2026, Sourav Nayak wrote:

> 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
> 
> Tested-by: Sourav Nayak <nonameblank007@gmail.com>
> Signed-off-by: Sourav Nayak <nonameblank007@gmail.com>
> ---
>  drivers/platform/x86/hp/hp-wmi.c | 30 ++++++++++++++++++++++++++++--
>  1 file changed, 28 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
> index 615b4cf6fc45..ee6de96b3280 100644
> --- a/drivers/platform/x86/hp/hp-wmi.c
> +++ b/drivers/platform/x86/hp/hp-wmi.c
> @@ -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) {

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?).

> +			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
> 

-- 
 i.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-20 21:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-24 20:26 [PATCH] platform/x86: hp-wmi: fix platform profile values for Victus 15-fb0xxx (8A3D) Sourav Nayak
2026-10-25  3:45 ` [PATCH V2] " Sourav Nayak
2026-11-20 21:42   ` Ilpo Järvinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®