<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Acked-by: Alex Deucher <alexander.deucher@amd.com><br>
</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Huang Rui <ray.huang@amd.com><br>
<b>Sent:</b> Wednesday, August 15, 2018 1:21:42 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org<br>
<b>Cc:</b> Huang, Ray<br>
<b>Subject:</b> [PATCH] drm/amdgpu: add status checking after fw is loaded</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">The status field must be 0 after FW is loaded.<br>
<br>
Signed-off-by: Huang Rui <ray.huang@amd.com><br>
---<br>
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 7 +++++++<br>
 1 file changed, 7 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c<br>
index 9f1a5bd..44bcd03 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c<br>
@@ -131,6 +131,13 @@ psp_cmd_submit_buf(struct psp_context *psp,<br>
                 msleep(1);<br>
         }<br>
 <br>
+       /* the status field must be 0 after FW is loaded */<br>
+       if (ucode && psp->cmd_buf_mem->resp.status) {<br>
+               DRM_ERROR("failed loading with status (%d) and ucode id (%d)\n",<br>
+                         psp->cmd_buf_mem->resp.status, ucode->ucode_id);<br>
+               return -EINVAL;<br>
+       }<br>
+<br>
         return ret;<br>
 }<br>
 <br>
-- <br>
2.7.4<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
</div>
</span></font></div>
</body>
</html>