Skip to content

Commit

Permalink
drm/amdgpu: skip kfd suspend/resume for S0ix
Browse files Browse the repository at this point in the history
GFX is in gfxoff mode during s0ix so we shouldn't need to
actually tear anything down and restore it.

Acked-by: Evan Quan <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
  • Loading branch information
alexdeucher committed Apr 9, 2021
1 parent 50ec83f commit 5d3a2d9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -3734,7 +3734,8 @@ int amdgpu_device_suspend(struct drm_device *dev, bool fbcon)

r = amdgpu_device_ip_suspend_phase1(adev);

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

/* evict vram memory */
amdgpu_bo_evict_vram(adev);
Expand Down Expand Up @@ -3794,9 +3795,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));

r = amdgpu_amdkfd_resume(adev, adev->in_runpm);
if (r)
return r;
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);
Expand Down

0 comments on commit 5d3a2d9

Please sign in to comment.