Commit a8da8ff3 authored by Rex Zhu's avatar Rex Zhu Committed by Alex Deucher

drm/amdgpu: Rename set_mmhub_powergating_by_smu to powergate_mmhub

In order to keep consistent with powergate_uvd/vce.
Reviewed-by: default avatarEvan Quan <evan.quan@amd.com>
Signed-off-by: default avatarRex Zhu <Rex.Zhu@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 66917e56
...@@ -359,8 +359,8 @@ enum amdgpu_pcie_gen { ...@@ -359,8 +359,8 @@ enum amdgpu_pcie_gen {
((adev)->powerplay.pp_funcs->odn_edit_dpm_table(\ ((adev)->powerplay.pp_funcs->odn_edit_dpm_table(\
(adev)->powerplay.pp_handle, type, parameter, size)) (adev)->powerplay.pp_handle, type, parameter, size))
#define amdgpu_dpm_set_mmhub_powergating_by_smu(adev) \ #define amdgpu_dpm_powergate_mmhub(adev) \
((adev)->powerplay.pp_funcs->set_mmhub_powergating_by_smu( \ ((adev)->powerplay.pp_funcs->powergate_mmhub( \
(adev)->powerplay.pp_handle)) (adev)->powerplay.pp_handle))
struct amdgpu_dpm { struct amdgpu_dpm {
......
...@@ -471,8 +471,8 @@ void mmhub_v1_0_update_power_gating(struct amdgpu_device *adev, ...@@ -471,8 +471,8 @@ void mmhub_v1_0_update_power_gating(struct amdgpu_device *adev,
RENG_EXECUTE_ON_REG_UPDATE, 1); RENG_EXECUTE_ON_REG_UPDATE, 1);
WREG32_SOC15(MMHUB, 0, mmPCTL1_RENG_EXECUTE, pctl1_reng_execute); WREG32_SOC15(MMHUB, 0, mmPCTL1_RENG_EXECUTE, pctl1_reng_execute);
if (adev->powerplay.pp_funcs->set_mmhub_powergating_by_smu) if (adev->powerplay.pp_funcs->powergate_mmhub)
amdgpu_dpm_set_mmhub_powergating_by_smu(adev); amdgpu_dpm_powergate_mmhub(adev);
} else { } else {
pctl0_reng_execute = REG_SET_FIELD(pctl0_reng_execute, pctl0_reng_execute = REG_SET_FIELD(pctl0_reng_execute,
......
...@@ -269,7 +269,7 @@ struct amd_pm_funcs { ...@@ -269,7 +269,7 @@ struct amd_pm_funcs {
int (*get_power_profile_mode)(void *handle, char *buf); int (*get_power_profile_mode)(void *handle, char *buf);
int (*set_power_profile_mode)(void *handle, long *input, uint32_t size); int (*set_power_profile_mode)(void *handle, long *input, uint32_t size);
int (*odn_edit_dpm_table)(void *handle, uint32_t type, long *input, uint32_t size); int (*odn_edit_dpm_table)(void *handle, uint32_t type, long *input, uint32_t size);
int (*set_mmhub_powergating_by_smu)(void *handle); int (*powergate_mmhub)(void *handle);
}; };
#endif #endif
...@@ -1168,19 +1168,19 @@ static int pp_get_display_mode_validation_clocks(void *handle, ...@@ -1168,19 +1168,19 @@ static int pp_get_display_mode_validation_clocks(void *handle,
return ret; return ret;
} }
static int pp_set_mmhub_powergating_by_smu(void *handle) static int pp_dpm_powergate_mmhub(void *handle)
{ {
struct pp_hwmgr *hwmgr = handle; struct pp_hwmgr *hwmgr = handle;
if (!hwmgr || !hwmgr->pm_en) if (!hwmgr || !hwmgr->pm_en)
return -EINVAL; return -EINVAL;
if (hwmgr->hwmgr_func->set_mmhub_powergating_by_smu == NULL) { if (hwmgr->hwmgr_func->powergate_mmhub == NULL) {
pr_info("%s was not implemented.\n", __func__); pr_info("%s was not implemented.\n", __func__);
return 0; return 0;
} }
return hwmgr->hwmgr_func->set_mmhub_powergating_by_smu(hwmgr); return hwmgr->hwmgr_func->powergate_mmhub(hwmgr);
} }
static const struct amd_pm_funcs pp_dpm_funcs = { static const struct amd_pm_funcs pp_dpm_funcs = {
...@@ -1227,5 +1227,5 @@ static const struct amd_pm_funcs pp_dpm_funcs = { ...@@ -1227,5 +1227,5 @@ static 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, .powergate_mmhub = pp_dpm_powergate_mmhub,
}; };
...@@ -1126,7 +1126,7 @@ static int smu10_smus_notify_pwe(struct pp_hwmgr *hwmgr) ...@@ -1126,7 +1126,7 @@ static int smu10_smus_notify_pwe(struct pp_hwmgr *hwmgr)
return smum_send_msg_to_smc(hwmgr, PPSMC_MSG_SetRccPfcPmeRestoreRegister); return smum_send_msg_to_smc(hwmgr, PPSMC_MSG_SetRccPfcPmeRestoreRegister);
} }
static int smu10_set_mmhub_powergating_by_smu(struct pp_hwmgr *hwmgr) static int smu10_powergate_mmhub(struct pp_hwmgr *hwmgr)
{ {
return smum_send_msg_to_smc(hwmgr, PPSMC_MSG_PowerGateMmHub); return smum_send_msg_to_smc(hwmgr, PPSMC_MSG_PowerGateMmHub);
} }
...@@ -1182,7 +1182,7 @@ static const struct pp_hwmgr_func smu10_hwmgr_funcs = { ...@@ -1182,7 +1182,7 @@ static const struct pp_hwmgr_func smu10_hwmgr_funcs = {
.asic_setup = smu10_setup_asic_task, .asic_setup = smu10_setup_asic_task,
.power_state_set = smu10_set_power_state_tasks, .power_state_set = smu10_set_power_state_tasks,
.dynamic_state_management_disable = smu10_disable_dpm_tasks, .dynamic_state_management_disable = smu10_disable_dpm_tasks,
.set_mmhub_powergating_by_smu = smu10_set_mmhub_powergating_by_smu, .powergate_mmhub = smu10_powergate_mmhub,
.smus_notify_pwe = smu10_smus_notify_pwe, .smus_notify_pwe = smu10_smus_notify_pwe,
.gfx_off_control = smu10_gfx_off_control, .gfx_off_control = smu10_gfx_off_control,
.display_clock_voltage_request = smu10_display_clock_voltage_request, .display_clock_voltage_request = smu10_display_clock_voltage_request,
......
...@@ -327,7 +327,7 @@ struct pp_hwmgr_func { ...@@ -327,7 +327,7 @@ struct pp_hwmgr_func {
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_power_limit)(struct pp_hwmgr *hwmgr, uint32_t n); int (*set_power_limit)(struct pp_hwmgr *hwmgr, uint32_t n);
int (*set_mmhub_powergating_by_smu)(struct pp_hwmgr *hwmgr); int (*powergate_mmhub)(struct pp_hwmgr *hwmgr);
int (*smus_notify_pwe)(struct pp_hwmgr *hwmgr); int (*smus_notify_pwe)(struct pp_hwmgr *hwmgr);
}; };
......
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