diff options
author | Evan Quan <evan.quan@amd.com> | 2019-08-06 16:14:22 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-08-06 13:53:13 -0500 |
commit | 8dd45504a7d70a23be6e4415edbac0e197935686 (patch) | |
tree | 9fc091d053b89d414f5f3d3b90982738f0a147ab /drivers/gpu | |
parent | b5c73856408b8431eeb29bc1f7d41dbe7549b75b (diff) |
drm/amd/powerplay: check before issuing messages for max sustainable clocks
Those messages are not supported on Arcturus and should not be
issued.
Affected ASIC: Arcturus
Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 4 |
1 files changed, 4 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 ee739c080943..8c4d3ee0295a 100644 --- a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c +++ b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c @@ -908,6 +908,10 @@ smu_v11_0_get_max_sustainable_clock(struct smu_context *smu, uint32_t *clock, if (!smu->pm_enabled) return ret; + if ((smu_msg_get_index(smu, SMU_MSG_GetDcModeMaxDpmFreq) < 0) || + (smu_msg_get_index(smu, SMU_MSG_GetMaxDpmFreq) < 0)) + return 0; + clk_id = smu_clk_get_index(smu, clock_select); if (clk_id < 0) return -EINVAL; |