drm/amd/pm: enable amdgpu smu send message log
Subsystems (3)
PATCH 1/1 drm/amd/pm: enable amdgpu smu send message log
From: Yang Wang <[email protected]>
enable amdgpu smu driver message log.
--- drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c +7 -1
@@ -378,8 +378,14 @@ 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, readval: 0x%08x\n" , +smu_get_message_name (smu, msg), index, param, *read_arg); + }else { +dev_dbg (adev->dev,"smu send message: %s(%d) param: 0x%08x\n" , +smu_get_message_name (smu, msg), index, param); + } Out:if (unlikely (adev->pm.smu_debug_mask &SMU_DEBUG_HALT_ON_ERROR ) && res) {amdgpu_device_halt (adev);
Signature · 1 line
2.34.1
Quoted 16 lines · Yang Wang
From: Yang Wang <[email protected]>
enable amdgpu smu driver message log.
Signed-off-by Yang Wang <[email protected]>--- drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c +0
-0@@ -378,8 +378,14 @@ int smu_cmn_send_smc_msg_with_param(struct smu_context *smu, res =__smu_cmn_reg2errno (smu, reg);if (res !=0 )
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c int smu_cmn_send_smc_msg_with_param(struct smu_context *smu, · line 388
Quoted 10 lines
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c +7
-1__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, readval: 0x%08x\n" , +smu_get_message_name (smu, msg), index, param, *read_arg); + }else { +dev_dbg (adev->dev,"smu send message: %s(%d) param: 0x%08x\n" , +smu_get_message_name (smu, msg), index, param); + }
Better to add the exact response reg value (reg = __smu_cmn_poll_stat(smu)) also to this.
Thanks,
Lijo
Quoted 3 lines
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c +0
-0Out:if (unlikely (adev->pm.smu_debug_mask &SMU_DEBUG_HALT_ON_ERROR ) && res) {amdgpu_device_halt (adev);
[AMD Official Use Only - General]
-----Original Message-----
From: Lazar, Lijo <[email protected]>
Sent: Thursday, January 18, 2024 1:13 PM
To: Wang, Yang(Kevin) <[email protected]>; [email protected]
Cc: Feng, Kenneth <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: enable amdgpu smu send message log
Quoted 16 lines · Yang Wang
From: Yang Wang <[email protected]>
enable amdgpu smu driver message log.
Signed-off-by Yang Wang <[email protected]>--- drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c +0
-0@@ -378,8 +378,14 @@ int smu_cmn_send_smc_msg_with_param(struct smu_context *smu, res =__smu_cmn_reg2errno (smu, reg);if (res !=0 )
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c int smu_cmn_send_smc_msg_with_param(struct smu_context *smu, · line 388
Quoted 10 lines
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c +7
-1__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, readval: 0x%08x\n" , +smu_get_message_name (smu, msg), index, param, *read_arg); + }else { +dev_dbg (adev->dev,"smu send message: %s(%d) param: 0x%08x\n" , +smu_get_message_name (smu, msg), index, param); + }
Better to add the exact response reg value (reg =__smu_cmn_poll_stat(smu)) also to this.
Thanks,
Lijo
[kevin]:
OK, will be added in next version.
Best Regards,
Kevin
Quoted 3 lines
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c +0
-0Out:if (unlikely (adev->pm.smu_debug_mask &SMU_DEBUG_HALT_ON_ERROR ) && res) {amdgpu_device_halt (adev);