* [PATCH] platform/x86: hp-wmi: fix platform profile values for Omen 16-wf1xxx
@ 2025-12-13 18:51 Krishna Chomal
2025-12-15 14:25 ` Ilpo Järvinen
0 siblings, 1 reply; 4+ messages in thread
From: Krishna Chomal @ 2025-12-13 18:51 UTC (permalink / raw)
To: ilpo.jarvinen, hansg; +Cc: platform-driver-x86, Krishna Chomal
HP Omen 16-wf1xxx (board ID 8C78) currently sends the incorrect
Victus-specific thermal profile values via WMI, leading to a logical
inconsistency when switching between platform profiles.
The driver currently uses Victus S values:
0x00 => Balanced / Low-Power
0x01 => Performance
However, Omen Gaming Hub logs / EC register inspection on Windows shows
that this board is intended to use:
0x30 => Balanced / Low-Power
0x31 => Performance
This patch corrects the thermal profile command values to match the
values observed from Omen Gaming Hub logs. The performance benchmarks
and peak power draw (from both CPU and GPU) show no observable change
with this correction (suggesting that the firmware is currently tolerant
of the incorrect values). However sending the correct values prevents
potential regressions after future firmware updates.
Create a new omen_new_thermal_profile_boards[] array for devices that
share the Victus WMI queries but require Omen thermal profile values.
Conditionally use these values in platform_profile_victus_s_set_ec().
Tested on: HP Omen 16-wf1xxx (board 8C78)
Result: Confirmed WMI codes 0x30/0x31 are now sent, resolving the
logical inconsistency and ensuring the value visible in EC registers
match the Windows state for this profile.
Fixes: fb146a38cb11 ("platform/x86: hp-wmi: Add Omen 16-wf1xxx fan support")
Signed-off-by: Krishna Chomal <krishna.chomal108@gmail.com>
---
drivers/platform/x86/hp/hp-wmi.c | 35 +++++++++++++++++++++++++++++---
1 file changed, 32 insertions(+), 3 deletions(-)
diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
index f4ea1ea05997..4dfd5fc230e2 100644
--- a/drivers/platform/x86/hp/hp-wmi.c
+++ b/drivers/platform/x86/hp/hp-wmi.c
@@ -105,6 +105,14 @@ static const char * const victus_s_thermal_profile_boards[] = {
"8D41",
};
+/* DMI Board names of Omen laptops that have same WMI queries as
+ * victus_s_thermal_profile_boards but use hp_thermal_profile_omen_v1
+ * values.
+ */
+static const char * const omen_new_thermal_profile_boards[] = {
+ "8C78",
+};
+
enum hp_wmi_radio {
HPWMI_WIFI = 0x0,
HPWMI_BLUETOOTH = 0x1,
@@ -1522,6 +1530,18 @@ static bool is_victus_thermal_profile(void)
board_name) >= 0;
}
+static bool is_omen_new_thermal_profile(void)
+{
+ const char *board_name = dmi_get_system_info(DMI_BOARD_NAME);
+
+ if (!board_name)
+ return false;
+
+ return match_string(omen_new_thermal_profile_boards,
+ ARRAY_SIZE(omen_new_thermal_profile_boards),
+ board_name) >= 0;
+}
+
static int platform_profile_victus_get_ec(enum platform_profile_option *profile)
{
int tp;
@@ -1678,19 +1698,28 @@ static int platform_profile_victus_s_set_ec(enum platform_profile_option profile
switch (profile) {
case PLATFORM_PROFILE_PERFORMANCE:
- tp = HP_VICTUS_S_THERMAL_PROFILE_PERFORMANCE;
+ if (is_omen_new_thermal_profile())
+ tp = HP_OMEN_V1_THERMAL_PROFILE_PERFORMANCE;
+ else
+ tp = HP_VICTUS_S_THERMAL_PROFILE_PERFORMANCE;
gpu_ctgp_enable = true;
gpu_ppab_enable = true;
gpu_dstate = 1;
break;
case PLATFORM_PROFILE_BALANCED:
- tp = HP_VICTUS_S_THERMAL_PROFILE_DEFAULT;
+ if (is_omen_new_thermal_profile())
+ tp = HP_OMEN_V1_THERMAL_PROFILE_DEFAULT;
+ else
+ tp = HP_VICTUS_S_THERMAL_PROFILE_DEFAULT;
gpu_ctgp_enable = false;
gpu_ppab_enable = true;
gpu_dstate = 1;
break;
case PLATFORM_PROFILE_LOW_POWER:
- tp = HP_VICTUS_S_THERMAL_PROFILE_DEFAULT;
+ if (is_omen_new_thermal_profile())
+ tp = HP_OMEN_V1_THERMAL_PROFILE_DEFAULT;
+ else
+ tp = HP_VICTUS_S_THERMAL_PROFILE_DEFAULT;
gpu_ctgp_enable = false;
gpu_ppab_enable = false;
gpu_dstate = 1;
--
2.52.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] platform/x86: hp-wmi: fix platform profile values for Omen 16-wf1xxx
2025-12-13 18:51 [PATCH] platform/x86: hp-wmi: fix platform profile values for Omen 16-wf1xxx Krishna Chomal
@ 2025-12-15 14:25 ` Ilpo Järvinen
2025-12-16 10:20 ` Krishna Chomal
0 siblings, 1 reply; 4+ messages in thread
From: Ilpo Järvinen @ 2025-12-15 14:25 UTC (permalink / raw)
To: Krishna Chomal; +Cc: Hans de Goede, platform-driver-x86
On Sun, 14 Dec 2025, Krishna Chomal wrote:
> HP Omen 16-wf1xxx (board ID 8C78) currently sends the incorrect
> Victus-specific thermal profile values via WMI, leading to a logical
> inconsistency when switching between platform profiles.
>
> The driver currently uses Victus S values:
> 0x00 => Balanced / Low-Power
> 0x01 => Performance
>
> However, Omen Gaming Hub logs / EC register inspection on Windows shows
> that this board is intended to use:
> 0x30 => Balanced / Low-Power
> 0x31 => Performance
>
> This patch corrects the thermal profile command values to match the
> values observed from Omen Gaming Hub logs. The performance benchmarks
> and peak power draw (from both CPU and GPU) show no observable change
> with this correction (suggesting that the firmware is currently tolerant
> of the incorrect values). However sending the correct values prevents
> potential regressions after future firmware updates.
>
> Create a new omen_new_thermal_profile_boards[] array for devices that
> share the Victus WMI queries but require Omen thermal profile values.
> Conditionally use these values in platform_profile_victus_s_set_ec().
>
> Tested on: HP Omen 16-wf1xxx (board 8C78)
> Result: Confirmed WMI codes 0x30/0x31 are now sent, resolving the
> logical inconsistency and ensuring the value visible in EC registers
> match the Windows state for this profile.
>
> Fixes: fb146a38cb11 ("platform/x86: hp-wmi: Add Omen 16-wf1xxx fan support")
> Signed-off-by: Krishna Chomal <krishna.chomal108@gmail.com>
> ---
> drivers/platform/x86/hp/hp-wmi.c | 35 +++++++++++++++++++++++++++++---
> 1 file changed, 32 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
> index f4ea1ea05997..4dfd5fc230e2 100644
> --- a/drivers/platform/x86/hp/hp-wmi.c
> +++ b/drivers/platform/x86/hp/hp-wmi.c
> @@ -105,6 +105,14 @@ static const char * const victus_s_thermal_profile_boards[] = {
> "8D41",
> };
>
> +/* DMI Board names of Omen laptops that have same WMI queries as
> + * victus_s_thermal_profile_boards but use hp_thermal_profile_omen_v1
> + * values.
> + */
> +static const char * const omen_new_thermal_profile_boards[] = {
> + "8C78",
> +};
> +
> enum hp_wmi_radio {
> HPWMI_WIFI = 0x0,
> HPWMI_BLUETOOTH = 0x1,
> @@ -1522,6 +1530,18 @@ static bool is_victus_thermal_profile(void)
> board_name) >= 0;
> }
>
> +static bool is_omen_new_thermal_profile(void)
> +{
> + const char *board_name = dmi_get_system_info(DMI_BOARD_NAME);
> +
> + if (!board_name)
> + return false;
> +
> + return match_string(omen_new_thermal_profile_boards,
> + ARRAY_SIZE(omen_new_thermal_profile_boards),
> + board_name) >= 0;
> +}
> +
> static int platform_profile_victus_get_ec(enum platform_profile_option *profile)
> {
> int tp;
> @@ -1678,19 +1698,28 @@ static int platform_profile_victus_s_set_ec(enum platform_profile_option profile
>
> switch (profile) {
> case PLATFORM_PROFILE_PERFORMANCE:
> - tp = HP_VICTUS_S_THERMAL_PROFILE_PERFORMANCE;
> + if (is_omen_new_thermal_profile())
> + tp = HP_OMEN_V1_THERMAL_PROFILE_PERFORMANCE;
> + else
> + tp = HP_VICTUS_S_THERMAL_PROFILE_PERFORMANCE;
> gpu_ctgp_enable = true;
> gpu_ppab_enable = true;
> gpu_dstate = 1;
> break;
> case PLATFORM_PROFILE_BALANCED:
> - tp = HP_VICTUS_S_THERMAL_PROFILE_DEFAULT;
> + if (is_omen_new_thermal_profile())
> + tp = HP_OMEN_V1_THERMAL_PROFILE_DEFAULT;
> + else
> + tp = HP_VICTUS_S_THERMAL_PROFILE_DEFAULT;
> gpu_ctgp_enable = false;
> gpu_ppab_enable = true;
> gpu_dstate = 1;
> break;
> case PLATFORM_PROFILE_LOW_POWER:
> - tp = HP_VICTUS_S_THERMAL_PROFILE_DEFAULT;
> + if (is_omen_new_thermal_profile())
> + tp = HP_OMEN_V1_THERMAL_PROFILE_DEFAULT;
> + else
> + tp = HP_VICTUS_S_THERMAL_PROFILE_DEFAULT;
> gpu_ctgp_enable = false;
> gpu_ppab_enable = false;
> gpu_dstate = 1;
Hi,
Thank you for the patch but it looks this approach to add mappings using
if()s to handle variations should be replaced with something better.
--
i.
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] platform/x86: hp-wmi: fix platform profile values for Omen 16-wf1xxx
2025-12-15 14:25 ` Ilpo Järvinen
@ 2025-12-16 10:20 ` Krishna Chomal
2025-12-16 10:33 ` Ilpo Järvinen
0 siblings, 1 reply; 4+ messages in thread
From: Krishna Chomal @ 2025-12-16 10:20 UTC (permalink / raw)
To: Ilpo Järvinen; +Cc: Hans de Goede, platform-driver-x86
Hi Ilpo,
On Mon, Dec 15, 2025 at 04:25:17PM +0200, Ilpo Järvinen wrote:
>Thank you for the patch but it looks this approach to add mappings using
>if()s to handle variations should be replaced with something better.
Thank you for the feedback. I agree that stacking if/else statements for
board variations is not a scalable idea.
For V2, I plan to refactor this driver to use DMI system ID table's
driver_data field to handle the profile mapping (at least for
victus_s_thermal_profile_boards in this patch).
The implementation will introduce a `struct thermal_profile_params` to
hold the specific thermal values (Performance/Balanced/Low-Power). Then
I can convert victus_s_thermal_profile_boards from a simple string
array to a `struct dmi_system_id[]` array, where each entry maps a DMI
Board Name to its specific thermal_profile_params via driver_data.
Then platform_profile_victus_s_set_ec can simply retrieve the correct
parameters via dmi_first_match(), removing the need for nested if()s.
I feel this restructuring makes the code much cleaner and makes the
thermal profile choice for new boards explicit. Does this plan look like
the right direction for V2?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] platform/x86: hp-wmi: fix platform profile values for Omen 16-wf1xxx
2025-12-16 10:20 ` Krishna Chomal
@ 2025-12-16 10:33 ` Ilpo Järvinen
0 siblings, 0 replies; 4+ messages in thread
From: Ilpo Järvinen @ 2025-12-16 10:33 UTC (permalink / raw)
To: Krishna Chomal; +Cc: Hans de Goede, platform-driver-x86
[-- Attachment #1: Type: text/plain, Size: 1584 bytes --]
On Tue, 16 Dec 2025, Krishna Chomal wrote:
> On Mon, Dec 15, 2025 at 04:25:17PM +0200, Ilpo Järvinen wrote:
> > Thank you for the patch but it looks this approach to add mappings using
> > if()s to handle variations should be replaced with something better.
>
> Thank you for the feedback. I agree that stacking if/else statements for
> board variations is not a scalable idea.
>
> For V2, I plan to refactor this driver to use DMI system ID table's
> driver_data field to handle the profile mapping (at least for
> victus_s_thermal_profile_boards in this patch).
>
> The implementation will introduce a `struct thermal_profile_params` to
> hold the specific thermal values (Performance/Balanced/Low-Power). Then
> I can convert victus_s_thermal_profile_boards from a simple string
> array to a `struct dmi_system_id[]` array, where each entry maps a DMI
> Board Name to its specific thermal_profile_params via driver_data.
>
> Then platform_profile_victus_s_set_ec can simply retrieve the correct
> parameters via dmi_first_match(), removing the need for nested if()s.
>
> I feel this restructuring makes the code much cleaner and makes the
> thermal profile choice for new boards explicit. Does this plan look like
> the right direction for V2?
Yes, something along those lines.
There's also one similar attempt pending in the patchwork, so this
hopefully can solve that case as well:
https://patchwork.kernel.org/project/platform-driver-x86/patch/20250731213529.27378-1-noahpro@gmail.com/
Thanks for taking up this task. :-)
--
i.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-12-16 10:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-13 18:51 [PATCH] platform/x86: hp-wmi: fix platform profile values for Omen 16-wf1xxx Krishna Chomal
2025-12-15 14:25 ` Ilpo Järvinen
2025-12-16 10:20 ` Krishna Chomal
2025-12-16 10:33 ` Ilpo Järvinen
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.