mirror of
https://github.com/torvalds/linux.git
synced 2026-05-01 21:12:29 -04:00
drm/amdgpu: protect RAS sysfs during GPU reset
MMHub EDC becomes dirty after BACO reset EDC registers should be cleared early on in reset phase 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>
This commit is contained in:
committed by
Alex Deucher
parent
cb7adfd6ad
commit
43c4d57618
@@ -281,6 +281,11 @@ static ssize_t amdgpu_ras_debugfs_ctrl_write(struct file *f, const char __user *
|
||||
struct ras_debug_if data;
|
||||
int ret = 0;
|
||||
|
||||
if (amdgpu_ras_intr_triggered()) {
|
||||
DRM_WARN("RAS WARN: error injection currently inaccessible\n");
|
||||
return size;
|
||||
}
|
||||
|
||||
ret = amdgpu_ras_debugfs_ctrl_parse_data(f, buf, size, pos, &data);
|
||||
if (ret)
|
||||
return -EINVAL;
|
||||
@@ -394,6 +399,10 @@ static ssize_t amdgpu_ras_sysfs_read(struct device *dev,
|
||||
.head = obj->head,
|
||||
};
|
||||
|
||||
if (amdgpu_ras_intr_triggered())
|
||||
return snprintf(buf, PAGE_SIZE,
|
||||
"Query currently inaccessible\n");
|
||||
|
||||
if (amdgpu_ras_error_query(obj->adev, &info))
|
||||
return -EINVAL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user