Skip to content

Commit f8b367e

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) <[email protected]> Tested-by: David Perry <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 846de13 commit f8b367e

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

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

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

52025202
if (amdgpu_sriov_vf(adev)) {
5203-
if (!adev->in_s0ix && !adev->in_runpm)
5203+
if (!adev->in_runpm)
52045204
amdgpu_amdkfd_suspend_process(adev);
52055205
amdgpu_virt_fini_data_exchange(adev);
52065206
r = amdgpu_virt_request_full_gpu(adev, false);
@@ -5220,10 +5220,8 @@ int amdgpu_device_suspend(struct drm_device *dev, bool notify_clients)
52205220

52215221
amdgpu_device_ip_suspend_phase1(adev);
52225222

5223-
if (!adev->in_s0ix) {
5224-
amdgpu_amdkfd_suspend(adev, !amdgpu_sriov_vf(adev) && !adev->in_runpm);
5225-
amdgpu_userq_suspend(adev);
5226-
}
5223+
amdgpu_amdkfd_suspend(adev, !amdgpu_sriov_vf(adev) && !adev->in_runpm);
5224+
amdgpu_userq_suspend(adev);
52275225

52285226
r = amdgpu_device_evict_resources(adev);
52295227
if (r)
@@ -5318,15 +5316,13 @@ int amdgpu_device_resume(struct drm_device *dev, bool notify_clients)
53185316
goto exit;
53195317
}
53205318

5321-
if (!adev->in_s0ix) {
5322-
r = amdgpu_amdkfd_resume(adev, !amdgpu_sriov_vf(adev) && !adev->in_runpm);
5323-
if (r)
5324-
goto exit;
5319+
r = amdgpu_amdkfd_resume(adev, !amdgpu_sriov_vf(adev) && !adev->in_runpm);
5320+
if (r)
5321+
goto exit;
53255322

5326-
r = amdgpu_userq_resume(adev);
5327-
if (r)
5328-
goto exit;
5329-
}
5323+
r = amdgpu_userq_resume(adev);
5324+
if (r)
5325+
goto exit;
53305326

53315327
r = amdgpu_device_ip_late_init(adev);
53325328
if (r)
@@ -5339,7 +5335,7 @@ int amdgpu_device_resume(struct drm_device *dev, bool notify_clients)
53395335
amdgpu_virt_init_data_exchange(adev);
53405336
amdgpu_virt_release_full_gpu(adev, true);
53415337

5342-
if (!adev->in_s0ix && !r && !adev->in_runpm)
5338+
if (!r && !adev->in_runpm)
53435339
r = amdgpu_amdkfd_resume_process(adev);
53445340
}
53455341

0 commit comments

Comments
 (0)