Commit ac5789ef authored by Alex Deucher's avatar Alex Deucher
Browse files

drm/amdgpu: skip kfd suspend/resume for S0ix



GFX is in gfxoff mode during s0ix so we shouldn't need to
actually tear anything down and restore it.

Acked-by: default avatarEvan Quan <evan.quan@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 26470500
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -3710,6 +3710,7 @@ int amdgpu_device_suspend(struct drm_device *dev, bool fbcon)

	r = amdgpu_device_ip_suspend_phase1(adev);

	if (!adev->in_s0ix)
		amdgpu_amdkfd_suspend(adev, adev->in_runpm);

	/* evict vram memory */
@@ -3770,9 +3771,11 @@ int amdgpu_device_resume(struct drm_device *dev, bool fbcon)
	queue_delayed_work(system_wq, &adev->delayed_init_work,
			   msecs_to_jiffies(AMDGPU_RESUME_MS));

	if (!adev->in_s0ix) {
		r = amdgpu_amdkfd_resume(adev, adev->in_runpm);
		if (r)
			return r;
	}

	/* Make sure IB tests flushed */
	flush_delayed_work(&adev->delayed_init_work);