From: Mario Limonciello Date: Thu, 2 Oct 2025 17:42:39 +0000 (-0500) Subject: drm/amd: Unify shutdown() callback behavior X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e6af507de8594a3965cbfba9f70b312d4216d5fb;p=thirdparty%2Flinux.git drm/amd: Unify shutdown() callback behavior [Why] The shutdown() callback uses amdgpu_ip_suspend() which doesn't notify drm clients during shutdown. This could lead to hangs. [How] Change amdgpu_pci_shutdown() to call the same sequence as suspend/resume. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 7eac510c2d6ff..a36e15beafeb9 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -2558,7 +2558,8 @@ amdgpu_pci_shutdown(struct pci_dev *pdev) */ if (!amdgpu_passthrough(adev)) adev->mp1_state = PP_MP1_STATE_UNLOAD; - amdgpu_device_ip_suspend(adev); + amdgpu_device_prepare(dev); + amdgpu_device_suspend(dev, true); adev->mp1_state = PP_MP1_STATE_NONE; }