From nobody Mon Nov 23 10:33:13 2026 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=103.168.172.152 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795391068; b=wA7xWIqolIWtslOzo2W4xw4MYR1KSdGqm9/RlS2oFn3m2d2oKSi6pHZ/rA0gDYF2OYVU Ugc45Pqm4wYuSWZiA+hvD7KAnOyPpkSvS4alo0Nk0imujqqYNGrj8IE+xVbgMTIFOZDX4 8TGPCqWL+FkiNIxALdY/NWNgDZnBFk8lhVWG+Nbv+feVcNKEuWZynGH5+9bYtSZHCGLFG BxHGAtR4LjzrD4AVfAC76Pt1I6NMG5KfjclcSkJaUBRh+VdyeEN066y/cTpE2RSzUNMk0 CMzuqCQfnFpUjo+NvPybkQaiAU8PBPHg52FaJYLjUWjN2osm2PD+jUYwY5EHRFxKzaA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795391068; h=DMARC-Filter:Received:Received:DKIM-Signature:DKIM-Signature: X-DKIM2-Info:DKIM2-Signature:X-DKIM2-Info:Message-Instance: X-ME-Sender:X-ME-Received:X-ME-Proxy-Cause:X-ME-Proxy:Feedback-ID: Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding; bh=gH7EtxdhRpEU2MDW4hrWT+jWSZ8U1Mg83JMafbjW5/8=; b=PCPqMFaHnWboDHSuOo+0MexGyEYhI4mqCIhO7hqUe7Zwu8SHGJSrNEwqX9tX+OLSBY7O +8+K+SGJKB4DzVWI25hLOX1a1rQTdgVruwg3baLeeBF6SfV5yTf7rqLD659mpm4tNJhkd OJVCrKoYPGcihVIzwZGAejUpHCMKJKOCQ9Mc4MGZG/Br8EHbsmsdylcYKq2CQSgb1bcuo bf8J3k3VjTYE/h0pOotCN5SIA6TFlaKBGFS+y06HecGxZNNSaH2AWm5dx7OQ4OG4cDHyu WNEjwm8E0fqT9eUZRwt5JCPW2SXP3YpKMNF7+IpXtTNsDxdrQySE2M3SwKSBbOWRqlQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=exultantmonkey.co.uk; spf=pass smtp.mailfrom=exultantmonkey.co.uk; dkim=pass header.d=exultantmonkey.co.uk header.i=@exultantmonkey.co.uk header.a=rsa-sha256 header.s=fm2 header.b=RKf3avQE; dkim=pass header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=hBN6CAaQ; arc=none smtp.remote-ip=103.168.172.152 Received: from fhigh-a1-smtp.messagingengine.com (fhigh-a1-smtp.messagingengine.com [103.168.172.152]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 76AC6606A331 for ; Sun, 22 Nov 2026 23:44:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 76AC6606A331 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=exultantmonkey.co.uk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=exultantmonkey.co.uk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=exultantmonkey.co.uk header.i=@exultantmonkey.co.uk header.a=rsa-sha256 header.s=fm2 header.b=RKf3avQE; dkim=pass (2048-bit key, unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=hBN6CAaQ Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfhigh.phl.internal (Postfix) with ESMTP id ACBD61400282 for ; Sun, 22 Nov 2026 18:44:27 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-01.internal (MEProxy); Sun, 22 Nov 2026 18:44:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= exultantmonkey.co.uk; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to; s=fm2; t=1795391067; x=1795477467; bh=gH7EtxdhRpEU2MDW4hrWT +jWSZ8U1Mg83JMafbjW5/8=; b=RKf3avQE1E9u62mSpc0XlsxfhchrKeHyMZja7 GKm9mWVreHOsOMHJpy1USPzUwRIwIefw9z85XaaAAobaGxrGw7UoLs6xjmgEozKc EDPFN1J1M9RwMLQ8U9MxHiXAIDwx/ZFpWVscbSfe8IUzk8zbQVQbv9GQ+TcC+//x f8vbsMpo9UBfDGi610ss4o01Z9TcKNTurQVopdsiCWhjJwrdVHcnPk/cdIiXy9Cb avaqrLSf3Sv2Kie8vO/7TmFqaYiBmS0hKHvS6ClpnTf3OtYFa75anJxSlHdidA7Q rDAjHQ0TUWF3EOZUAUUFW4Q/f9p9nvqiwvlqQg2h/pNSXVCrQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1795391067; x=1795477467; bh=g H7EtxdhRpEU2MDW4hrWT+jWSZ8U1Mg83JMafbjW5/8=; b=hBN6CAaQHbXvF29pN 69SrajU77ciHVgJFVZ7XEF3Z9viD+Tp+6rUNgTGHy3FT0KYgumbddk77NjU/Iv2l 2EghLQgRVouH2VPYUMvv/oYEEO4Z84TVEAYupAg0f5lrBsY21Nx+Iu9pNmFdAbcM ZgGNPvxIpsdR4KWsPncAUUC3vTTTUtgnFdZXTA3nl7HO8JPKovoDmUrzNM0O0Bll NMJqWIy8OjcY9fPo7c7a/Pdqhpu7Hdm7fgZrgkgRbJvWThbhOvFQZdIXZeUsQhx7 +g5gUtcvr74XmKF9EhzY6EdEVyw5KnF6ExmmWkP5NGEd+uhhWTVsJvCOP5gWRKJ5 JlhoA== X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-09; repo=github.com/dkim2wg/interop; date=2026-11-03; sw=lmtpprox; action=sign d=exultantmonkey.co.uk a=rsa-sha256; DKIM2-Signature: i=1; m=1; t=1795391067; d=exultantmonkey.co.uk; mf=PGRhdmlkQGV4dWx0YW50bW9ua2V5LmNvLnVrPg==; rt=PGxpbnV4LWtlcm5lbEB2Z2VyLmtlcm5lbC5vcmc+; s=fm2:rsa-sha256:laZf5w/5GbVfYG+AKcI7Aw81oN8Z7zIxL0gcrKSQRQdI5Sa Uo5YVOmabljoNQRQZqA2r8wxA587yLtlcGMCIrNb9iBtOmJtQaToUoh7fHPDxVOr k87zwYDJ9hl/u2EYjLWUrUHBTneMB7p4trDtGdtnQ1vxPLibQNaDfMcElt9Yl9Rf rxUBuc4o16Wf7ydYcITPNJJ1QxOZ2GcKLW9muh59v3D5ioaXt36mXdhjoTsV107e 99qz3/tmc4ee1E9hbHtR4dU+lXEmqd3tFF08kHiYqtScMuNCPvOaEcSeVvRcrAVH +Cii0LC9a8JauyD3wR3Yp/TguKadJZQiaCSnlsg==; X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-09; repo=github.com/dkim2wg/interop; date=2026-11-03; sw=lmtpprox; action=mi-m=1; hc=11; hn=cc,content-transfer-encoding,date,feedback-id,from, in-reply-to,message-id,mime-version,references,subject,to; Message-Instance: m=1; h=sha256:c06JG9f1QNXedOZXdZvZ+buVuri/XRlpKKPnM9d/008=:rRB1ZVCmFGM9DQVRDAU1tDDlupGA2lWEbhrEND/c6YU=; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTE4OpePBGOUQ/MZgyKT2LmGBTDGwgt9T7ktp1L+2PY1eiQclgBluVmRQpzEebEkIt TQaAZLWyRbTBtMLB92ODl/Zr7OCdAVyUO+KeZmyAVHi45p5YJ06CI7J2hr3IQCTvR+y2ku 4jUOZXeiIkb+fOBTdMLQM1O4BdwrB51MNJ1bj/WgB7Epx4R1fWxVsc3A17xDKkRGyPIMgf J4Eyjodzh0ePccQJDTpRaNUlPslTpUCRENMth2f3vDbStCRlZ56kgbE9hT4ZkwT2iIAxM6 xkvpoLDoijMFr8QemJ82fWkP7aHowDv1+IEGckxXVCMGgGBz/3DJqlWfKTfEILfi7zeBib rPg/1PXftG00mcR3WvNoYOKihv6DrjLftC/psNho+/D9dux5Aawwi+8AKTfEzO2q3EoyhE q21IALgFTzF3N/fL2m0SSrNJUSQ/2M+Ht67QakPdiAts8rZ00MGG6PglCqBv+8LjBv8IzE wsoJQXnHLw/6mocuUG4QC3l47GDi1tfGtvyooj8c9i/volT09sr8GCcC6xeuNdyjcNvteg cJsoOqa7G44AgGq5KJHDaehNvm09oSn4KCjL6znHM5y4fdWS8qa5uU+BwvN8tidfPvfYZP yb0oEv44C77hVj3rxbxJ8NTh9eFEQj+utcp2qHK2v0XHNHl9h8Ful/ROICbw X-ME-Proxy: Feedback-ID: i8d5147ae:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 22 Nov 2026 18:44:26 -0500 (EST) From: David William Richmond Davies-Jones To: Hans de Goede , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Cc: Krishna Chomal , Julien ROBIN , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, David William Richmond Davies-Jones , stable@vger.kernel.org Subject: [PATCH v2 1/2] platform/x86: hp-wmi: Allow boards to skip the power limit refresh Date: Sun, 22 Nov 2026 23:43:50 +0000 Message-ID: <20261122234351.278694-2-david@exultantmonkey.co.uk> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261122234351.278694-1-david@exultantmonkey.co.uk> References: <20261122234351.278694-1-david@exultantmonkey.co.uk> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" When the power source changes while the performance profile is active, victus_s_powersource_event() refreshes the CPU power limits by sending SET_POWER_LIMITS with PL1 and PL2 set to HP_POWER_LIMIT_DEFAULT (0). This was added for the Victus 16-s1034nf (board 8C9C), whose firmware treats 0 as "restore the defaults". Not all firmware does. On the OMEN 15-en1xxx (board 88D2, AMD Ryzen 7 5800H) the SET_POWER_LIMITS handler (GM29) multiplies both values by 1000 and passes them to ALIB function 0x0C as the SPPT and FPPT limits whenever the EC power level (OCPC) is 0, the highest level: Local2 *=3D 0x03E8 Local3 *=3D 0x03E8 If ((^^PCI0.SBRG.EC0.OCPC =3D=3D Zero)) { DPTC (0x05, Local2) DPTC (0x07, Local3) } Under full load in the performance profile on battery this holds the CPU at 399 MHz and below 5 W. This firmware already sets these limits itself on power source changes. The EC query handler that notifies the AC device (_Q20) also applies them according to the adapter state and the EC power level: 25 W on battery and up to 54 W on AC. On such boards the refresh is unnecessary as well as harmful. Add a no_power_limit_reset flag to struct hp_wmi_board_params so such boards can skip the refresh. No board sets it yet. 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. Cc: stable@vger.kernel.org Signed-off-by: David William Richmond Davies-Jones --- drivers/platform/x86/hp/hp-wmi.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-= wmi.c index 0069af86800e..c7960de7ac0f 100644 --- a/drivers/platform/x86/hp/hp-wmi.c +++ b/drivers/platform/x86/hp/hp-wmi.c @@ -154,6 +154,12 @@ struct hp_wmi_fan_profile_params { struct hp_wmi_board_params { const struct thermal_profile_params *thermal_profile; const struct hp_wmi_fan_profile_params *fan_profile; + /* + * Set when SET_POWER_LIMITS applies HP_POWER_LIMIT_DEFAULT as a literal + * 0 W CPU limit instead of restoring the defaults, so the power limits + * must not be refreshed on power source changes. + */ + bool no_power_limit_reset; }; =20 static int hp_wmi_get_fan_speed_victus_s(int fan); @@ -2621,7 +2627,8 @@ static int victus_s_powersource_event(struct notifier= _block *nb, * Seen on HP 16-s1034nf (board 8C9C) with F.11 and F.13 BIOS versions. */ =20 - if (actual_profile =3D=3D PLATFORM_PROFILE_PERFORMANCE) { + if (actual_profile =3D=3D PLATFORM_PROFILE_PERFORMANCE && + !active_board_params->no_power_limit_reset) { pr_debug("Triggering CPU PL1/PL2 actualization\n"); err =3D victus_s_set_cpu_pl1_pl2(HP_POWER_LIMIT_DEFAULT, HP_POWER_LIMIT_DEFAULT); --=20 2.56.1 From nobody Mon Nov 23 10:33:13 2026 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=103.168.172.152 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795391078; b=xJO1KfpzTtnEc377c1UdT+PYRr/GY4i3CyZPJAu5v0IQV0Bk/BlzuOoo0goSWBqYr+ge tJVq3XLZwSC3O6T/MZzu6kUjriTjJw0R71d7K9Od7J1cns9fsYegn/UlTcladgbNehzBL 0DK0kPoSRmUUqQv9Cqn5oXANPVX3dgioKa6zGosPZBRj7wyaC1cKUM8DvTu/bkCDjb9+r Cd1QRoqWOl4xgqoV3c6bh9uZ3M4zy00reVZiAqF/h/ghswWhO0Yrl3ESda7hTq+9poqj7 LzBOdyMJj8OThb9SU2hXPJvu90c2/dCmQiMFCkezE7MM53o+SmgkQTZlRxxfpInBgpA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795391078; h=DMARC-Filter:Received:Received:DKIM-Signature:DKIM-Signature: X-DKIM2-Info:DKIM2-Signature:X-DKIM2-Info:Message-Instance: X-ME-Sender:X-ME-Received:X-ME-Proxy-Cause:X-ME-Proxy:Feedback-ID: Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding; bh=k/T26OxvbNctIsKGzjvokIqLK02u3kx0ZSGmrsNkkuI=; b=Zjxvpjnoe4A0eObuJLh5wh49oXxb+2u8BUXDUBVmwbiLGXGuLjFuJMcjcfhEx5gosh84 C+Ur/EWtpxo0X5cqvn5XigDgzVGLSZVPWxRLmEKSl6AVlm6g0GeQ31bs0Cx4sGLenWLy2 JuwSXKJjuVyTokPsmv29JOMAtVdzC1U8JzBe2Hed7gVt+8diIhqeTWQw8Hb1lS1S33CMb 8zuDu6vniqS32QrqkgI9jXYkF4UtnDH7YAYYnlf//U7GJWBd+A0L7UThbeF4WfJHt2UAB rZg90WdnE0Uo9r5pVUUvkd1XE6XMpmTxR5dZfi5pskRGagKtX/tFNlTTLNUjY+UVSOg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=exultantmonkey.co.uk; spf=pass smtp.mailfrom=exultantmonkey.co.uk; dkim=pass header.d=exultantmonkey.co.uk header.i=@exultantmonkey.co.uk header.a=rsa-sha256 header.s=fm2 header.b=D67+4kaC; dkim=pass header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=g4iG4yrV; arc=none smtp.remote-ip=103.168.172.152 Received: from fhigh-a1-smtp.messagingengine.com (fhigh-a1-smtp.messagingengine.com [103.168.172.152]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2519E606A31D for ; Sun, 22 Nov 2026 23:44:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2519E606A31D Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=exultantmonkey.co.uk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=exultantmonkey.co.uk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=exultantmonkey.co.uk header.i=@exultantmonkey.co.uk header.a=rsa-sha256 header.s=fm2 header.b=D67+4kaC; dkim=pass (2048-bit key, unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=g4iG4yrV Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id 5BA52140028F for ; Sun, 22 Nov 2026 18:44:37 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-04.internal (MEProxy); Sun, 22 Nov 2026 18:44:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= exultantmonkey.co.uk; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to; s=fm2; t=1795391077; x=1795477477; bh=k/T26OxvbNctIsKGzjvok IqLK02u3kx0ZSGmrsNkkuI=; b=D67+4kaCUB6PKAk8c1gJm/oZmZOr/RB+rPh5J f8fIcQmctfEQpwN3mJfYNp6fLrtxWBw85i5iBpZRk9sjb6LjfmHxbQMTr8FYaiBN nUhK8F2E2qOTPLIxhKkOmrqhyMkRkjbum+j06+oe02WWy+M4/B7ytYq/7RGezdcU aOwFr2ZH8YB/FDCMLx/x0LpMQrTKTKByiZa/cI8DNs2CDEdLs5yJu3Y3lI+Hwlxx Vu26qaCmcTsd8KsQKNgFQuPdCQDbxX7W/uWo5KMspU5sVhVOn551f/Rq8KTpejzb 0A0VHFdcaUQI6PiNMX1ARn/i5drFvMC0R3f7TFbOnViA7e5Eg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1795391077; x=1795477477; bh=k /T26OxvbNctIsKGzjvokIqLK02u3kx0ZSGmrsNkkuI=; b=g4iG4yrVJCC9uDwPU +gyqPN/KHa2UchUfCnTEee/pK/z1i1vtppq9g2B3xMYOl6zDguE+1qbI3Sh2ZmAD 6Y3g/wAstksosnwufQMUJuhT2z+Ol35S1S2XZNLiLkRMx+hoSLyLGBJ8ij+Lg3ly Agr/R8qporWuZtz4My5I/TpMsMyjpahbrr98KTNevGluI8qJWXqrLmUNUkGHyX0F pGXvieNokZ4kJZtcMkMv5VWC4ncbj19+x6XP+Kv5ZFik1ry6XlBLQm9xST50ko11 xZYKtYh3ktZelIQbXIvHjyPGOwn41cGl4SGPpJcQDd0LtRIfojt1Tl4RpE8CpnMG F/a4A== X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-09; repo=github.com/dkim2wg/interop; date=2026-11-03; sw=lmtpprox; action=sign d=exultantmonkey.co.uk a=rsa-sha256; DKIM2-Signature: i=1; m=1; t=1795391077; d=exultantmonkey.co.uk; mf=PGRhdmlkQGV4dWx0YW50bW9ua2V5LmNvLnVrPg==; rt=PGxpbnV4LWtlcm5lbEB2Z2VyLmtlcm5lbC5vcmc+; s=fm2:rsa-sha256:Of3RqloSaZBESqk9wEFAlhfglHJOGhYmORso42Ec7FbXqpW ya2O4/JqoSi5c9vlvttcsjEdKMilOn3evbZCM/Z2jrUYRo+Vm21V7y2JydDWodgJ PDp69T5n/Jk2ZdhPbJT4vRuivw/TwO5CvXgz/pmPwUeDEZK0ShFHNqai4CgFViNU kkOlbbLI0gh83WY08bRfhqNq/JyxRvthZ2YABN5nYQ6IWOXI/OXa9IPf0u9KusG7 p7jt28oKcGHrR7nZQPFDws/dRC+YqhyFhKExDCez0ptFCD+/We1/TFDwjWI8CG+M RXqQP9s1V+Cnw42bhqtSNQhkz7jGNFWAMAPJ/bQ==; X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-09; repo=github.com/dkim2wg/interop; date=2026-11-03; sw=lmtpprox; action=mi-m=1; hc=11; hn=cc,content-transfer-encoding,date,feedback-id,from, in-reply-to,message-id,mime-version,references,subject,to; Message-Instance: m=1; h=sha256:fOHYAzEW3P8qkxybIoh1URCJLF9/pIbGOREh8QGWm2o=:Bsl5btFfgbKOsXe6vKvtpw4Mv+QDBq2MsHuGMUSy+lE=; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTFYWImQZD5h/0h2BDkRJnm+1ULP7PkoTxZhqi02ukXjOFk6st1R0JV8LW2xp1xXP0 wRcoRn0ncjlsgSsEIAgRXwIjEpdInNWiVEMD9fRNCUNSeUr8+a5+eJy1V6xfO8svGHH2yB UBtKsYeRWOSpt7VUzUt3iNrDbnN4BhWbJaewO8TVpMsRJu+soneOayUFOSwnPp6rWhSaiO 01mPGmQ4Oc7OCJQwmyj0tlNE1MMUqSm3H3ql7tpcvgCqeqaRLbThRg+awU2v9uZyU91X4Z EiHXN5mNQmdKYzryyECRusQIuGEaLnSFobRPZxOVqPXkidXO8Zkzg64BPQkKbv55yPs/qL XcTC3gxQtkTN3vQW94Auz3bwr7pwxNRUtYMC8geQNquYBjaThWtJ4pxjPsYOY+XoEVALLF mpkMsGW8TN/FIkITzEhPMjuVUivTSd43+m7kfTf/2ktJ76mSPMKnJVKnXy4d8ImZg2TkGc H4mm70pc6NuaRoUbz3jUUuJdnGBi8xj5j0jT9q1qPg0HhXP5PhuZ3LVzKLXXf8sAKhjlcv hDX7IiSusiUx1kvD6eUdDOZ2u66/gg1n4R6E+B4HZprNoKqg7luz/5eHd1LUT2YGa3ZqqD JSiJcQfN0tVoX2BW2knpxeXhhD+kp8R4NOCsxgiADgebCxUeL6YyKXUCUW4g X-ME-Proxy: Feedback-ID: i8d5147ae:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 22 Nov 2026 18:44:36 -0500 (EST) From: David William Richmond Davies-Jones To: Hans de Goede , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Cc: Krishna Chomal , Julien ROBIN , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, David William Richmond Davies-Jones , 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 Message-ID: <20261122234351.278694-3-david@exultantmonkey.co.uk> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261122234351.278694-1-david@exultantmonkey.co.uk> References: <20261122234351.278694-1-david@exultantmonkey.co.uk> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 =3D 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+LW3S2g4E971by7WhfFZGuy= LT47141_Zn+eJ=3DwyqxB_+4G95A@mail.gmail.com/ Fixes: 286e937efbc7 ("platform/x86: hp-wmi: support omen thermal profile po= licy v1") Cc: stable@vger.kernel.org Signed-off-by: David William Richmond Davies-Jones --- 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 =3D { .fan_profile =3D &victus_s_fan_profile_params, }; =20 +static const struct hp_wmi_board_params omen_v1_legacy_no_pl_reset_board_p= arams =3D { + .thermal_profile =3D &omen_v1_legacy_thermal_params, + .fan_profile =3D &victus_s_fan_profile_params, + .no_power_limit_reset =3D true, +}; + static const struct hp_wmi_board_params omen_v1_no_ec_board_params =3D { .thermal_profile =3D &omen_v1_no_ec_thermal_params, .fan_profile =3D &victus_s_fan_profile_params, @@ -214,7 +220,7 @@ static const char * const omen_thermal_profile_boards[]= =3D { "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_board= s[] =3D { =20 /* DMI board-specific feature data for Omen and Victus laptops. */ static const struct dmi_system_id hp_wmi_feature_boards[] __initconst =3D { + { + .matches =3D { DMI_MATCH(DMI_BOARD_NAME, "88D2") }, + .driver_data =3D (void *)&omen_v1_legacy_no_pl_reset_board_params, + }, { .matches =3D { DMI_MATCH(DMI_BOARD_NAME, "8902") }, .driver_data =3D (void *)&omen_v1_legacy_board_params, --=20 2.56.1