RE: [PATCH] drm/amd/pm: enable amdgpu smu send message log

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[AMD Official Use Only - General]

-----Original Message-----
From: Lazar, Lijo <Lijo.Lazar@xxxxxxx>
Sent: Thursday, January 18, 2024 1:13 PM
To: Wang, Yang(Kevin) <KevinYang.Wang@xxxxxxx>; amd-gfx@xxxxxxxxxxxxxxxxxxxxx
Cc: Feng, Kenneth <Kenneth.Feng@xxxxxxx>
Subject: Re: [PATCH] drm/amd/pm: enable amdgpu smu send message log

On 1/18/2024 8:56 AM, Yang Wang wrote:
> From: Yang Wang <KevinYang.Wang@xxxxxxx>
>
> enable amdgpu smu driver message log.
>
> Signed-off-by: Yang Wang <KevinYang.Wang@xxxxxxx>
> ---
>   drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 8 +++++++-
>   1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c b/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
> index 00cd615bbcdc..b9a24ff02a12 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
> @@ -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);
> +     }

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
>   Out:
>       if (unlikely(adev->pm.smu_debug_mask & SMU_DEBUG_HALT_ON_ERROR) && res) {
>               amdgpu_device_halt(adev);





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux