[PATCH] drm/amd/powerplay: suppress nonsupport profile mode overrun message

Liang, Prike Prike.Liang at amd.com
Thu Dec 19 07:46:05 UTC 2019


[AMD Official Use Only - Internal Distribution Only]



> -----Original Message-----
> From: Dai, Yuxian (David) <Yuxian.Dai at amd.com>
> Sent: Thursday, December 19, 2019 3:39 PM
> To: Huang, Ray <Ray.Huang at amd.com>; Liang, Prike <Prike.Liang at amd.com>
> Cc: amd-gfx at lists.freedesktop.org; Quan, Evan <Evan.Quan at amd.com>
> Subject: RE: [PATCH] drm/amd/powerplay: suppress nonsupport profile
> mode overrun message
> 
> As Ray point out.  We should  set the SMU_MSG_SetWorkloadMask with
> specified value  to indicate unsupported.
> But  the current a value with system error value: "-EINVAL"
> The firmware maybe response with unexpected action to driver.
[Prike] If get nonsupport profile mode will exit and not issue any you mentioned error value. 
> 
> -----Original Message-----
> From: Huang, Ray <Ray.Huang at amd.com>
> Sent: Thursday, December 19, 2019 3:17 PM
> To: Dai, Yuxian (David) <Yuxian.Dai at amd.com>
> Cc: Liang, Prike <Prike.Liang at amd.com>; amd-gfx at lists.freedesktop.org;
> Quan, Evan <Evan.Quan at amd.com>
> Subject: Re: [PATCH] drm/amd/powerplay: suppress nonsupport profile
> mode overrun message
> 
> [AMD Official Use Only - Internal Distribution Only]
> 
> On Thu, Dec 19, 2019 at 03:04:12PM +0800, Dai, Yuxian (David) wrote:
> > For we don't support the mode, so shouldn't print the error message, or
> regard as a error.
> > For log message, the error is high level .maybe change from "error"  to
> "warning" , it will be much better.
> >
> >
> > -----Original Message-----
> > From: Liang, Prike <Prike.Liang at amd.com>
> > Sent: Thursday, December 19, 2019 2:46 PM
> > To: amd-gfx at lists.freedesktop.org
> > Cc: Quan, Evan <Evan.Quan at amd.com>; Huang, Ray
> <Ray.Huang at amd.com>;
> > Dai, Yuxian (David) <Yuxian.Dai at amd.com>; Liang, Prike
> > <Prike.Liang at amd.com>
> > Subject: [PATCH] drm/amd/powerplay: suppress nonsupport profile mode
> > overrun message
> >
> > SMU12 not support WORKLOAD_DEFAULT_BIT and
> WORKLOAD_PPLIB_POWER_SAVING_BIT.
> >
> 
> Probably smu firmware doesn't expose the feature mask to driver. Can you
> confirmware with smu firmware guy whehter this feature is really disabled or
> not in SMU12. If that, in my view, issue the message
> SMU_MSG_SetWorkloadMask with an unsupported state, it doesn't make
> sense.
> 
> Just work around this with one time warnning is not a good solution.
> 
> Thanks,
> Ray
> 
> > Signed-off-by: Prike Liang <Prike.Liang at amd.com>
> > ---
> >  drivers/gpu/drm/amd/powerplay/renoir_ppt.c | 8 ++++++--
> >  1 file changed, 6 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/powerplay/renoir_ppt.c
> > b/drivers/gpu/drm/amd/powerplay/renoir_ppt.c
> > index 784903a3..f9a1817 100644
> > --- a/drivers/gpu/drm/amd/powerplay/renoir_ppt.c
> > +++ b/drivers/gpu/drm/amd/powerplay/renoir_ppt.c
> > @@ -550,14 +550,18 @@ static int renoir_set_power_profile_mode(struct
> smu_context *smu, long *input, u
> >  	/* conv PP_SMC_POWER_PROFILE* to WORKLOAD_PPLIB_*_BIT */
> >  	workload_type = smu_workload_get_type(smu, smu-
> >power_profile_mode);
> >  	if (workload_type < 0) {
> > -		pr_err("Unsupported power profile mode %d on
> RENOIR\n",smu->power_profile_mode);
> > +		/*
> > +		 * TODO: If some case need switch to powersave/default
> power mode
> > +		 * then can consider enter
> WORKLOAD_COMPUTE/WORKLOAD_CUSTOM for power saving.
> > +		 */
> > +		pr_err_once("Unsupported power profile mode %d on
> > +RENOIR\n",smu->power_profile_mode);
> >  		return -EINVAL;
> >  	}
> >
> >  	ret = smu_send_smc_msg_with_param(smu,
> SMU_MSG_SetWorkloadMask,
> >  				    1 << workload_type);
> >  	if (ret) {
> > -		pr_err("Fail to set workload type %d\n", workload_type);
> > +		pr_err_once("Fail to set workload type %d\n",
> workload_type);
> >  		return ret;
> >  	}
> >
> > --
> > 2.7.4
> >


More information about the amd-gfx mailing list