summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorJohn Clements <john.clements@amd.com>2020-05-07 18:25:13 +0800
committerAlex Deucher <alexander.deucher@amd.com>2020-05-07 16:24:16 -0400
commit624e8c8703b5236e000f447d69d183f2c7c28355 (patch)
tree42cab2255f580853eff3474e900d26c3e43ab0d7 /drivers/gpu/drm
parent7f6778b11490dbde786bb88a4bb1d648975c621e (diff)
downloadlinux-stable-624e8c8703b5236e000f447d69d183f2c7c28355.tar.gz
linux-stable-624e8c8703b5236e000f447d69d183f2c7c28355.tar.bz2
linux-stable-624e8c8703b5236e000f447d69d183f2c7c28355.zip
drm/amdgpu: Fix bug in RAS invoke
Invoke sequence should abort when ras interrupt is detected before reading TA host shared memory 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')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index f061ad6750ed..cade87caed0b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -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);
+ if (amdgpu_ras_intr_triggered())
+ return ret;
+
if (ras_cmd->if_version > RAS_TA_HOST_IF_VER)
{
DRM_WARN("RAS: Unsupported Interface");
return -EINVAL;
}
- if (amdgpu_ras_intr_triggered())
- return ret;
-
if (!ret) {
if (ras_cmd->ras_out_message.flags.err_inject_switch_disable_flag) {
dev_warn(psp->adev->dev, "ECC switch disabled\n");