]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/amdgpu: clear err_event_athub flag after reset exit
authorLe Ma <le.ma@amd.com>
Fri, 25 Oct 2019 09:19:38 +0000 (17:19 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 5 Dec 2019 21:26:11 +0000 (16:26 -0500)
Otherwise next err_event_athub error cannot call gpu reset. And following
resume sequence will not be affected by this flag.

v2: create function to clear amdgpu_ras_in_intr for modularity of ras driver

Signed-off-by: Le Ma <le.ma@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h

index 2957ebf9b97c0e74c13f2165f763f9b76e7bbcba..5a8506182adeb3cef41fd4bdef7909ac00e61108 100644 (file)
@@ -3887,6 +3887,9 @@ static int amdgpu_do_asic_reset(struct amdgpu_device *adev,
                }
        }
 
+       if (!r && amdgpu_ras_intr_triggered())
+               amdgpu_ras_intr_cleared();
+
        list_for_each_entry(tmp_adev, device_list_handle, gmc.xgmi.head) {
                if (need_full_reset) {
                        /* post card */
index a2c1ac1b95727a58dfaaf1100be5ab0b5b5b21ae..d4ade47392455e5810688198e9a6d35711c1f622 100644 (file)
@@ -621,6 +621,11 @@ static inline bool amdgpu_ras_intr_triggered(void)
        return !!atomic_read(&amdgpu_ras_in_intr);
 }
 
+static inline void amdgpu_ras_intr_cleared(void)
+{
+       atomic_set(&amdgpu_ras_in_intr, 0);
+}
+
 void amdgpu_ras_global_ras_isr(struct amdgpu_device *adev);
 
 #endif