diff options
author | Evan Quan <evan.quan@amd.com> | 2020-07-07 10:24:31 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2020-07-21 15:37:37 -0400 |
commit | d23c3ccc217649884a12af001fd131d057db0a8a (patch) | |
tree | da75a05093db9767b891ce48b9f93b26884dbb5e /drivers/gpu/drm/amd/powerplay/smu_v11_0.c | |
parent | 8264ee69f0d82cc1b30edd9930c27b1e4273d00b (diff) | |
download | linux-d23c3ccc217649884a12af001fd131d057db0a8a.tar.bz2 |
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: Evan Quan <evan.quan@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/smu_v11_0.c')
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c index f5a981d79ee3..17b165e42853 100644 --- a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c +++ b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c @@ -1769,6 +1769,9 @@ int smu_v11_0_set_soft_freq_limited_range(struct smu_context *smu, int ret = 0, clk_id = 0; uint32_t param; + if (!smu_clk_dpm_is_enabled(smu, clk_type)) + return 0; + clk_id = smu_cmn_to_asic_specific_index(smu, CMN2ASIC_MAPPING_CLK, clk_type); |