drm/amdgpu: show both cmd id and name when psp cmd failed
authorLang Yu <lang.yu@amd.com>
Fri, 27 Aug 2021 03:38:55 +0000 (11:38 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 30 Aug 2021 19:09:21 +0000 (15:09 -0400)
To cover the corner case that people want to know the ID
of an UNKNOWN CMD.

Suggested-by: John Clements <john.clements@amd.com>
Signed-off-by: Lang Yu <lang.yu@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

index 23efdc6..9b41cb8 100644 (file)
@@ -469,10 +469,10 @@ psp_cmd_submit_buf(struct psp_context *psp,
         */
        if (!skip_unsupport && (psp->cmd_buf_mem->resp.status || !timeout) && !ras_intr) {
                if (ucode)
-                       DRM_WARN("failed to load ucode (%s) ",
-                                 amdgpu_ucode_name(ucode->ucode_id));
-               DRM_WARN("psp gfx command (%s) failed and response status is (0x%X)\n",
-                        psp_gfx_cmd_name(psp->cmd_buf_mem->cmd_id),
+                       DRM_WARN("failed to load ucode %s(0x%X) ",
+                                 amdgpu_ucode_name(ucode->ucode_id), ucode->ucode_id);
+               DRM_WARN("psp gfx command %s(0x%X) failed and response status is (0x%X)\n",
+                        psp_gfx_cmd_name(psp->cmd_buf_mem->cmd_id), psp->cmd_buf_mem->cmd_id,
                         psp->cmd_buf_mem->resp.status);
                if (!timeout) {
                        ret = -EINVAL;