summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
diff options
context:
space:
mode:
authorXiangliang Yu <Xiangliang.Yu@amd.com>2018-12-13 15:34:12 +0800
committerAlex Deucher <alexander.deucher@amd.com>2019-01-14 15:04:30 -0500
commit76223c5496a7cf10aef1971e4e6aff77abadd15a (patch)
tree7f7bd205189bb44481b747d070a46486aa36c02c /drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
parent898e0d9d405158d13cb1afa192c51ce94746d537 (diff)
downloadblackbird-op-linux-76223c5496a7cf10aef1971e4e6aff77abadd15a.tar.gz
blackbird-op-linux-76223c5496a7cf10aef1971e4e6aff77abadd15a.zip
drm/amdgpu/psp: Fix can't detect psp INVOKE command failed
There isn't ucode when executing INVOKE command, so current code can't check the failure of INVOKE command. Remove the ucode check. Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com> Reviewed-by: Feifei Xu <Feifei.Xu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index 2f126ea7aea4..7f5ce3788732 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -140,10 +140,13 @@ psp_cmd_submit_buf(struct psp_context *psp,
while (*((unsigned int *)psp->fence_buf) != index)
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);
+ /* the status field must be 0 after psp command completion */
+ if (psp->cmd_buf_mem->resp.status) {
+ if (ucode)
+ DRM_ERROR("failed to load ucode id (%d) ",
+ ucode->ucode_id);
+ DRM_ERROR("psp command failed and response status is (%d)\n",
+ psp->cmd_buf_mem->resp.status);
return -EINVAL;
}
OpenPOWER on IntegriCloud