All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krishna Chomal <krishna.chomal108@gmail.com>
To: ShaunV334 <shaunvarghese43@gmail.com>
Cc: platform-driver-x86@vger.kernel.org, hansg@kernel.org,
	 ilpo.jarvinen@linux.intel.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] platform/x86: hp-wmi: add cTGP and PPAB support for Omen
Date: Fri, 4 Sep 2026 22:24:58 +0530	[thread overview]
Message-ID: <apry5R9nzCJ3niGH@archlinux> (raw)
In-Reply-To: <20260903195626.39391-1-shaunvarghese43@gmail.com>

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
>

  reply	other threads:[~2026-09-04 16:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]
2026-09-06 13:01   ` [PATCH v2] platform/x86: hp-wmi: add Omen Transcend 14 8C58 support ShaunV334
2026-09-18 18:26     ` Ilpo Järvinen

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=apry5R9nzCJ3niGH@archlinux \
    --to=krishna.chomal108@gmail.com \
    --cc=hansg@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=shaunvarghese43@gmail.com \
    /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.