All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Sourav Nayak <nonameblank007@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>, platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH V2] platform/x86: hp-wmi: fix platform profile values for Victus 15-fb0xxx (8A3D)
Date: Fri, 20 Nov 2026 23:42:35 +0200 (EET)	[thread overview]
Message-ID: <1061c0e1-9e05-a09f-3eb6-5702f4fbcf08@linux.intel.com> (raw)
In-Reply-To: <20261025034539.4565-1-nonameblank007@gmail.com>

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.


      reply	other threads:[~2026-11-20 21:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1061c0e1-9e05-a09f-3eb6-5702f4fbcf08@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nonameblank007@gmail.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.