Commit 72d76191 authored by Eric Huang's avatar Eric Huang Committed by Alex Deucher

drm/amd/powerplay: add mmhub powergating by smu in powerplay

new generic interface is added in powerplay.
Signed-off-by: default avatarEric Huang <JinHuiEric.Huang@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent b01a4f48
...@@ -1475,6 +1475,27 @@ static int pp_get_display_mode_validation_clocks(void *handle, ...@@ -1475,6 +1475,27 @@ static int pp_get_display_mode_validation_clocks(void *handle,
return ret; return ret;
} }
static int pp_set_mmhub_powergating_by_smu(void *handle)
{
struct pp_hwmgr *hwmgr;
struct pp_instance *pp_handle = (struct pp_instance *)handle;
int ret = 0;
ret = pp_check(pp_handle);
if (ret)
return ret;
hwmgr = pp_handle->hwmgr;
if (hwmgr->hwmgr_func->set_mmhub_powergating_by_smu == NULL) {
pr_info("%s was not implemented.\n", __func__);
return 0;
}
return hwmgr->hwmgr_func->set_mmhub_powergating_by_smu(hwmgr);
}
const struct amd_pm_funcs pp_dpm_funcs = { const struct amd_pm_funcs pp_dpm_funcs = {
.load_firmware = pp_dpm_load_fw, .load_firmware = pp_dpm_load_fw,
.wait_for_fw_loading_complete = pp_dpm_fw_loading_complete, .wait_for_fw_loading_complete = pp_dpm_fw_loading_complete,
...@@ -1521,4 +1542,5 @@ const struct amd_pm_funcs pp_dpm_funcs = { ...@@ -1521,4 +1542,5 @@ const struct amd_pm_funcs pp_dpm_funcs = {
.set_watermarks_for_clocks_ranges = pp_set_watermarks_for_clocks_ranges, .set_watermarks_for_clocks_ranges = pp_set_watermarks_for_clocks_ranges,
.display_clock_voltage_request = pp_display_clock_voltage_request, .display_clock_voltage_request = pp_display_clock_voltage_request,
.get_display_mode_validation_clocks = pp_get_display_mode_validation_clocks, .get_display_mode_validation_clocks = pp_get_display_mode_validation_clocks,
.set_mmhub_powergating_by_smu = pp_set_mmhub_powergating_by_smu,
}; };
...@@ -347,6 +347,7 @@ struct pp_hwmgr_func { ...@@ -347,6 +347,7 @@ struct pp_hwmgr_func {
int (*odn_edit_dpm_table)(struct pp_hwmgr *hwmgr, int (*odn_edit_dpm_table)(struct pp_hwmgr *hwmgr,
enum PP_OD_DPM_TABLE_COMMAND type, enum PP_OD_DPM_TABLE_COMMAND type,
long *input, uint32_t size); long *input, uint32_t size);
int (*set_mmhub_powergating_by_smu)(struct pp_hwmgr *hwmgr);
}; };
struct pp_table_func { struct pp_table_func {
......
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