]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/amdgpu: suspend KFD and KGD user queues for S0ix
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 17 Sep 2025 16:42:11 +0000 (12:42 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 18 Sep 2025 13:43:30 +0000 (09:43 -0400)
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>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index 0fdfde3dcb9f2f8c295bbba7581e84d8786dca1a..a77000c2e0bbf58d8e628b829077c99230a93fee 100644 (file)
@@ -5200,7 +5200,7 @@ int amdgpu_device_suspend(struct drm_device *dev, bool notify_clients)
        adev->in_suspend = true;
 
        if (amdgpu_sriov_vf(adev)) {
-               if (!adev->in_s0ix && !adev->in_runpm)
+               if (!adev->in_runpm)
                        amdgpu_amdkfd_suspend_process(adev);
                amdgpu_virt_fini_data_exchange(adev);
                r = amdgpu_virt_request_full_gpu(adev, false);
@@ -5220,10 +5220,8 @@ int amdgpu_device_suspend(struct drm_device *dev, bool notify_clients)
 
        amdgpu_device_ip_suspend_phase1(adev);
 
-       if (!adev->in_s0ix) {
-               amdgpu_amdkfd_suspend(adev, !amdgpu_sriov_vf(adev) && !adev->in_runpm);
-               amdgpu_userq_suspend(adev);
-       }
+       amdgpu_amdkfd_suspend(adev, !amdgpu_sriov_vf(adev) && !adev->in_runpm);
+       amdgpu_userq_suspend(adev);
 
        r = amdgpu_device_evict_resources(adev);
        if (r)
@@ -5318,15 +5316,13 @@ int amdgpu_device_resume(struct drm_device *dev, bool notify_clients)
                goto exit;
        }
 
-       if (!adev->in_s0ix) {
-               r = amdgpu_amdkfd_resume(adev, !amdgpu_sriov_vf(adev) && !adev->in_runpm);
-               if (r)
-                       goto exit;
+       r = amdgpu_amdkfd_resume(adev, !amdgpu_sriov_vf(adev) && !adev->in_runpm);
+       if (r)
+               goto exit;
 
-               r = amdgpu_userq_resume(adev);
-               if (r)
-                       goto exit;
-       }
+       r = amdgpu_userq_resume(adev);
+       if (r)
+               goto exit;
 
        r = amdgpu_device_ip_late_init(adev);
        if (r)
@@ -5339,7 +5335,7 @@ exit:
                amdgpu_virt_init_data_exchange(adev);
                amdgpu_virt_release_full_gpu(adev, true);
 
-               if (!adev->in_s0ix && !r && !adev->in_runpm)
+               if (!r && !adev->in_runpm)
                        r = amdgpu_amdkfd_resume_process(adev);
        }