dmr/amdgpu: Fix crash on SRIOV for ERREVENT_ATHUB_INTERRUPT interrupt.
authorAndrey Grodzovsky <andrey.grodzovsky@amd.com>
Fri, 11 Oct 2019 14:32:59 +0000 (10:32 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 15 Oct 2019 19:51:11 +0000 (15:51 -0400)
Ignre the ERREVENT_ATHUB_INTERRUPT for systems without RAS.

Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-and-tested-by: Jack Zhang <Jack.Zhang1@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_ras.c

index 49bdee9d9fada8beea03fe9593133bafbd8cebff..6220394521e42da5980b4c147417ca41ef183af3 100644 (file)
@@ -1888,6 +1888,12 @@ int amdgpu_ras_fini(struct amdgpu_device *adev)
 
 void amdgpu_ras_global_ras_isr(struct amdgpu_device *adev)
 {
+       uint32_t hw_supported, supported;
+
+       amdgpu_ras_check_supported(adev, &hw_supported, &supported);
+       if (!hw_supported)
+               return;
+
        if (atomic_cmpxchg(&amdgpu_ras_in_intr, 0, 1) == 0) {
                DRM_WARN("RAS event of type ERREVENT_ATHUB_INTERRUPT detected!\n");