drm/amdgpu: Update RAS init handling
Output RAS init status If RAS init fails, teardown RAS context 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>
This commit is contained in:
parent
2b3bbf2354
commit
9c7e2ceb1d
@ -935,6 +935,7 @@ static int psp_ras_load(struct psp_context *psp)
|
||||
{
|
||||
int ret;
|
||||
struct psp_gfx_cmd_resp *cmd;
|
||||
struct ta_ras_shared_memory *ras_cmd;
|
||||
|
||||
/*
|
||||
* TODO: bypass the loading in sriov for now
|
||||
@ -958,11 +959,20 @@ static int psp_ras_load(struct psp_context *psp)
|
||||
ret = psp_cmd_submit_buf(psp, NULL, cmd,
|
||||
psp->fence_buf_mc_addr);
|
||||
|
||||
ras_cmd = (struct ta_ras_shared_memory*)psp->ras.ras_shared_buf;
|
||||
|
||||
if (!ret) {
|
||||
psp->ras.ras_initialized = true;
|
||||
psp->ras.session_id = cmd->resp.session_id;
|
||||
|
||||
if (!ras_cmd->ras_status)
|
||||
psp->ras.ras_initialized = true;
|
||||
else
|
||||
dev_warn(psp->adev->dev, "RAS Init Status: 0x%X\n", ras_cmd->ras_status);
|
||||
}
|
||||
|
||||
if (ret || ras_cmd->ras_status)
|
||||
amdgpu_ras_fini(psp->adev);
|
||||
|
||||
kfree(cmd);
|
||||
|
||||
return ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user