diff options
author | John Clements <john.clements@amd.com> | 2021-09-23 16:36:09 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2021-09-23 16:35:04 -0400 |
commit | 73490d26588443ba95cfcca00b6ac2267718fcdd (patch) | |
tree | 40ce0714055e0c294eb62c65dcc92777360ae74c /drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | |
parent | 22f4f4faf337d5fb2d2750aff13215726814273e (diff) | |
download | linux-73490d26588443ba95cfcca00b6ac2267718fcdd.tar.bz2 |
drm/amdgpu: Consolidate RAS cmd warning messages
Explicity post warning if cmd is issued against unsupported IP
Update to latest RAS TA interface
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/amdgpu_psp.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index 7d09b28889af..55ffc3da89ce 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c @@ -1311,6 +1311,11 @@ int psp_ras_invoke(struct psp_context *psp, uint32_t ta_cmd_id) else if (ras_cmd->ras_out_message.flags.reg_access_failure_flag) dev_warn(psp->adev->dev, "RAS internal register access blocked\n"); + + if (ras_cmd->ras_status == TA_RAS_STATUS__ERROR_UNSUPPORTED_IP) + dev_warn(psp->adev->dev, "RAS WARNING: cmd failed due to unsupported ip\n"); + else if (ras_cmd->ras_status) + dev_warn(psp->adev->dev, "RAS WARNING: ras status = 0x%X\n", ras_cmd->ras_status); } return ret; @@ -1339,9 +1344,6 @@ int psp_ras_enable_features(struct psp_context *psp, if (ret) return -EINVAL; - if (ras_cmd->ras_status) - dev_warn(psp->adev->dev, "RAS WARNING: ras status = 0x%X\n", ras_cmd->ras_status); - return 0; } @@ -1484,10 +1486,8 @@ int psp_ras_trigger_error(struct psp_context *psp, if (amdgpu_ras_intr_triggered()) return 0; - if (ras_cmd->ras_status) { - dev_warn(psp->adev->dev, "RAS WARNING: ras status = 0x%X\n", ras_cmd->ras_status); + if (ras_cmd->ras_status) return -EINVAL; - } return 0; } |