drm/amd/powerplay: check before issuing messages for max sustainable clocks

Submitted by Xu, Feifei on Aug. 6, 2019, 8:32 a.m.

Details

Message ID CH2PR12MB37670D0D4F293AF87B520905FED50@CH2PR12MB3767.namprd12.prod.outlook.com
State New
Headers show
Series "drm/amd/powerplay: check before issuing messages for max sustainable clocks" ( rev: 2 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Xu, Feifei Aug. 6, 2019, 8:32 a.m.
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com>


-----Original Message-----
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Evan Quan

Sent: Tuesday, August 6, 2019 4:21 PM
To: amd-gfx@lists.freedesktop.org
Cc: Quan, Evan <Evan.Quan@amd.com>
Subject: [PATCH] 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

Change-Id: I391099fc28e00356234fd2ae7b68f5861fd4c147
Signed-off-by: Evan Quan <evan.quan@amd.com>

---
 drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 4 ++++
 1 file changed, 4 insertions(+)

--
2.22.0

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
index 84eb14a6650f..2ddb4ec75305 100644
--- a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
+++ b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
@@ -905,6 +905,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;