Skip to contentSkip to conversation

drm/amd: Suspend drm clients during shutdown()

PATCH New Mario Limonciello (AMD) 1 participant 1 message Sep 12, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd: Suspend drm clients during shutdown()

If the drm device is used for displaying the console then writing to the console could potentially cause a hang on the system if DCN is in IPS. This is more likely to happen after commit 6ea9a1781c70a ("Flush console log from kernel_power_off()") which has caused the console to get flushed at shutdown.

As part of the amdgpu shutdown callback drm clients must be suspended to prevent this. Add an explicit call for the shutdown sequence.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +2 -0
index 985ab240e4bb0..5d8254d5ee1c5 100644
@@ -24,6 +24,7 @@
 
 #include <drm/amdgpu_drm.h>
 #include <drm/clients/drm_client_setup.h>
+#include <drm/drm_client_event.h>
 #include <drm/drm_drv.h>
 #include <drm/drm_fbdev_ttm.h>
 #include <drm/drm_gem.h>
@@ -2551,6 +2552,7 @@ amdgpu_pci_shutdown(struct pci_dev *pdev)
 	 */
 	if (!amdgpu_passthrough(adev))
 		adev->mp1_state = PP_MP1_STATE_UNLOAD;
+	drm_client_dev_suspend(dev, false);
 	amdgpu_device_ip_suspend(adev);
 	adev->mp1_state = PP_MP1_STATE_NONE;
 }
Signature · 1 line
2.43.0