diff options
author | John Clements <john.clements@amd.com> | 2021-05-17 16:36:26 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2021-05-19 22:38:11 -0400 |
commit | 8f6368a9c92645e72fdd55862aa09821cdb81b43 (patch) | |
tree | 391e95b9adbd076dccad51e949a3bca23c60ee11 /drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | |
parent | drm/amdgpu: disable 3DCGCG on picasso/raven1 to avoid compute hang (diff) | |
download | linux-dev-8f6368a9c92645e72fdd55862aa09821cdb81b43.tar.xz linux-dev-8f6368a9c92645e72fdd55862aa09821cdb81b43.zip |
drm/amdgpu: Conditionally reset RAS counters on boot
Only clear RAS error counters if perestent EDC harvesting is not supported
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: John Clements <john.clements@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c index 093ab98c31bb..fb3c7588dde3 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c @@ -1268,13 +1268,15 @@ static int gmc_v9_0_late_init(void *handle) } } - if (adev->mmhub.ras_funcs && - adev->mmhub.ras_funcs->reset_ras_error_count) - adev->mmhub.ras_funcs->reset_ras_error_count(adev); - - if (adev->hdp.ras_funcs && - adev->hdp.ras_funcs->reset_ras_error_count) - adev->hdp.ras_funcs->reset_ras_error_count(adev); + if (!amdgpu_persistent_edc_harvesting_supported(adev)) { + if (adev->mmhub.ras_funcs && + adev->mmhub.ras_funcs->reset_ras_error_count) + adev->mmhub.ras_funcs->reset_ras_error_count(adev); + + if (adev->hdp.ras_funcs && + adev->hdp.ras_funcs->reset_ras_error_count) + adev->hdp.ras_funcs->reset_ras_error_count(adev); + } r = amdgpu_gmc_ras_late_init(adev); if (r) |