On 10/29/26 10:14, Mike Lothian wrote:
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 <[email protected]>
---
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
Although your system is a BOCO platform; I do think this same thing for
this signaling to wakeup could apply to a BACO system too.
+ * (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)
I'd install the notifier for BACO as well.
+ 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);
}