Commit 30c296e1 authored by John Clements's avatar John Clements Committed by Alex Deucher

drm/amdgpu: resolve ras recovery vs smi race condition

during ras recovery block smu access via smi
Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: default avatarJohn Clements <john.clements@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 8c8e1f69
...@@ -623,6 +623,9 @@ static int arcturus_print_clk_levels(struct smu_context *smu, ...@@ -623,6 +623,9 @@ static int arcturus_print_clk_levels(struct smu_context *smu,
struct smu_dpm_context *smu_dpm = &smu->smu_dpm; struct smu_dpm_context *smu_dpm = &smu->smu_dpm;
struct arcturus_dpm_table *dpm_table = NULL; struct arcturus_dpm_table *dpm_table = NULL;
if (amdgpu_ras_intr_triggered())
return snprintf(buf, PAGE_SIZE, "unavailable\n");
dpm_table = smu_dpm->dpm_context; dpm_table = smu_dpm->dpm_context;
switch (type) { switch (type) {
...@@ -998,6 +1001,9 @@ static int arcturus_read_sensor(struct smu_context *smu, ...@@ -998,6 +1001,9 @@ static int arcturus_read_sensor(struct smu_context *smu,
PPTable_t *pptable = table_context->driver_pptable; PPTable_t *pptable = table_context->driver_pptable;
int ret = 0; int ret = 0;
if (amdgpu_ras_intr_triggered())
return 0;
if (!data || !size) if (!data || !size)
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment