mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David William Richmond Davies-Jones <david@exultantmonkey.co.uk>
To: "Hans de Goede" <hansg@kernel.org>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: Krishna Chomal <krishna.chomal108@gmail.com>,
	Julien ROBIN <julien.robin28@free.fr>,
	platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	David William Richmond Davies-Jones <david@exultantmonkey.co.uk>,
	stable@vger.kernel.org
Subject: [PATCH v2 2/2] platform/x86: hp-wmi: Move OMEN 15-en1xxx (board 88D2) to feature board list
Date: Sun, 22 Nov 2026 23:43:51 +0000	[thread overview]
Message-ID: <20261122234351.278694-3-david@exultantmonkey.co.uk> (raw)
In-Reply-To: <20261122234351.278694-1-david@exultantmonkey.co.uk>

On the OMEN 15-en1xxx (board 88D2) the GPU power limit stays at its
80 W default in every platform profile, including performance, and
manual fan control is not available.

The board is only listed in omen_thermal_profile_boards[], so the
driver uses the Omen path and sets the profile with SET_PERFORMANCE_MODE
alone. The firmware's handler for that (GM1A) stores the mode byte in
EC register 0x95 (HPCM) and enables NVIDIA cTGP only for the v0
performance value 0x01. The board reports thermal policy v1, so the
driver sends 0x31 and cTGP stays off.

HPCM has no other consumer in the DSDT or the SSDTs. On v1 the firmware
expects cTGP and Dynamic Boost to be set with SET_GPU_THERMAL_MODES
(GM22), which writes NPCF.CTGP and NPCF.DTGP directly. NPCF only
reports the cTGP offset (ACBT = 0xA0, i.e. +20 W) when CTGP is set, and
Dynamic Boost only when DTGP is set. The firmware also implements the
fan speed get/set and fan table methods (GM2D, GM2E, GM2F).

Drop 88D2 from omen_thermal_profile_boards[] and add it to
hp_wmi_feature_boards[] with the omen_v1_legacy thermal parameters,
matching the HPCM offset at 0x95. The board then uses the Victus S
profile path, which sets cTGP and Dynamic Boost according to the
profile, reads the profile back from the EC, and enables manual fan
control and the fan table.

The firmware's SET_POWER_LIMITS handler applies HP_POWER_LIMIT_DEFAULT
as a 0 W CPU limit, which held the CPU at its minimum clock on battery
in the performance profile, so set no_power_limit_reset for this board.

As on the other feature boards, the available profiles change from
cool/balanced/performance to low-power/balanced/performance.

Tested on an OMEN Laptop 15-en1xxx (board 88D2, BIOS F.20, Ryzen 7
5800H, RTX 3070 Laptop GPU). On AC, nvidia-smi reports a 100 W power
limit in performance and 80 W in balanced and low-power, and each
profile reads back correctly. Manual PWM, maximum and automatic fan
modes work through hwmon. Under full CPU load in performance, package
power is about 25 W on battery and returns to about 50 W on AC. Without
no_power_limit_reset it drops below 5 W at 399 MHz on battery.

The firmware analysis and this patch were prepared with the help of an
AI coding assistant (Claude Opus 5.5 in Claude Code). The result was
reviewed and tested on the hardware by the submitter.

Link: https://lore.kernel.org/platform-driver-x86/CA+LW3S2g4E971by7WhfFZGuyLT47141_Zn+eJ=wyqxB_+4G95A@mail.gmail.com/
Fixes: 286e937efbc7 ("platform/x86: hp-wmi: support omen thermal profile policy v1")
Cc: stable@vger.kernel.org
Signed-off-by: David William Richmond Davies-Jones <david@exultantmonkey.co.uk>
---
 drivers/platform/x86/hp/hp-wmi.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
index c7960de7ac0f..f29bdf9639b7 100644
--- a/drivers/platform/x86/hp/hp-wmi.c
+++ b/drivers/platform/x86/hp/hp-wmi.c
@@ -184,6 +184,12 @@ static const struct hp_wmi_board_params omen_v1_legacy_board_params = {
 	.fan_profile		= &victus_s_fan_profile_params,
 };
 
+static const struct hp_wmi_board_params omen_v1_legacy_no_pl_reset_board_params = {
+	.thermal_profile	= &omen_v1_legacy_thermal_params,
+	.fan_profile		= &victus_s_fan_profile_params,
+	.no_power_limit_reset	= true,
+};
+
 static const struct hp_wmi_board_params omen_v1_no_ec_board_params = {
 	.thermal_profile	= &omen_v1_no_ec_thermal_params,
 	.fan_profile		= &victus_s_fan_profile_params,
@@ -214,7 +220,7 @@ static const char * const omen_thermal_profile_boards[] = {
 	"8600", "8601", "8602", "8603", "8604", "8605", "8606", "8607", "860A",
 	"8746", "8747", "8748", "8749", "874A", "8786", "8787", "8788", "878A",
 	"878B", "878C", "87B5",
-	"886B", "886C", "88C8", "88CB", "88D1", "88D2", "88F4", "88F5", "88F6",
+	"886B", "886C", "88C8", "88CB", "88D1", "88F4", "88F5", "88F6",
 	"88F7", "88FD", "88FE", "88FF",
 	"8900", "8901", "8902", "8912", "8917", "8918", "8949", "894A", "89EB",
 	"8A15", "8A17", "8A18", "8A42", "8A43",
@@ -251,6 +257,10 @@ static const char * const victus_thermal_profile_boards[] = {
 
 /* DMI board-specific feature data for Omen and Victus laptops. */
 static const struct dmi_system_id hp_wmi_feature_boards[] __initconst = {
+	{
+		.matches = { DMI_MATCH(DMI_BOARD_NAME, "88D2") },
+		.driver_data = (void *)&omen_v1_legacy_no_pl_reset_board_params,
+	},
 	{
 		.matches = { DMI_MATCH(DMI_BOARD_NAME, "8902") },
 		.driver_data = (void *)&omen_v1_legacy_board_params,
-- 
2.56.1


      parent reply	other threads:[~2026-11-22 23:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-22 23:43 [PATCH v2 0/2] platform/x86: hp-wmi: Fix cTGP and power limits on OMEN 15-en1xxx (88D2) David William Richmond Davies-Jones
2026-11-22 23:43 ` [PATCH v2 1/2] platform/x86: hp-wmi: Allow boards to skip the power limit refresh David William Richmond Davies-Jones
2026-11-22 23:43 ` David William Richmond Davies-Jones [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=20261122234351.278694-3-david@exultantmonkey.co.uk \
    --to=david@exultantmonkey.co.uk \
    --cc=hansg@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=julien.robin28@free.fr \
    --cc=krishna.chomal108@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®