All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amd/powerplay: suppress nonsupport profile mode overrun message
@ 2019-12-19  6:45 Prike Liang
  2019-12-19  7:00 ` Quan, Evan
  2019-12-19  7:04 ` Dai, Yuxian (David)
  0 siblings, 2 replies; 7+ messages in thread
From: Prike Liang @ 2019-12-19  6:45 UTC (permalink / raw)
  To: amd-gfx; +Cc: Prike Liang, Evan.quan, ray.huang, Yuxian.Dai

SMU12 not support WORKLOAD_DEFAULT_BIT and WORKLOAD_PPLIB_POWER_SAVING_BIT.

Signed-off-by: Prike Liang <Prike.Liang@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

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* RE: [PATCH] drm/amd/powerplay: suppress nonsupport profile mode overrun message
  2019-12-19  6:45 [PATCH] drm/amd/powerplay: suppress nonsupport profile mode overrun message Prike Liang
@ 2019-12-19  7:00 ` Quan, Evan
  2019-12-19  7:04 ` Dai, Yuxian (David)
  1 sibling, 0 replies; 7+ messages in thread
From: Quan, Evan @ 2019-12-19  7:00 UTC (permalink / raw)
  To: Liang, Prike, amd-gfx; +Cc: Huang, Ray, Dai, Yuxian (David)

Reviewed-by: Evan Quan <evan.quan@amd.com>

> -----Original Message-----
> From: Liang, Prike <Prike.Liang@amd.com>
> Sent: Thursday, December 19, 2019 2:46 PM
> To: amd-gfx@lists.freedesktop.org
> Cc: Quan, Evan <Evan.Quan@amd.com>; Huang, Ray <Ray.Huang@amd.com>;
> Dai, Yuxian (David) <Yuxian.Dai@amd.com>; Liang, Prike
> <Prike.Liang@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.
> 
> Signed-off-by: Prike Liang <Prike.Liang@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

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH] drm/amd/powerplay: suppress nonsupport profile mode overrun message
  2019-12-19  6:45 [PATCH] drm/amd/powerplay: suppress nonsupport profile mode overrun message Prike Liang
  2019-12-19  7:00 ` Quan, Evan
@ 2019-12-19  7:04 ` Dai, Yuxian (David)
  2019-12-19  7:16   ` Huang, Ray
  1 sibling, 1 reply; 7+ messages in thread
From: Dai, Yuxian (David) @ 2019-12-19  7:04 UTC (permalink / raw)
  To: Liang, Prike, amd-gfx; +Cc: Quan, Evan, Huang, Ray

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@amd.com> 
Sent: Thursday, December 19, 2019 2:46 PM
To: amd-gfx@lists.freedesktop.org
Cc: Quan, Evan <Evan.Quan@amd.com>; Huang, Ray <Ray.Huang@amd.com>; Dai, Yuxian (David) <Yuxian.Dai@amd.com>; Liang, Prike <Prike.Liang@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.

Signed-off-by: Prike Liang <Prike.Liang@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

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/amd/powerplay: suppress nonsupport profile mode overrun message
  2019-12-19  7:04 ` Dai, Yuxian (David)
@ 2019-12-19  7:16   ` Huang, Ray
  2019-12-19  7:28     ` Liang, Prike
  2019-12-19  7:38     ` Dai, Yuxian (David)
  0 siblings, 2 replies; 7+ messages in thread
From: Huang, Ray @ 2019-12-19  7:16 UTC (permalink / raw)
  To: Dai, Yuxian (David); +Cc: Liang, Prike, Quan, Evan, amd-gfx

[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@amd.com> 
> Sent: Thursday, December 19, 2019 2:46 PM
> To: amd-gfx@lists.freedesktop.org
> Cc: Quan, Evan <Evan.Quan@amd.com>; Huang, Ray <Ray.Huang@amd.com>; Dai, Yuxian (David) <Yuxian.Dai@amd.com>; Liang, Prike <Prike.Liang@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@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
> 
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH] drm/amd/powerplay: suppress nonsupport profile mode overrun message
  2019-12-19  7:16   ` Huang, Ray
@ 2019-12-19  7:28     ` Liang, Prike
  2019-12-19  7:38     ` Dai, Yuxian (David)
  1 sibling, 0 replies; 7+ messages in thread
From: Liang, Prike @ 2019-12-19  7:28 UTC (permalink / raw)
  To: Huang, Ray, Dai, Yuxian (David), Cai, Land; +Cc: Quan, Evan, amd-gfx

[AMD Official Use Only - Internal Distribution Only]



> -----Original Message-----
> From: Huang, Ray <Ray.Huang@amd.com>
> Sent: Thursday, December 19, 2019 3:17 PM
> To: Dai, Yuxian (David) <Yuxian.Dai@amd.com>
> Cc: Liang, Prike <Prike.Liang@amd.com>; amd-gfx@lists.freedesktop.org;
> Quan, Evan <Evan.Quan@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@amd.com>
> > Sent: Thursday, December 19, 2019 2:46 PM
> > To: amd-gfx@lists.freedesktop.org
> > Cc: Quan, Evan <Evan.Quan@amd.com>; Huang, Ray
> <Ray.Huang@amd.com>;
> > Dai, Yuxian (David) <Yuxian.Dai@amd.com>; Liang, Prike
> > <Prike.Liang@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.
[Prike]  Yes, from SMU FW guy @Cai, Land  SMU12 not support default and 
power saving mode now.  As the patch TODO item said we can consider switch to
compute/customer profile mode for power saving if needed. 
> 
> Thanks,
> Ray
> 
> > Signed-off-by: Prike Liang <Prike.Liang@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
> >
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH] drm/amd/powerplay: suppress nonsupport profile mode overrun message
  2019-12-19  7:16   ` Huang, Ray
  2019-12-19  7:28     ` Liang, Prike
@ 2019-12-19  7:38     ` Dai, Yuxian (David)
  2019-12-19  7:46       ` Liang, Prike
  1 sibling, 1 reply; 7+ messages in thread
From: Dai, Yuxian (David) @ 2019-12-19  7:38 UTC (permalink / raw)
  To: Huang, Ray, Liang, Prike; +Cc: Quan, Evan, amd-gfx

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. 

-----Original Message-----
From: Huang, Ray <Ray.Huang@amd.com> 
Sent: Thursday, December 19, 2019 3:17 PM
To: Dai, Yuxian (David) <Yuxian.Dai@amd.com>
Cc: Liang, Prike <Prike.Liang@amd.com>; amd-gfx@lists.freedesktop.org; Quan, Evan <Evan.Quan@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@amd.com>
> Sent: Thursday, December 19, 2019 2:46 PM
> To: amd-gfx@lists.freedesktop.org
> Cc: Quan, Evan <Evan.Quan@amd.com>; Huang, Ray <Ray.Huang@amd.com>; 
> Dai, Yuxian (David) <Yuxian.Dai@amd.com>; Liang, Prike 
> <Prike.Liang@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@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
> 
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH] drm/amd/powerplay: suppress nonsupport profile mode overrun message
  2019-12-19  7:38     ` Dai, Yuxian (David)
@ 2019-12-19  7:46       ` Liang, Prike
  0 siblings, 0 replies; 7+ messages in thread
From: Liang, Prike @ 2019-12-19  7:46 UTC (permalink / raw)
  To: Dai, Yuxian (David), Huang, Ray; +Cc: Quan, Evan, amd-gfx

[AMD Official Use Only - Internal Distribution Only]



> -----Original Message-----
> From: Dai, Yuxian (David) <Yuxian.Dai@amd.com>
> Sent: Thursday, December 19, 2019 3:39 PM
> To: Huang, Ray <Ray.Huang@amd.com>; Liang, Prike <Prike.Liang@amd.com>
> Cc: amd-gfx@lists.freedesktop.org; Quan, Evan <Evan.Quan@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@amd.com>
> Sent: Thursday, December 19, 2019 3:17 PM
> To: Dai, Yuxian (David) <Yuxian.Dai@amd.com>
> Cc: Liang, Prike <Prike.Liang@amd.com>; amd-gfx@lists.freedesktop.org;
> Quan, Evan <Evan.Quan@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@amd.com>
> > Sent: Thursday, December 19, 2019 2:46 PM
> > To: amd-gfx@lists.freedesktop.org
> > Cc: Quan, Evan <Evan.Quan@amd.com>; Huang, Ray
> <Ray.Huang@amd.com>;
> > Dai, Yuxian (David) <Yuxian.Dai@amd.com>; Liang, Prike
> > <Prike.Liang@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@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
> >
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-12-19  7:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-19  6:45 [PATCH] drm/amd/powerplay: suppress nonsupport profile mode overrun message Prike Liang
2019-12-19  7:00 ` Quan, Evan
2019-12-19  7:04 ` Dai, Yuxian (David)
2019-12-19  7:16   ` Huang, Ray
2019-12-19  7:28     ` Liang, Prike
2019-12-19  7:38     ` Dai, Yuxian (David)
2019-12-19  7:46       ` Liang, Prike

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.