On Thu, Feb 8, 2018 at 4:14 AM, Rex Zhu <Rex.Zhu at amd.com> wrote: > it is used for adjust part of dpm settigs > to get better performance under different > workloads. > > Change-Id: I1e1ed786e9c07c91fb7e810af5b1ec5dd5cc4791 > Signed-off-by: Rex Zhu <Rex.Zhu at amd.com> Reviewed-by: Alex Deucher <alexander.deucher at amd.com> > --- > 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 77d7f49..31988d7 100644 > --- a/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h > +++ b/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h > @@ -239,6 +239,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; > +} > -- > 1.9.1 > > _______________________________________________ > amd-gfx mailing list > amd-gfx at lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx