drm/amdgpu: Conditionally reset SDMA RAS error counts
authorMukul Joshi <mukul.joshi@amd.com>
Tue, 29 Jun 2021 20:34:10 +0000 (16:34 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 1 Jul 2021 04:05:41 +0000 (00:05 -0400)
Reset SDMA RAS error counts during init only if persistent
EDC harvesting is not supported.

Signed-off-by: Mukul Joshi <mukul.joshi@amd.com>
Reviewed-by: John Clements <john.clements@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c

index f6881d9..8931000 100644 (file)
@@ -1896,8 +1896,11 @@ static int sdma_v4_0_late_init(void *handle)
 
        sdma_v4_0_setup_ulv(adev);
 
-       if (adev->sdma.funcs && adev->sdma.funcs->reset_ras_error_count)
-               adev->sdma.funcs->reset_ras_error_count(adev);
+       if (!amdgpu_persistent_edc_harvesting_supported(adev)) {
+               if (adev->sdma.funcs &&
+                   adev->sdma.funcs->reset_ras_error_count)
+                       adev->sdma.funcs->reset_ras_error_count(adev);
+       }
 
        if (adev->sdma.funcs && adev->sdma.funcs->ras_late_init)
                return adev->sdma.funcs->ras_late_init(adev, &ih_info);