Skip to content

Commit afac8c6

Browse files
YiPeng Chaialexdeucher
authored andcommitted
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 <YiPeng.Chai@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 8284951)
1 parent 5302d1a commit afac8c6

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1630,9 +1630,7 @@ static int psp_ras_send_cmd(struct psp_context *psp,
16301630

16311631
switch (cmd) {
16321632
case TA_RAS_COMMAND__TRIGGER_ERROR:
1633-
if (ret || psp->cmd_buf_mem->resp.status)
1634-
ret = -EINVAL;
1635-
else if (out)
1633+
if (!ret && out)
16361634
memcpy(out, &ras_cmd->ras_status, sizeof(ras_cmd->ras_status));
16371635
break;
16381636
case TA_RAS_COMMAND__QUERY_ADDRESS:

0 commit comments

Comments
 (0)