Commit e6af507d authored by Mario Limonciello's avatar Mario Limonciello Committed by Alex Deucher
Browse files

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: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarMario Limonciello <mario.limonciello@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 2e7ceac0
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;
}