All of lore.kernel.org
 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; 3+ 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] 3+ 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
  2026-09-06 13:01   ` [PATCH v2] platform/x86: hp-wmi: add Omen Transcend 14 8C58 support ShaunV334
  0 siblings, 1 reply; 3+ 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] 3+ messages in thread

* [PATCH v2] platform/x86: hp-wmi: add Omen Transcend 14 8C58 support
  2026-09-04 16:54 ` Krishna Chomal
@ 2026-09-06 13:01   ` ShaunV334
  0 siblings, 0 replies; 3+ messages in thread
From: ShaunV334 @ 2026-09-06 13:01 UTC (permalink / raw)
  To: krishna.chomal108
  Cc: hansg, ilpo.jarvinen, linux-kernel, platform-driver-x86,
	Shaun Varghese

From: Shaun Varghese <shaunvarghese43@gmail.com>

Thanks for the information, I've currently added 8C58 to hp_wmi_feature_boards[]
and removed it from omen_thermal_profile_boards[] as suggested. Manual PWM fan control
is confirmed to be working but the GPU is still missing that additional +15w from 'Smart Performance Gain'.
That will require further investigation.

Add the HP Omen Transcend 14 board name 8C58 to the hp_wmi feature
board table using the existing omen_v1_legacy_board_params.

Remove 8C58 from the omen thermal profile board list so that the
board uses the appropriate feature-board handling.

---
v2:
- Drop the CTGP/PPAB changes from v1.
- Add 8C58 to hp_wmi_feature_boards using
  omen_v1_legacy_board_params.

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

diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
index b2773fc1a..e55ed5b3c 100644
--- a/drivers/platform/x86/hp/hp-wmi.c
+++ b/drivers/platform/x86/hp/hp-wmi.c
@@ -209,7 +209,6 @@ static const char * const omen_thermal_profile_boards[] = {
 	"8900", "8901", "8902", "8912", "8917", "8918", "8949", "894A", "89EB",
 	"8A15", "8A42", "8A43",
 	"8BAD",
-	"8C58",
 	"8E41",
 };
 
@@ -299,6 +298,10 @@ static const struct dmi_system_id hp_wmi_feature_boards[] __initconst = {
 		.matches = { DMI_MATCH(DMI_BOARD_NAME, "8BD5") },
 		.driver_data = (void *)&victus_s_board_params,
 	},
+	{
+		.matches = { DMI_MATCH(DMI_BOARD_NAME, "8C58") },
+		.driver_data = (void *)&omen_v1_legacy_board_params,
+	},
 	{
 		.matches = { DMI_MATCH(DMI_BOARD_NAME, "8C76") },
 		.driver_data = (void *)&omen_v1_board_params,
-- 
2.55.0


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

end of thread, other threads:[~2026-09-06 13:02 UTC | newest]

Thread overview: 3+ 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
2026-09-06 13:01   ` [PATCH v2] platform/x86: hp-wmi: add Omen Transcend 14 8C58 support ShaunV334

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.