aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYiPeng Chai <[email protected]>2024-07-19 20:43:04 +0800
committerAlex Deucher <[email protected]>2024-07-23 17:43:06 -0400
commit8284951a6e79c6806c675e5f68a4cd425dd56bc4 (patch)
tree2d0594cd7f07a24ff8c5f70fa4e5868a6a1e9a72
parent834368eab36922595a402b9e76470f8efa2fac7f (diff)
drm/amdgpu: fix ras UE error injection failure issue
The ras command shared memory is allocated from VRAM and the response status of the command buffer will not be zero due to gpu being in fatal error state after ras UE error injection. Signed-off-by: YiPeng Chai <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index 7cdff355cedb..189574d53ebd 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -1630,9 +1630,7 @@ static int psp_ras_send_cmd(struct psp_context *psp,
switch (cmd) {
case TA_RAS_COMMAND__TRIGGER_ERROR:
- if (ret || psp->cmd_buf_mem->resp.status)
- ret = -EINVAL;
- else if (out)
+ if (!ret && out)
memcpy(out, &ras_cmd->ras_status, sizeof(ras_cmd->ras_status));
break;
case TA_RAS_COMMAND__QUERY_ADDRESS: