Commit d23c3ccc authored by Evan Quan's avatar Evan Quan Committed by Alex Deucher

drm/amd/powerplay: move clock dpm enablement check to smu_v11/v12

As those APIs of smu_v11/v12 are more widely called. And they
need this check also.
Signed-off-by: default avatarEvan Quan <evan.quan@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 8264ee69
...@@ -262,9 +262,6 @@ int smu_set_soft_freq_range(struct smu_context *smu, ...@@ -262,9 +262,6 @@ int smu_set_soft_freq_range(struct smu_context *smu,
{ {
int ret = 0; int ret = 0;
if (!smu_clk_dpm_is_enabled(smu, clk_type))
return 0;
mutex_lock(&smu->mutex); mutex_lock(&smu->mutex);
if (smu->ppt_funcs->set_soft_freq_limited_range) if (smu->ppt_funcs->set_soft_freq_limited_range)
......
...@@ -1769,6 +1769,9 @@ int smu_v11_0_set_soft_freq_limited_range(struct smu_context *smu, ...@@ -1769,6 +1769,9 @@ int smu_v11_0_set_soft_freq_limited_range(struct smu_context *smu,
int ret = 0, clk_id = 0; int ret = 0, clk_id = 0;
uint32_t param; uint32_t param;
if (!smu_clk_dpm_is_enabled(smu, clk_type))
return 0;
clk_id = smu_cmn_to_asic_specific_index(smu, clk_id = smu_cmn_to_asic_specific_index(smu,
CMN2ASIC_MAPPING_CLK, CMN2ASIC_MAPPING_CLK,
clk_type); clk_type);
......
...@@ -328,6 +328,9 @@ int smu_v12_0_set_soft_freq_limited_range(struct smu_context *smu, enum smu_clk_ ...@@ -328,6 +328,9 @@ int smu_v12_0_set_soft_freq_limited_range(struct smu_context *smu, enum smu_clk_
{ {
int ret = 0; int ret = 0;
if (!smu_clk_dpm_is_enabled(smu, clk_type))
return 0;
switch (clk_type) { switch (clk_type) {
case SMU_GFXCLK: case SMU_GFXCLK:
case SMU_SCLK: case SMU_SCLK:
......
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