From: Mike Lothian <mike@fireburn.co.uk>
To: amd-gfx@lists.freedesktop.org, alexander.deucher@amd.com,
christian.koenig@amd.com
Cc: superm1@kernel.org, dri-devel@lists.freedesktop.org,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] drm/amdgpu: runtime resume dGPU on ACPI notify from its own node
Date: Thu, 29 Oct 2026 15:14:21 +0000 [thread overview]
Message-ID: <20261029151422.56791-2-mike@fireburn.co.uk> (raw)
In-Reply-To: <20261029151422.56791-1-mike@fireburn.co.uk>
On BOCO platforms the SBIOS can signal a display hotplug on a powered
off dGPU by notifying the dGPU's ACPI node. On the ASUS ROG Strix G513QY
the USB-C DP alt mode lanes are driven by the Navi 22, and the CPM
D3cold table handles the HPD GPE with only:
Method (_L05) { Notify (\_SB.PCI0.GPP0.VGA, 0x81) }
Nothing in Linux listens on that node: ATIF is bound to the iGPU and the
dGPU node is not an ACPI video bus. If the dGPU is in D3cold when a dock
is attached it stays off, no hotplug reaches userspace, the external
displays stay dark, and the level-triggered GPE keeps firing until the
dock is removed.
Install an ACPI device notify handler on the dGPU's companion when BOCO
is used, and request a runtime resume on 0x81. Runtime resume already
re-detects all links and sends a hotplug event, so the new displays are
picked up; the device autosuspends again if nothing is enabled.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Mike Lothian <mike@fireburn.co.uk>
---
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 +
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 31 ++++++++++++++++++++++++
2 files changed, 32 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 7974f9b7944f..deb63122828d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -641,6 +641,7 @@ struct amdgpu_device {
bool need_swiotlb;
bool accel_working;
struct notifier_block acpi_nb;
+ bool acpi_dgpu_notify;
struct notifier_block pm_nb;
struct amdgpu_i2c_chan *i2c_bus[AMDGPU_MAX_I2C_BUS];
struct debugfs_blob_wrapper debugfs_vbios_blob;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
index 7f5abb03be1b..a4041f90b374 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
@@ -1280,6 +1280,23 @@ static int amdgpu_acpi_event(struct notifier_block *nb,
return amdgpu_atif_handler(adev, entry);
}
+/*
+ * On BOCO platforms the SBIOS signals display hotplug on a powered-off dGPU
+ * (e.g. USB-C DP alt mode HPD wired to the dGPU) with Notify(<dGPU>, 0x81)
+ * on the dGPU's own ACPI node. Nothing else listens there, so wake the
+ * device; runtime resume re-detects all links and sends a hotplug event.
+ */
+static void amdgpu_acpi_dgpu_notify(acpi_handle handle, u32 event, void *data)
+{
+ struct amdgpu_device *adev = data;
+
+ if (event != ACPI_VIDEO_NOTIFY_PROBE)
+ return;
+
+ dev_dbg(adev->dev, "ACPI notify 0x%x, requesting runtime resume\n", event);
+ pm_request_resume(adev->dev);
+}
+
/* Call all ACPI methods here */
/**
* amdgpu_acpi_init - init driver acpi support
@@ -1325,6 +1342,14 @@ int amdgpu_acpi_init(struct amdgpu_device *adev)
adev->acpi_nb.notifier_call = amdgpu_acpi_event;
register_acpi_notifier(&adev->acpi_nb);
+ if (!(adev->flags & AMD_IS_APU) && ACPI_COMPANION(adev->dev) &&
+ adev->pm.rpm_mode == AMDGPU_RUNPM_BOCO)
+ adev->acpi_dgpu_notify =
+ !acpi_dev_install_notify_handler(ACPI_COMPANION(adev->dev),
+ ACPI_DEVICE_NOTIFY,
+ amdgpu_acpi_dgpu_notify,
+ adev);
+
return 0;
}
@@ -1344,6 +1369,12 @@ void amdgpu_acpi_get_backlight_caps(struct amdgpu_dm_backlight_caps *caps)
*/
void amdgpu_acpi_fini(struct amdgpu_device *adev)
{
+ if (adev->acpi_dgpu_notify) {
+ acpi_dev_remove_notify_handler(ACPI_COMPANION(adev->dev),
+ ACPI_DEVICE_NOTIFY,
+ amdgpu_acpi_dgpu_notify);
+ adev->acpi_dgpu_notify = false;
+ }
unregister_acpi_notifier(&adev->acpi_nb);
}
--
2.56.0
next prev parent reply other threads:[~2026-10-29 15:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-29 15:14 [PATCH 0/2] drm/amdgpu: wake a powered-off dGPU on a dock hotplug notify Mike Lothian
2026-10-29 15:14 ` Mike Lothian [this message]
2026-10-29 15:20 ` [PATCH 1/2] drm/amdgpu: runtime resume dGPU on ACPI notify from its own node Mario Limonciello
2026-10-29 16:05 ` Alex Deucher
2026-10-29 15:14 ` [PATCH 2/2] drm/amdgpu: handle broken dGPU hotplug GPE on ASUS ROG Strix G513QY Mike Lothian
2026-10-29 15:24 ` Mario Limonciello
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=20261029151422.56791-2-mike@fireburn.co.uk \
--to=mike@fireburn.co.uk \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=superm1@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®