drm/amdgpu: show explicit name instead of id in psp_cmd_submit_buf
authorLang Yu <Lang.Yu@amd.com>
Thu, 24 Jun 2021 04:05:16 +0000 (12:05 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 1 Jul 2021 04:25:33 +0000 (00:25 -0400)
Use amdgpu_ucode_name to show ucode name and psp_gfx_cmd_name to
show psp_gfx_cmd name in psp_cmd_submit_buf.

v2: adjust function name

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 91ca305..335abc8 100644 (file)
@@ -455,10 +455,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 id (%d) ",
-                                 ucode->ucode_id);
-               DRM_WARN("psp command (0x%X) failed and response status is (0x%X)\n",
-                        psp->cmd_buf_mem->cmd_id,
+                       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),
                         psp->cmd_buf_mem->resp.status);
                if (!timeout) {
                        ret = -EINVAL;