[PATCH 2/2] drm/amd/powerplay: set uvd/vce/nb/mclk level as pstate requested

Deucher, Alexander Alexander.Deucher at amd.com
Tue Aug 29 13:58:31 UTC 2017


> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Rex Zhu
> Sent: Tuesday, August 29, 2017 5:14 AM
> To: amd-gfx at lists.freedesktop.org
> Cc: Zhu, Rex
> Subject: [PATCH 2/2] drm/amd/powerplay: set uvd/vce/nb/mclk level as
> pstate requested
> 
> Change-Id: Ibd74590c3fe9dbdeac924b697d18448bddbefcdb

Missing your signed-off-by.

> ---
>  drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c
> b/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c
> index a125e30..10bf687 100644
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c
> @@ -1359,6 +1359,11 @@ static int cz_dpm_force_dpm_level(struct
> pp_hwmgr *hwmgr,
>  	if (level == hwmgr->dpm_level)
>  		return 0;
> 
> +	if (level == AMD_DPM_FORCED_LEVEL_PROFILE_PEAK)
> +		cz_nbdpm_pstate_enable_disable(hwmgr, false, false);
> +	else if (level == AMD_DPM_FORCED_LEVEL_PROFILE_STANDARD)
> +		cz_nbdpm_pstate_enable_disable(hwmgr, false, true);
> +

Do we need a default case here as well for the nbdpm to reset it back to normal when profiling mode is disabled?

Alex

>  	switch (level) {
>  	case AMD_DPM_FORCED_LEVEL_HIGH:
>  	case AMD_DPM_FORCED_LEVEL_PROFILE_PEAK:
> @@ -1435,7 +1440,8 @@ int cz_dpm_update_uvd_dpm(struct pp_hwmgr
> *hwmgr, bool bgate)
>  	if (!bgate) {
>  		/* Stable Pstate is enabled and we need to set the UVD DPM
> to highest level */
>  		if (phm_cap_enabled(hwmgr-
> >platform_descriptor.platformCaps,
> -					 PHM_PlatformCaps_StablePState)) {
> +					 PHM_PlatformCaps_StablePState)
> +			|| hwmgr->en_umd_pstate) {
>  			cz_hwmgr->uvd_dpm.hard_min_clk =
>  				   ptable->entries[ptable->count - 1].vclk;
> 
> @@ -1464,7 +1470,8 @@ int  cz_dpm_update_vce_dpm(struct pp_hwmgr
> *hwmgr)
> 
>  	/* Stable Pstate is enabled and we need to set the VCE DPM to
> highest level */
>  	if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
> -					 PHM_PlatformCaps_StablePState)) {
> +					PHM_PlatformCaps_StablePState)
> +					|| hwmgr->en_umd_pstate) {
>  		cz_hwmgr->vce_dpm.hard_min_clk =
>  				  ptable->entries[ptable->count - 1].ecclk;
> 
> --
> 1.9.1
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list