X86 platform drivers
 help / color / mirror / Atom feed
* [PATCH] platform/x86: hp-wmi: add cTGP and PPAB support for Omen
@ 2026-09-03 19:56 ShaunV334
  2026-09-04 16:54 ` Krishna Chomal
  0 siblings, 1 reply; 2+ messages in thread
From: ShaunV334 @ 2026-09-03 19:56 UTC (permalink / raw)
  To: platform-driver-x86; +Cc: hansg, ilpo.jarvinen, linux-kernel, Shaun Varghese

From: Shaun Varghese <shaunvarghese43@gmail.com>

On supported Omen systems, the GPU can be limited to a lower power
limit because cTGP and PPAB are not configured when changing the
platform profile.

Configure the GPU cTGP and PPAB settings through the existing WMI 0x22
GPU thermal profile interface. Performance enables both cTGP and PPAB,
Balanced enables PPAB, and Cool disables both.

This allows the NVIDIA GPU to make use of the additional power budget
provided by the platform, improving GPU performance compared to the
lower power limit.

Tested on an HP Omen Transcend 14 (board 8C58) RTX 4060.
The GPU was limited to 35 W before this change. With cTGP/PPAB
enabled, the GPU was able to reach and maintain its boost clocks, with
power draw increasing to 57 W, benchmark performance improving by
approximately 10–15%.

Signed-off-by: Shaun Varghese <shaunvarghese43@gmail.com>
---
 drivers/platform/x86/hp/hp-wmi.c | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
index b2773fc1aca4..54887a476c8e 100644
--- a/drivers/platform/x86/hp/hp-wmi.c
+++ b/drivers/platform/x86/hp/hp-wmi.c
@@ -1771,9 +1771,15 @@ inline int omen_thermal_profile_ec_timer_set(u8 value)
 	return ec_write(HP_OMEN_EC_THERMAL_PROFILE_TIMER_OFFSET, value);
 }
 
+static int victus_s_gpu_thermal_profile_set(bool ctgp_enable,
+					    bool ppab_enable,
+					    u8 dstate);
+
 static int platform_profile_omen_set_ec(enum platform_profile_option profile)
 {
 	int err, tp, tp_version;
+	bool gpu_ctgp_enable;
+	bool gpu_ppab_enable;
 	enum hp_thermal_profile_omen_flags flags = 0;
 
 	tp_version = omen_get_thermal_policy_version();
@@ -1787,19 +1793,31 @@ static int platform_profile_omen_set_ec(enum platform_profile_option profile)
 			tp = HP_OMEN_V0_THERMAL_PROFILE_PERFORMANCE;
 		else
 			tp = HP_OMEN_V1_THERMAL_PROFILE_PERFORMANCE;
+
+		gpu_ctgp_enable = true;
+		gpu_ppab_enable = true;
 		break;
+
 	case PLATFORM_PROFILE_BALANCED:
 		if (tp_version == 0)
 			tp = HP_OMEN_V0_THERMAL_PROFILE_DEFAULT;
 		else
 			tp = HP_OMEN_V1_THERMAL_PROFILE_DEFAULT;
+
+		gpu_ctgp_enable = false;
+		gpu_ppab_enable = true;
 		break;
+
 	case PLATFORM_PROFILE_COOL:
 		if (tp_version == 0)
 			tp = HP_OMEN_V0_THERMAL_PROFILE_COOL;
 		else
 			tp = HP_OMEN_V1_THERMAL_PROFILE_COOL;
+
+		gpu_ctgp_enable = false;
+		gpu_ppab_enable = false;
 		break;
+
 	default:
 		return -EOPNOTSUPP;
 	}
@@ -1808,6 +1826,18 @@ static int platform_profile_omen_set_ec(enum platform_profile_option profile)
 	if (err < 0)
 		return err;
 
+	/*
+	 * Configure GPU cTGP / PPAB through WMI 0x22 according to
+	 * the selected platform profile.
+	 */
+	err = victus_s_gpu_thermal_profile_set(gpu_ctgp_enable,
+					       gpu_ppab_enable,
+					       1);
+	if (err < 0) {
+		pr_debug("hp-wmi: GPU cTGP/PPAB set returned %d\n", err);
+		return err;
+	}
+
 	if (has_omen_thermal_profile_ec_timer()) {
 		err = omen_thermal_profile_ec_timer_set(0);
 		if (err < 0)
-- 
2.55.0


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

* Re: [PATCH] platform/x86: hp-wmi: add cTGP and PPAB support for Omen
  2026-09-03 19:56 [PATCH] platform/x86: hp-wmi: add cTGP and PPAB support for Omen ShaunV334
@ 2026-09-04 16:54 ` Krishna Chomal
  0 siblings, 0 replies; 2+ messages in thread
From: Krishna Chomal @ 2026-09-04 16:54 UTC (permalink / raw)
  To: ShaunV334; +Cc: platform-driver-x86, hansg, ilpo.jarvinen, linux-kernel

On Fri, Sep 04, 2026 at 01:26:26AM +0530, ShaunV334 wrote:
>From: Shaun Varghese <shaunvarghese43@gmail.com>
>
>On supported Omen systems, the GPU can be limited to a lower power
>limit because cTGP and PPAB are not configured when changing the
>platform profile.
>
>Configure the GPU cTGP and PPAB settings through the existing WMI 0x22
>GPU thermal profile interface. Performance enables both cTGP and PPAB,
>Balanced enables PPAB, and Cool disables both.
>
>This allows the NVIDIA GPU to make use of the additional power budget
>provided by the platform, improving GPU performance compared to the
>lower power limit.
>
>Tested on an HP Omen Transcend 14 (board 8C58) RTX 4060.
>The GPU was limited to 35 W before this change. With cTGP/PPAB
>enabled, the GPU was able to reach and maintain its boost clocks, with
>power draw increasing to 57 W, benchmark performance improving by
>approximately 10–15%.
>
>Signed-off-by: Shaun Varghese <shaunvarghese43@gmail.com>
>---
> drivers/platform/x86/hp/hp-wmi.c | 30 ++++++++++++++++++++++++++++++
> 1 file changed, 30 insertions(+)
>
>diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
>index b2773fc1aca4..54887a476c8e 100644
>--- a/drivers/platform/x86/hp/hp-wmi.c
>+++ b/drivers/platform/x86/hp/hp-wmi.c
>@@ -1771,9 +1771,15 @@ inline int omen_thermal_profile_ec_timer_set(u8 value)
> 	return ec_write(HP_OMEN_EC_THERMAL_PROFILE_TIMER_OFFSET, value);
> }
>
>+static int victus_s_gpu_thermal_profile_set(bool ctgp_enable,
>+					    bool ppab_enable,
>+					    u8 dstate);
>+
> static int platform_profile_omen_set_ec(enum platform_profile_option profile)
> {
> 	int err, tp, tp_version;
>+	bool gpu_ctgp_enable;
>+	bool gpu_ppab_enable;
> 	enum hp_thermal_profile_omen_flags flags = 0;
>
> 	tp_version = omen_get_thermal_policy_version();
>@@ -1787,19 +1793,31 @@ static int platform_profile_omen_set_ec(enum platform_profile_option profile)
> 			tp = HP_OMEN_V0_THERMAL_PROFILE_PERFORMANCE;
> 		else
> 			tp = HP_OMEN_V1_THERMAL_PROFILE_PERFORMANCE;
>+
>+		gpu_ctgp_enable = true;
>+		gpu_ppab_enable = true;
> 		break;
>+
> 	case PLATFORM_PROFILE_BALANCED:
> 		if (tp_version == 0)
> 			tp = HP_OMEN_V0_THERMAL_PROFILE_DEFAULT;
> 		else
> 			tp = HP_OMEN_V1_THERMAL_PROFILE_DEFAULT;
>+
>+		gpu_ctgp_enable = false;
>+		gpu_ppab_enable = true;
> 		break;
>+
> 	case PLATFORM_PROFILE_COOL:
> 		if (tp_version == 0)
> 			tp = HP_OMEN_V0_THERMAL_PROFILE_COOL;
> 		else
> 			tp = HP_OMEN_V1_THERMAL_PROFILE_COOL;
>+
>+		gpu_ctgp_enable = false;
>+		gpu_ppab_enable = false;
> 		break;
>+
> 	default:
> 		return -EOPNOTSUPP;
> 	}
>@@ -1808,6 +1826,18 @@ static int platform_profile_omen_set_ec(enum platform_profile_option profile)
> 	if (err < 0)
> 		return err;
>
>+	/*
>+	 * Configure GPU cTGP / PPAB through WMI 0x22 according to
>+	 * the selected platform profile.
>+	 */
>+	err = victus_s_gpu_thermal_profile_set(gpu_ctgp_enable,
>+					       gpu_ppab_enable,
>+					       1);
>+	if (err < 0) {
>+		pr_debug("hp-wmi: GPU cTGP/PPAB set returned %d\n", err);
>+		return err;
>+	}
>+

Hi,

platform_profile_omen_set_ec() is used by:
1. omen_thermal_profile_boards[]
2. omen_thermal_profile_force_v0_boards[]
3. omen_timed_thermal_profile_boards[]

Not all boards in those lists support cTGP / PPAB changes. Forcing WMI
calls in potentially unsupported devices can lead to failure in switching
platform profile as an unintended consequence.

This is why hp_wmi_feature_boards[] array exists in the first place: for
devices supporting cTGP / PPAB changes (among other special WMI calls). I
think you should consider moving 8C58 from omen_thermal_profile_boards[]
to hp_wmi_feature_boards[]

In fact, after taking a look at the acpidump for 8C58, as
provided by Big Dru [1], I think 8C58 supports all WMI calls in
hp_wmi_feature_boards[]. Adding it to that list and mapping against
omen_v1_legacy_board_params seems to be the right approach, in my opinion.

[1]: https://lore.kernel.org/platform-driver-x86/CAAC6SV4BY3oXpokdBETs9n-NYoxrENJWp7Qs=E2ZK7=Yz=f4mw@mail.gmail.com

> 	if (has_omen_thermal_profile_ec_timer()) {
> 		err = omen_thermal_profile_ec_timer_set(0);
> 		if (err < 0)
>-- 
>2.55.0
>

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

end of thread, other threads:[~2026-09-04 16:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-03 19:56 [PATCH] platform/x86: hp-wmi: add cTGP and PPAB support for Omen ShaunV334
2026-09-04 16:54 ` Krishna Chomal

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