[AMD Official Use Only - AMD Internal Distribution Only] > -----Original Message----- > From: Xie, Patrick <[email protected]> > Sent: Thursday, November 6, 2025 3:50 PM > To: [email protected] > Cc: Zhou1, Tao <[email protected]>; Xie, Patrick <[email protected]> > Subject: [PATCH] drm/amd/pm: remove unnecessary prints for smu busy > > smu busy is a normal case when calling SMU_MSG_GetBadPageCount, so no need > to print error status at each time.Instead, only print error status when > timeout given > by user is reached. > > Signed-off-by: Gangliang Xie <[email protected]> > --- > drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c | 2 ++ > drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 7 ++++--- > 2 files changed, 6 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c > b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c > index 0ce8cff27bf9..fc580800609c 100644 > --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c > +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c > @@ -956,6 +956,8 @@ static int smu_v13_0_12_get_badpage_count(struct > amdgpu_device *adev, uint32_t * > now = (uint64_t)ktime_to_ms(ktime_get()); > } while (now < end); > > + dev_err(adev->dev, > + "smu get bad page count timeout!\n"); > return ret; > } > > diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c > b/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c > index 3b98065dac1d..ca575ecbe36f 100644 > --- a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c > +++ b/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c > @@ -164,9 +164,10 @@ static void __smu_cmn_reg_print_error(struct smu_context > *smu, > msg_index, param, message); > break; > case SMU_RESP_BUSY_OTHER: > - dev_err_ratelimited(adev->dev, > - "SMU: I'm very busy for your command: > index:%d > param:0x%08X message:%s", > - msg_index, param, message);
[Tao] better to add comment here to explain why SMU_MSG_GetBadPageCount is special. > + if (msg != SMU_MSG_GetBadPageCount) > + dev_err_ratelimited(adev->dev, > + "SMU: I'm very busy for your > command: > index:%d param:0x%08X message:%s", > + msg_index, param, message); > break; > case SMU_RESP_DEBUG_END: > dev_err_ratelimited(adev->dev, > -- > 2.34.1
