Skip to content

Commit 9272bb3

Browse files
committed
drm/amdgpu: suspend KFD and KGD user queues for S0ix
We need to make sure the user queues are preempted so GFX can enter gfxoff. Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org> Tested-by: David Perry <david.perry@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit f8b367e) Cc: stable@vger.kernel.org
1 parent 2ade36e commit 9272bb3

1 file changed

Lines changed: 10 additions & 14 deletions

File tree

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5136,7 +5136,7 @@ int amdgpu_device_suspend(struct drm_device *dev, bool notify_clients)
51365136
adev->in_suspend = true;
51375137

51385138
if (amdgpu_sriov_vf(adev)) {
5139-
if (!adev->in_s0ix && !adev->in_runpm)
5139+
if (!adev->in_runpm)
51405140
amdgpu_amdkfd_suspend_process(adev);
51415141
amdgpu_virt_fini_data_exchange(adev);
51425142
r = amdgpu_virt_request_full_gpu(adev, false);
@@ -5156,10 +5156,8 @@ int amdgpu_device_suspend(struct drm_device *dev, bool notify_clients)
51565156

51575157
amdgpu_device_ip_suspend_phase1(adev);
51585158

5159-
if (!adev->in_s0ix) {
5160-
amdgpu_amdkfd_suspend(adev, !amdgpu_sriov_vf(adev) && !adev->in_runpm);
5161-
amdgpu_userq_suspend(adev);
5162-
}
5159+
amdgpu_amdkfd_suspend(adev, !amdgpu_sriov_vf(adev) && !adev->in_runpm);
5160+
amdgpu_userq_suspend(adev);
51635161

51645162
r = amdgpu_device_evict_resources(adev);
51655163
if (r)
@@ -5254,15 +5252,13 @@ int amdgpu_device_resume(struct drm_device *dev, bool notify_clients)
52545252
goto exit;
52555253
}
52565254

5257-
if (!adev->in_s0ix) {
5258-
r = amdgpu_amdkfd_resume(adev, !amdgpu_sriov_vf(adev) && !adev->in_runpm);
5259-
if (r)
5260-
goto exit;
5255+
r = amdgpu_amdkfd_resume(adev, !amdgpu_sriov_vf(adev) && !adev->in_runpm);
5256+
if (r)
5257+
goto exit;
52615258

5262-
r = amdgpu_userq_resume(adev);
5263-
if (r)
5264-
goto exit;
5265-
}
5259+
r = amdgpu_userq_resume(adev);
5260+
if (r)
5261+
goto exit;
52665262

52675263
r = amdgpu_device_ip_late_init(adev);
52685264
if (r)
@@ -5275,7 +5271,7 @@ int amdgpu_device_resume(struct drm_device *dev, bool notify_clients)
52755271
amdgpu_virt_init_data_exchange(adev);
52765272
amdgpu_virt_release_full_gpu(adev, true);
52775273

5278-
if (!adev->in_s0ix && !r && !adev->in_runpm)
5274+
if (!r && !adev->in_runpm)
52795275
r = amdgpu_amdkfd_resume_process(adev);
52805276
}
52815277

0 commit comments

Comments
 (0)