drm/amdgpu: skip kfd-iommu suspend/resume for S0ix
authorAaron Liu <aaron.liu@amd.com>
Wed, 5 Apr 2023 11:22:20 +0000 (19:22 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 14 Apr 2023 17:37:20 +0000 (13:37 -0400)
GFX is in gfxoff mode during s0ix so we shouldn't need to
actually execute kfd_iommu_suspend/kfd_iommu_resume operation.

Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index 97068c4..a2292ac 100644 (file)
@@ -3305,9 +3305,11 @@ static int amdgpu_device_ip_resume(struct amdgpu_device *adev)
 {
        int r;
 
-       r = amdgpu_amdkfd_resume_iommu(adev);
-       if (r)
-               return r;
+       if (!adev->in_s0ix) {
+               r = amdgpu_amdkfd_resume_iommu(adev);
+               if (r)
+                       return r;
+       }
 
        r = amdgpu_device_ip_resume_phase1(adev);
        if (r)