Commit 31bc45de authored by Rex Zhu's avatar Rex Zhu Committed by Alex Deucher

drm/amd/pp: Add common interface in smu for update dpm setting

it is used for adjust part of dpm settigs per workloads
to change the natural dpm behavior for better perf or perf/watt.
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarRex Zhu <Rex.Zhu@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 15826fbf
...@@ -239,6 +239,7 @@ struct pp_smumgr_func { ...@@ -239,6 +239,7 @@ struct pp_smumgr_func {
int (*populate_requested_graphic_levels)(struct pp_hwmgr *hwmgr, int (*populate_requested_graphic_levels)(struct pp_hwmgr *hwmgr,
struct amd_pp_profile *request); struct amd_pp_profile *request);
bool (*is_hw_avfs_present)(struct pp_hwmgr *hwmgr); bool (*is_hw_avfs_present)(struct pp_hwmgr *hwmgr);
int (*update_dpm_settings)(struct pp_hwmgr *hwmgr, void *profile_setting);
}; };
struct pp_hwmgr_func { struct pp_hwmgr_func {
......
...@@ -134,5 +134,6 @@ extern int smum_populate_requested_graphic_levels(struct pp_hwmgr *hwmgr, ...@@ -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 bool smum_is_hw_avfs_present(struct pp_hwmgr *hwmgr);
extern int smum_update_dpm_settings(struct pp_hwmgr *hwmgr, void *profile_setting);
#endif #endif
...@@ -253,3 +253,11 @@ bool smum_is_hw_avfs_present(struct pp_hwmgr *hwmgr) ...@@ -253,3 +253,11 @@ bool smum_is_hw_avfs_present(struct pp_hwmgr *hwmgr)
return false; 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;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment