Commit 203ed53f authored by Xiaomeng Hou's avatar Xiaomeng Hou Committed by Alex Deucher

drm/amd/pm: disable manually setting MCLK power level on yellow carp

PMFW provides specific messages for setting fclk freq range thus adjust
the power level. There's misusing of these messages when setting
dpm mclk. Since actually mclk could adjust automatically complying with
fclk, remove standalone support for mclk dpm level setting.
Acked-by: default avatarHuang Rui <ray.huang@amd.com>
Signed-off-by: default avatarXiaomeng Hou <Xiaomeng.Hou@amd.com>
Reviewed-by: default avatarEvan Quan <evan.quan@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 7d38d9dc
...@@ -964,7 +964,6 @@ static int yellow_carp_set_soft_freq_limited_range(struct smu_context *smu, ...@@ -964,7 +964,6 @@ static int yellow_carp_set_soft_freq_limited_range(struct smu_context *smu,
msg_set_max = SMU_MSG_SetSoftMaxGfxClk; msg_set_max = SMU_MSG_SetSoftMaxGfxClk;
break; break;
case SMU_FCLK: case SMU_FCLK:
case SMU_MCLK:
msg_set_min = SMU_MSG_SetHardMinFclkByFreq; msg_set_min = SMU_MSG_SetHardMinFclkByFreq;
msg_set_max = SMU_MSG_SetSoftMaxFclkByFreq; msg_set_max = SMU_MSG_SetSoftMaxFclkByFreq;
break; break;
...@@ -1054,7 +1053,6 @@ static int yellow_carp_force_clk_levels(struct smu_context *smu, ...@@ -1054,7 +1053,6 @@ static int yellow_carp_force_clk_levels(struct smu_context *smu,
switch (clk_type) { switch (clk_type) {
case SMU_SOCCLK: case SMU_SOCCLK:
case SMU_MCLK:
case SMU_FCLK: case SMU_FCLK:
case SMU_VCLK: case SMU_VCLK:
case SMU_DCLK: case SMU_DCLK:
...@@ -1084,30 +1082,30 @@ static int yellow_carp_set_performance_level(struct smu_context *smu, ...@@ -1084,30 +1082,30 @@ static int yellow_carp_set_performance_level(struct smu_context *smu,
{ {
struct amdgpu_device *adev = smu->adev; struct amdgpu_device *adev = smu->adev;
uint32_t sclk_min = 0, sclk_max = 0; uint32_t sclk_min = 0, sclk_max = 0;
uint32_t mclk_min = 0, mclk_max = 0; uint32_t fclk_min = 0, fclk_max = 0;
uint32_t socclk_min = 0, socclk_max = 0; uint32_t socclk_min = 0, socclk_max = 0;
int ret = 0; int ret = 0;
switch (level) { switch (level) {
case AMD_DPM_FORCED_LEVEL_HIGH: case AMD_DPM_FORCED_LEVEL_HIGH:
yellow_carp_get_dpm_ultimate_freq(smu, SMU_SCLK, NULL, &sclk_max); yellow_carp_get_dpm_ultimate_freq(smu, SMU_SCLK, NULL, &sclk_max);
yellow_carp_get_dpm_ultimate_freq(smu, SMU_MCLK, NULL, &mclk_max); yellow_carp_get_dpm_ultimate_freq(smu, SMU_FCLK, NULL, &fclk_max);
yellow_carp_get_dpm_ultimate_freq(smu, SMU_SOCCLK, NULL, &socclk_max); yellow_carp_get_dpm_ultimate_freq(smu, SMU_SOCCLK, NULL, &socclk_max);
sclk_min = sclk_max; sclk_min = sclk_max;
mclk_min = mclk_max; fclk_min = fclk_max;
socclk_min = socclk_max; socclk_min = socclk_max;
break; break;
case AMD_DPM_FORCED_LEVEL_LOW: case AMD_DPM_FORCED_LEVEL_LOW:
yellow_carp_get_dpm_ultimate_freq(smu, SMU_SCLK, &sclk_min, NULL); yellow_carp_get_dpm_ultimate_freq(smu, SMU_SCLK, &sclk_min, NULL);
yellow_carp_get_dpm_ultimate_freq(smu, SMU_MCLK, &mclk_min, NULL); yellow_carp_get_dpm_ultimate_freq(smu, SMU_FCLK, &fclk_min, NULL);
yellow_carp_get_dpm_ultimate_freq(smu, SMU_SOCCLK, &socclk_min, NULL); yellow_carp_get_dpm_ultimate_freq(smu, SMU_SOCCLK, &socclk_min, NULL);
sclk_max = sclk_min; sclk_max = sclk_min;
mclk_max = mclk_min; fclk_max = fclk_min;
socclk_max = socclk_min; socclk_max = socclk_min;
break; break;
case AMD_DPM_FORCED_LEVEL_AUTO: case AMD_DPM_FORCED_LEVEL_AUTO:
yellow_carp_get_dpm_ultimate_freq(smu, SMU_SCLK, &sclk_min, &sclk_max); yellow_carp_get_dpm_ultimate_freq(smu, SMU_SCLK, &sclk_min, &sclk_max);
yellow_carp_get_dpm_ultimate_freq(smu, SMU_MCLK, &mclk_min, &mclk_max); yellow_carp_get_dpm_ultimate_freq(smu, SMU_FCLK, &fclk_min, &fclk_max);
yellow_carp_get_dpm_ultimate_freq(smu, SMU_SOCCLK, &socclk_min, &socclk_max); yellow_carp_get_dpm_ultimate_freq(smu, SMU_SOCCLK, &socclk_min, &socclk_max);
break; break;
case AMD_DPM_FORCED_LEVEL_PROFILE_STANDARD: case AMD_DPM_FORCED_LEVEL_PROFILE_STANDARD:
...@@ -1136,11 +1134,11 @@ static int yellow_carp_set_performance_level(struct smu_context *smu, ...@@ -1136,11 +1134,11 @@ static int yellow_carp_set_performance_level(struct smu_context *smu,
smu->gfx_actual_soft_max_freq = sclk_max; smu->gfx_actual_soft_max_freq = sclk_max;
} }
if (mclk_min && mclk_max) { if (fclk_min && fclk_max) {
ret = yellow_carp_set_soft_freq_limited_range(smu, ret = yellow_carp_set_soft_freq_limited_range(smu,
SMU_MCLK, SMU_FCLK,
mclk_min, fclk_min,
mclk_max); fclk_max);
if (ret) if (ret)
return ret; return ret;
} }
......
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