Acked-by: Alex Deucher <alexander.deuc...@amd.com>

________________________________
From: amd-gfx <amd-gfx-boun...@lists.freedesktop.org> on behalf of Huang Rui 
<ray.hu...@amd.com>
Sent: Wednesday, August 15, 2018 1:21:42 AM
To: amd-gfx@lists.freedesktop.org
Cc: Huang, Ray
Subject: [PATCH] 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.hu...@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index 9f1a5bd..44bcd03 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -131,6 +131,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;
+       }
+
         return ret;
 }

--
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to