[PATCH 1/3] drm/amd/pp: Remove reduplicate code in smu7_check_dpm_table_updated

Alex Deucher alexdeucher at gmail.com
Thu Apr 19 02:18:35 UTC 2018


On Wed, Apr 18, 2018 at 9:13 AM, Rex Zhu <Rex.Zhu at amd.com> wrote:
> Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>

Please include a patch description.  With that fixed:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
> index 720ac47..9654593 100644
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
> @@ -4683,10 +4683,6 @@ static void smu7_check_dpm_table_updated(struct pp_hwmgr *hwmgr)
>                         return;
>                 }
>         }
> -       if (i == dep_table->count && data->need_update_smu7_dpm_table & DPMTABLE_OD_UPDATE_VDDC) {
> -               data->need_update_smu7_dpm_table &= ~DPMTABLE_OD_UPDATE_VDDC;
> -               data->need_update_smu7_dpm_table |= DPMTABLE_OD_UPDATE_MCLK;
> -       }
>
>         dep_table = table_info->vdd_dep_on_sclk;
>         odn_dep_table = (struct phm_ppt_v1_clock_voltage_dependency_table *)&(odn_table->vdd_dependency_on_sclk);
> @@ -4696,9 +4692,9 @@ static void smu7_check_dpm_table_updated(struct pp_hwmgr *hwmgr)
>                         return;
>                 }
>         }
> -       if (i == dep_table->count && data->need_update_smu7_dpm_table & DPMTABLE_OD_UPDATE_VDDC) {
> +       if (data->need_update_smu7_dpm_table & DPMTABLE_OD_UPDATE_VDDC) {
>                 data->need_update_smu7_dpm_table &= ~DPMTABLE_OD_UPDATE_VDDC;
> -               data->need_update_smu7_dpm_table |= DPMTABLE_OD_UPDATE_SCLK;
> +               data->need_update_smu7_dpm_table |= DPMTABLE_OD_UPDATE_SCLK | DPMTABLE_OD_UPDATE_MCLK;
>         }
>  }
>
> --
> 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