From: Eric Huang Subject: Re: [PATCH 1/4] drm/amd/pp: Add new smu callback function Date: Fri, 26 Jan 2018 11:39:49 -0500 Message-ID: <7a30b53f-ca9d-4a2c-5709-23846b2dbbf1@amd.com> References: <1516786649-14914-1-git-send-email-Rex.Zhu@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1571856860==" Return-path: In-Reply-To: Content-Language: en-US List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Sender: "amd-gfx" To: "Zhu, Rex" , "amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org" This is a multi-part message in MIME format. --===============1571856860== Content-Type: multipart/alternative; boundary="------------D596F0968E29636D913CCEAA" Content-Language: en-US This is a multi-part message in MIME format. --------------D596F0968E29636D913CCEAA Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Power containment has two parts, TDC limit and power limit. Only changing power limit is not equal to disabling power containment. Power containment in Fiji degrades compute performance. So we disable it to fix. It has been verified by compute performance test. If you want to replace it, it has to be verified, otherwise it will make a regression. Regards, Eric On 2018-01-25 06:15 PM, Zhu, Rex wrote: > For the power containment issue on Fiji. > We want to expose set power limit function. > Maybe we can adjust the power limit instand of just disable this feature. > But I am not sure this can meet kfd ‘ s requirement. > > Best Regards > Rex > ------------------------------------------------------------------------ > *From:* amd-gfx on behalf of > Eric Huang > *Sent:* Friday, January 26, 2018 12:18:45 AM > *To:* amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org > *Subject:* Re: [PATCH 1/4] drm/amd/pp: Add new smu callback function > Hi Rex, > > Why don't you use function smum_populate_requested_graphic_levels() > which is doing exactly the same thing as the function you add ? > > And in old power profile setting function > smu7_set_power_profile_state(), we implement this: > > if (hwmgr->chip_id == CHIP_FIJI) { >          if (request->type == AMD_PP_GFX_PROFILE) >              smu7_enable_power_containment(hwmgr); >          else if (request->type == AMD_PP_COMPUTE_PROFILE) >              smu7_disable_power_containment(hwmgr); >      } > > This should be merged into your new power profile setting. > > Regards, > Eric > > On 2018-01-24 04:37 AM, Rex Zhu wrote: > > it is used for update dpm settings > > > > Change-Id: Idc0362c219d84564693ca90adf9299e56cfeb6a4 > > Signed-off-by: Rex Zhu > > --- > >   drivers/gpu/drm/amd/powerplay/inc/hwmgr.h     | 1 + > >   drivers/gpu/drm/amd/powerplay/inc/smumgr.h    | 1 + > >   drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c | 8 ++++++++ > >   3 files changed, 10 insertions(+) > > > > diff --git a/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h > b/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h > > index 604a7cb..3e8959e 100644 > > --- a/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h > > +++ b/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h > > @@ -238,6 +238,7 @@ struct pp_smumgr_func { > >        int (*populate_requested_graphic_levels)(struct pp_hwmgr *hwmgr, > >                        struct amd_pp_profile *request); > >        bool (*is_hw_avfs_present)(struct pp_hwmgr *hwmgr); > > +     int (*update_dpm_settings)(struct pp_hwmgr *hwmgr, void > *profile_setting); > >   }; > > > >   struct pp_hwmgr_func { > > diff --git a/drivers/gpu/drm/amd/powerplay/inc/smumgr.h > b/drivers/gpu/drm/amd/powerplay/inc/smumgr.h > > index b1b27b2..e05a57e 100644 > > --- a/drivers/gpu/drm/amd/powerplay/inc/smumgr.h > > +++ b/drivers/gpu/drm/amd/powerplay/inc/smumgr.h > > @@ -134,5 +134,6 @@ extern int > smum_populate_requested_graphic_levels(struct pp_hwmgr *hwmgr, > > > >   extern bool smum_is_hw_avfs_present(struct pp_hwmgr *hwmgr); > > > > +extern int smum_update_dpm_settings(struct pp_hwmgr *hwmgr, void > *profile_setting); > > > >   #endif > > diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c > b/drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c > > index 8673884..1ce4959 100644 > > --- a/drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c > > +++ b/drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c > > @@ -253,3 +253,11 @@ bool smum_is_hw_avfs_present(struct pp_hwmgr > *hwmgr) > > > >        return false; > >   } > > + > > +int smum_update_dpm_settings(struct pp_hwmgr *hwmgr, void > *profile_setting) > > +{ > > +     if (hwmgr->smumgr_funcs->update_dpm_settings) > > +             return hwmgr->smumgr_funcs->update_dpm_settings(hwmgr, > profile_setting); > > + > > +     return -EINVAL; > > +} > > _______________________________________________ > amd-gfx mailing list > amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx --------------D596F0968E29636D913CCEAA Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 8bit

Power containment has two parts, TDC limit and power limit. Only changing power limit is not equal to disabling power containment.

Power containment in Fiji degrades compute performance. So we disable it to fix. It has been verified by compute performance test. If you want to replace it, it has to be verified, otherwise it will make a regression.

Regards,
Eric


On 2018-01-25 06:15 PM, Zhu, Rex wrote:
For the power containment issue on Fiji.
We want to expose set power limit function.
Maybe we can adjust the power limit instand of just disable this feature.
But I am not sure this can meet kfd ‘ s requirement.

Best Regards
Rex

From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Eric Huang <jinhuieric.huang-5C7GfCeVMHo@public.gmane.org>
Sent: Friday, January 26, 2018 12:18:45 AM
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH 1/4] drm/amd/pp: Add new smu callback function
 
Hi Rex,

Why don't you use function smum_populate_requested_graphic_levels()
which is doing exactly the same thing as the function you add ?

And in old power profile setting function
smu7_set_power_profile_state(), we implement this:

if (hwmgr->chip_id == CHIP_FIJI) {
         if (request->type == AMD_PP_GFX_PROFILE)
             smu7_enable_power_containment(hwmgr);
         else if (request->type == AMD_PP_COMPUTE_PROFILE)
             smu7_disable_power_containment(hwmgr);
     }

This should be merged into your new power profile setting.

Regards,
Eric

On 2018-01-24 04:37 AM, Rex Zhu wrote:
> it is used for update dpm settings
>
> Change-Id: Idc0362c219d84564693ca90adf9299e56cfeb6a4
> Signed-off-by: Rex Zhu <Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
> ---
>   drivers/gpu/drm/amd/powerplay/inc/hwmgr.h     | 1 +
>   drivers/gpu/drm/amd/powerplay/inc/smumgr.h    | 1 +
>   drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c | 8 ++++++++
>   3 files changed, 10 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h b/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
> index 604a7cb..3e8959e 100644
> --- a/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
> +++ b/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
> @@ -238,6 +238,7 @@ struct pp_smumgr_func {
>        int (*populate_requested_graphic_levels)(struct pp_hwmgr *hwmgr,
>                        struct amd_pp_profile *request);
>        bool (*is_hw_avfs_present)(struct pp_hwmgr  *hwmgr);
> +     int (*update_dpm_settings)(struct pp_hwmgr *hwmgr, void *profile_setting);
>   };
>  
>   struct pp_hwmgr_func {
> diff --git a/drivers/gpu/drm/amd/powerplay/inc/smumgr.h b/drivers/gpu/drm/amd/powerplay/inc/smumgr.h
> index b1b27b2..e05a57e 100644
> --- a/drivers/gpu/drm/amd/powerplay/inc/smumgr.h
> +++ b/drivers/gpu/drm/amd/powerplay/inc/smumgr.h
> @@ -134,5 +134,6 @@ extern int smum_populate_requested_graphic_levels(struct pp_hwmgr *hwmgr,
>  
>   extern bool smum_is_hw_avfs_present(struct pp_hwmgr *hwmgr);
>  
> +extern int smum_update_dpm_settings(struct pp_hwmgr *hwmgr, void *profile_setting);
>  
>   #endif
> diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c
> index 8673884..1ce4959 100644
> --- a/drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c
> @@ -253,3 +253,11 @@ bool smum_is_hw_avfs_present(struct pp_hwmgr *hwmgr)
>  
>        return false;
>   }
> +
> +int smum_update_dpm_settings(struct pp_hwmgr *hwmgr, void *profile_setting)
> +{
> +     if (hwmgr->smumgr_funcs->update_dpm_settings)
> +             return hwmgr->smumgr_funcs->update_dpm_settings(hwmgr, profile_setting);
> +
> +     return -EINVAL;
> +}

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

--------------D596F0968E29636D913CCEAA-- --===============1571856860== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KYW1kLWdmeCBt YWlsaW5nIGxpc3QKYW1kLWdmeEBsaXN0cy5mcmVlZGVza3RvcC5vcmcKaHR0cHM6Ly9saXN0cy5m cmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9hbWQtZ2Z4Cg== --===============1571856860==--