[PATCH 1/2] drm/amd/powerplay: avoid unnecessary dpm level setting

Alex Deucher alexdeucher at gmail.com
Thu Jan 17 15:39:35 UTC 2019


On Thu, Jan 17, 2019 at 6:48 AM Evan Quan <evan.quan at amd.com> wrote:
>
> No dpm level setting is needed when the request level
> is actually same as current.
>
> Change-Id: I3ffa0b111a7b37f78a6a4dc1a36d49f0496dd6f9
> Signed-off-by: Evan Quan <evan.quan at amd.com>

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c b/drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c
> index 56437866d120..68f3dcaa8070 100644
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c
> @@ -278,7 +278,8 @@ int psm_adjust_power_state_dynamic(struct pp_hwmgr *hwmgr, bool skip,
>
>         phm_notify_smc_display_config_after_ps_adjustment(hwmgr);
>
> -       if (!phm_force_dpm_levels(hwmgr, hwmgr->request_dpm_level))
> +       if ((hwmgr->request_dpm_level != hwmgr->dpm_level) &&
> +           !phm_force_dpm_levels(hwmgr, hwmgr->request_dpm_level))
>                 hwmgr->dpm_level = hwmgr->request_dpm_level;
>
>         if (hwmgr->dpm_level != AMD_DPM_FORCED_LEVEL_MANUAL) {
> --
> 2.20.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