From: Marco Scardovi <scardracs@disroot.org>
To: "Corentin Chary" <corentin.chary@gmail.com>,
"Luke D . Jones" <luke@ljones.dev>,
"Denis Benato" <denis.benato@linux.dev>,
"Hans de Goede" <hansg@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org,
Marco Scardovi <scardracs@disroot.org>
Subject: [PATCH 2/3] platform/x86: asus-armoury: Add dgpu_power_state attribute
Date: Wed, 5 Aug 2026 20:28:07 +0200 [thread overview]
Message-ID: <20260805183131.3075-3-scardracs@disroot.org> (raw)
In-Reply-To: <20260805183131.3075-1-scardracs@disroot.org>
Add support for WMI device ID 0x00120097 (ASUS_WMI_DEVID_DGPU_POWER_STATE)
in the asus-armoury driver. This exposes a read-only sysfs attribute
'dgpu_power_state' under the firmware_attributes class to query the
discrete GPU power state (0: D3 cold, 1: D0 active).
Suggested-by: Denis Benato <denis.benato@linux.dev>
Signed-off-by: Marco Scardovi <scardracs@disroot.org>
---
drivers/platform/x86/asus-armoury.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/platform/x86/asus-armoury.c b/drivers/platform/x86/asus-armoury.c
index 93d9665717af..f745924af8a8 100644
--- a/drivers/platform/x86/asus-armoury.c
+++ b/drivers/platform/x86/asus-armoury.c
@@ -786,6 +786,8 @@ ASUS_ATTR_GROUP_BOOL_RW(screen_auto_brightness, "screen_auto_brightness",
"Set the panel brightness to Off<0> or On<1>");
ASUS_ATTR_GROUP_BOOL_RO(egpu_connected, "egpu_connected", ASUS_WMI_DEVID_EGPU_CONNECTED,
"Show the eGPU connection status");
+ASUS_ATTR_GROUP_BOOL_RO(dgpu_power_state, "dgpu_power_state", ASUS_WMI_DEVID_DGPU_POWER_STATE,
+ "Show the dGPU power state (0: D3 cold, 1: D0 active)");
ASUS_ATTR_GROUP_ROG_TUNABLE(ppt_pl1_spl, ATTR_PPT_PL1_SPL, ASUS_WMI_DEVID_PPT_PL1_SPL,
"Set the CPU slow package limit");
ASUS_ATTR_GROUP_ROG_TUNABLE(ppt_pl2_sppt, ATTR_PPT_PL2_SPPT, ASUS_WMI_DEVID_PPT_PL2_SPPT,
@@ -810,6 +812,7 @@ static const struct asus_attr_group armoury_attr_groups[] = {
{ &egpu_connected_attr_group, ASUS_WMI_DEVID_EGPU_CONNECTED },
{ &egpu_enable_attr_group, ASUS_WMI_DEVID_EGPU },
{ &dgpu_disable_attr_group, ASUS_WMI_DEVID_DGPU },
+ { &dgpu_power_state_attr_group, ASUS_WMI_DEVID_DGPU_POWER_STATE },
{ &apu_mem_attr_group, ASUS_WMI_DEVID_APU_MEM },
{ &ppt_pl1_spl_attr_group, ASUS_WMI_DEVID_PPT_PL1_SPL },
--
2.55.0
next prev parent reply other threads:[~2026-08-05 18:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-05 18:28 [PATCH 0/3] platform/x86: asus-armoury: Add dgpu_power_state and check in dgpu_disable Marco Scardovi
2026-08-05 18:28 ` [PATCH 1/3] platform/x86: asus-wmi: Add ASUS_WMI_DEVID_DGPU_POWER_STATE define Marco Scardovi
2026-08-05 18:28 ` Marco Scardovi [this message]
2026-08-05 18:28 ` [PATCH 3/3] platform/x86: asus-armoury: Prevent disabling dGPU when in use Marco Scardovi
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=20260805183131.3075-3-scardracs@disroot.org \
--to=scardracs@disroot.org \
--cc=corentin.chary@gmail.com \
--cc=denis.benato@linux.dev \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luke@ljones.dev \
--cc=platform-driver-x86@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®