drm/amdgpu/irq: Move irq resume to the beginning
authorEmily Deng <Emily.Deng@amd.com>
Mon, 7 Aug 2023 05:08:43 +0000 (13:08 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 9 Aug 2023 13:46:04 +0000 (09:46 -0400)
Need to move irq resume to the beginning of reset sriov, or if
one interrupt occurs before irq resume, then the irq won't work anymore.

Signed-off-by: Emily Deng <Emily.Deng@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index 4f818f13dc9d6f1e03e9c76b8d7da4e840cc1987..aa171db68639f34a6ba9a17cec4fa177eeecf81c 100644 (file)
@@ -4537,6 +4537,7 @@ retry:
                r = amdgpu_virt_reset_gpu(adev);
        if (r)
                return r;
+       amdgpu_irq_gpu_reset_resume_helper(adev);
 
        /* some sw clean up VF needs to do before recover */
        amdgpu_virt_post_reset(adev);
@@ -4566,7 +4567,6 @@ retry:
                amdgpu_put_xgmi_hive(hive);
 
        if (!r) {
-               amdgpu_irq_gpu_reset_resume_helper(adev);
                r = amdgpu_ib_ring_tests(adev);
 
                amdgpu_amdkfd_post_reset(adev);