]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amdgpu: Move ras resume into SRIOV function
authorYunxiang Li <Yunxiang.Li@amd.com>
Fri, 26 Apr 2024 03:15:28 +0000 (23:15 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 2 May 2024 19:44:02 +0000 (15:44 -0400)
This is part of the reset, move it into the reset function.

Signed-off-by: Yunxiang Li <Yunxiang.Li@amd.com>
Reviewed-by: Emily Deng <Emily.Deng@amd.com>
Reviewed-by: Zhigang Luo <zhigang.luo@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index b23645f23a2e3d1425c52f3e9f8c229e918c54df..e91ac50a3c8c0ac99e046183313ccc0ea725564d 100644 (file)
@@ -5123,6 +5123,11 @@ static int amdgpu_device_reset_sriov(struct amdgpu_device *adev,
        amdgpu_amdkfd_post_reset(adev);
        amdgpu_virt_release_full_gpu(adev, true);
 
+       /* Aldebaran and gfx_11_0_3 support ras in SRIOV, so need resume ras during reset */
+       if (amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(9, 4, 2) ||
+           amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(9, 4, 3) ||
+           amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(11, 0, 3))
+               amdgpu_ras_resume(adev);
        return 0;
 }
 
@@ -5829,13 +5834,6 @@ retry:   /* Rest of adevs pre asic reset from XGMI hive. */
                }
                if (r)
                        adev->asic_reset_res = r;
-
-               /* Aldebaran and gfx_11_0_3 support ras in SRIOV, so need resume ras during reset */
-               if (amdgpu_ip_version(adev, GC_HWIP, 0) ==
-                           IP_VERSION(9, 4, 2) ||
-                   amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(9, 4, 3) ||
-                   amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(11, 0, 3))
-                       amdgpu_ras_resume(adev);
        } else {
                r = amdgpu_do_asic_reset(device_list_handle, reset_context);
                if (r && r == -EAGAIN)