diff options
author | Huang Rui <ray.huang@amd.com> | 2018-08-05 12:45:35 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-08-27 11:11:03 -0500 |
commit | 28a160277aef92b606c869960f40704493d30b42 (patch) | |
tree | c7396609f5061e0e19cebdb018b18498d9a4a5ad | |
parent | 02b29caf18b3b0f6ff7b7d0b639060893cddf930 (diff) | |
download | linux-28a160277aef92b606c869960f40704493d30b42.tar.bz2 |
drm/amdgpu: add status checking after fw is loaded
The status field must be 0 after FW is loaded.
Signed-off-by: Huang Rui <ray.huang@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index 58e20385eab5..bd397d2916fb 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c @@ -134,6 +134,13 @@ psp_cmd_submit_buf(struct psp_context *psp, msleep(1); } + /* the status field must be 0 after FW is loaded */ + if (ucode && psp->cmd_buf_mem->resp.status) { + DRM_ERROR("failed loading with status (%d) and ucode id (%d)\n", + psp->cmd_buf_mem->resp.status, ucode->ucode_id); + return -EINVAL; + } + if (ucode) { ucode->tmr_mc_addr_lo = psp->cmd_buf_mem->resp.fw_addr_lo; ucode->tmr_mc_addr_hi = psp->cmd_buf_mem->resp.fw_addr_hi; |