mirror of
https://github.com/torvalds/linux.git
synced 2026-04-22 16:53:59 -04:00
drm/amd/powerplay: Unify dpm level defines
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -3906,25 +3906,25 @@ static int si_restrict_performance_levels_before_switch(struct amdgpu_device *ad
|
||||
}
|
||||
|
||||
static int si_dpm_force_performance_level(struct amdgpu_device *adev,
|
||||
enum amdgpu_dpm_forced_level level)
|
||||
enum amd_dpm_forced_level level)
|
||||
{
|
||||
struct amdgpu_ps *rps = adev->pm.dpm.current_ps;
|
||||
struct si_ps *ps = si_get_ps(rps);
|
||||
u32 levels = ps->performance_level_count;
|
||||
|
||||
if (level == AMDGPU_DPM_FORCED_LEVEL_HIGH) {
|
||||
if (level == AMD_DPM_FORCED_LEVEL_HIGH) {
|
||||
if (si_send_msg_to_smc_with_parameter(adev, PPSMC_MSG_SetEnabledLevels, levels) != PPSMC_Result_OK)
|
||||
return -EINVAL;
|
||||
|
||||
if (si_send_msg_to_smc_with_parameter(adev, PPSMC_MSG_SetForcedLevels, 1) != PPSMC_Result_OK)
|
||||
return -EINVAL;
|
||||
} else if (level == AMDGPU_DPM_FORCED_LEVEL_LOW) {
|
||||
} else if (level == AMD_DPM_FORCED_LEVEL_LOW) {
|
||||
if (si_send_msg_to_smc_with_parameter(adev, PPSMC_MSG_SetForcedLevels, 0) != PPSMC_Result_OK)
|
||||
return -EINVAL;
|
||||
|
||||
if (si_send_msg_to_smc_with_parameter(adev, PPSMC_MSG_SetEnabledLevels, 1) != PPSMC_Result_OK)
|
||||
return -EINVAL;
|
||||
} else if (level == AMDGPU_DPM_FORCED_LEVEL_AUTO) {
|
||||
} else if (level == AMD_DPM_FORCED_LEVEL_AUTO) {
|
||||
if (si_send_msg_to_smc_with_parameter(adev, PPSMC_MSG_SetForcedLevels, 0) != PPSMC_Result_OK)
|
||||
return -EINVAL;
|
||||
|
||||
@@ -7746,7 +7746,7 @@ static int si_dpm_sw_init(void *handle)
|
||||
/* default to balanced state */
|
||||
adev->pm.dpm.state = POWER_STATE_TYPE_BALANCED;
|
||||
adev->pm.dpm.user_state = POWER_STATE_TYPE_BALANCED;
|
||||
adev->pm.dpm.forced_level = AMDGPU_DPM_FORCED_LEVEL_AUTO;
|
||||
adev->pm.dpm.forced_level = AMD_DPM_FORCED_LEVEL_AUTO;
|
||||
adev->pm.default_sclk = adev->clock.default_sclk;
|
||||
adev->pm.default_mclk = adev->clock.default_mclk;
|
||||
adev->pm.current_sclk = adev->clock.default_sclk;
|
||||
|
||||
Reference in New Issue
Block a user