Skip to content

Commit 1f0d8e3

Browse files
mukjoshialexdeucher
authored andcommitted
drm/amdgpu: Reset RAS error count and status regs
Reset the RAS error count and error status registers after reading to prevent over reporting error counts on Aldebaran. Signed-off-by: Mukul Joshi <[email protected]> Reviewed-By: John Clements <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 5f41741 commit 1f0d8e3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,12 @@ static ssize_t amdgpu_ras_sysfs_read(struct device *dev,
501501
if (amdgpu_ras_query_error_status(obj->adev, &info))
502502
return -EINVAL;
503503

504+
505+
if (obj->adev->asic_type == CHIP_ALDEBARAN) {
506+
if (amdgpu_ras_reset_error_status(obj->adev, info.head.block))
507+
DRM_WARN("Failed to reset error counter and error status");
508+
}
509+
504510
return sysfs_emit(buf, "%s: %lu\n%s: %lu\n", "ue", info.ue_count,
505511
"ce", info.ce_count);
506512
}

0 commit comments

Comments
 (0)