Commit 624e8c87 authored by John Clements's avatar John Clements Committed by Alex Deucher

drm/amdgpu: Fix bug in RAS invoke

Invoke sequence should abort when ras interrupt is detected before reading TA host shared memory
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 7f6778b1
...@@ -759,15 +759,15 @@ int psp_ras_invoke(struct psp_context *psp, uint32_t ta_cmd_id) ...@@ -759,15 +759,15 @@ int psp_ras_invoke(struct psp_context *psp, uint32_t ta_cmd_id)
ret = psp_ta_invoke(psp, ta_cmd_id, psp->ras.session_id); ret = psp_ta_invoke(psp, ta_cmd_id, psp->ras.session_id);
if (amdgpu_ras_intr_triggered())
return ret;
if (ras_cmd->if_version > RAS_TA_HOST_IF_VER) if (ras_cmd->if_version > RAS_TA_HOST_IF_VER)
{ {
DRM_WARN("RAS: Unsupported Interface"); DRM_WARN("RAS: Unsupported Interface");
return -EINVAL; return -EINVAL;
} }
if (amdgpu_ras_intr_triggered())
return ret;
if (!ret) { if (!ret) {
if (ras_cmd->ras_out_message.flags.err_inject_switch_disable_flag) { if (ras_cmd->ras_out_message.flags.err_inject_switch_disable_flag) {
dev_warn(psp->adev->dev, "ECC switch disabled\n"); dev_warn(psp->adev->dev, "ECC switch disabled\n");
......
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