From: Evan Quan Date: Tue, 6 Aug 2019 08:14:22 +0000 (+0800) Subject: drm/amd/powerplay: check before issuing messages for max sustainable clocks X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=8dd45504a7d70a23be6e4415edbac0e197935686;p=linux.git 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 Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c index ee739c0809431..8c4d3ee0295a9 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;