]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amd: Unify shutdown() callback behavior
authorMario Limonciello <mario.limonciello@amd.com>
Thu, 2 Oct 2025 17:42:39 +0000 (12:42 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 13 Oct 2025 18:14:34 +0000 (14:14 -0400)
[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 <alexander.deucher@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

index 7eac510c2d6ff08e159e2316101e82bb35dc3cb1..a36e15beafeb9c8876c24c1158655c928a9787df 100644 (file)
@@ -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;
 }