[PATCH] drm/amdgpu: add status checking after fw is loaded

Deucher, Alexander Alexander.Deucher at amd.com
Wed Aug 15 13:41:44 UTC 2018


Acked-by: Alex Deucher <alexander.deucher at amd.com>

________________________________
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> on behalf of Huang Rui <ray.huang at amd.com>
Sent: Wednesday, August 15, 2018 1:21:42 AM
To: amd-gfx at 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.huang at 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 at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20180815/939f9971/attachment-0001.html>


More information about the amd-gfx mailing list