]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
drm/amd/pm: enable amdgpu smu send message log
authorYang Wang <KevinYang.Wang@amd.com>
Wed, 26 Apr 2023 08:17:05 +0000 (16:17 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 18 Jan 2024 20:47:52 +0000 (15:47 -0500)
v1:
enable amdgpu smu driver message log.

v2:
add smu/pmfw response value into debug log.

Signed-off-by: Yang Wang <KevinYang.Wang@amd.com>
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c

index 00cd615bbcdc0bf1b88dbb67e94c86b86173777a..b8dbd4e2534881e3cba8013d25998e40e1396a1a 100644 (file)
@@ -378,8 +378,15 @@ int smu_cmn_send_smc_msg_with_param(struct smu_context *smu,
        res = __smu_cmn_reg2errno(smu, reg);
        if (res != 0)
                __smu_cmn_reg_print_error(smu, reg, index, param, msg);
-       if (read_arg)
+       if (read_arg) {
                smu_cmn_read_arg(smu, read_arg);
+               dev_dbg(adev->dev, "smu send message: %s(%d) param: 0x%08x, resp: 0x%08x,\
+                       readval: 0x%08x\n",
+                       smu_get_message_name(smu, msg), index, param, reg, *read_arg);
+       } else {
+               dev_dbg(adev->dev, "smu send message: %s(%d) param: 0x%08x, resp: 0x%08x\n",
+                       smu_get_message_name(smu, msg), index, param, reg);
+       }
 Out:
        if (unlikely(adev->pm.smu_debug_mask & SMU_DEBUG_HALT_ON_ERROR) && res) {
                amdgpu_device_halt(adev);