diff options
| author | John Clements <[email protected]> | 2020-09-11 06:26:13 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2020-09-15 21:52:39 +0000 |
| commit | 9c7e2ceb1db064da10d8386590ce23afdc7dc6f0 (patch) | |
| tree | 687d499f983c252d4d9328a4edd021fd29920d4a /drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | |
| parent | drm/amdkfd: Fix -Wunused-const-variable warning (diff) | |
| download | kernel-9c7e2ceb1db064da10d8386590ce23afdc7dc6f0.tar.gz kernel-9c7e2ceb1db064da10d8386590ce23afdc7dc6f0.zip | |
drm/amdgpu: Update RAS init handling
Output RAS init status
If RAS init fails, teardown RAS context
Reviewed-by: Hawking Zhang <[email protected]>
Signed-off-by: John Clements <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index a7771aaa1c51..9782fbc000fe 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c @@ -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; |
