Skip to contentSkip to conversation

drm/powerplay : send SMC message to set XGMI pstate

PATCH In review Liu, Shaoyun 2 participants 2 messages Apr 15, 2019 – Apr 16, 2019 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/powerplay : send SMC message to set XGMI pstate

Send message with parameter to SMC to set xgmi pstate

Change-Id I5d90cffd63690f31f0df62c206b263d300f14234
---
 drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/powerplay/smu_v11_0.c +7 -2
index c478b38..92903a4 100644
@@ -1896,8 +1896,13 @@ static int smu_v11_0_set_fan_speed_rpm(struct smu_context *smu,
 static int smu_v11_0_set_xgmi_pstate(struct smu_context *smu,
 				     uint32_t pstate)
 {
-	/* send msg to SMU to set pstate */
-	return 0;
+	int ret = 0;
+	mutex_lock(&(smu->mutex));
+	ret = smu_send_smc_msg_with_param(smu,
+					  SMU_MSG_SetXgmiMode,
+					  pstate ? XGMI_STATE_D0 : XGMI_STATE_D3);
+	mutex_unlock(&(smu->mutex));
+	return ret;
 }
 
 static const struct smu_funcs smu_v11_0_funcs = {
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1555341891-23223-1-git-send-email-shaoyun.liu-5C7GfCeVMHo@public.gmane.org

Reviewed-by Evan Quan
#2 lore raw
Quoted 42 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Liu, Shaoyun
Sent: Monday, April 15, 2019 11:25 PM
To: [email protected]
Cc: Liu, Shaoyun <[email protected]>
Subject: [PATCH] drm/powerplay : send SMC message to set XGMI pstate

Send message with parameter to SMC to set xgmi pstate

Change-Id I5d90cffd63690f31f0df62c206b263d300f14234
---
 drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/powerplay/smu_v11_0.c +0 -0
index c478b38..92903a4 100644
@@ -1896,8 +1896,13 @@ static int smu_v11_0_set_fan_speed_rpm(struct

smu_context *smu, static int smu_v11_0_set_xgmi_pstate(struct smu_context *smu,

drivers/gpu/drm/amd/powerplay/smu_v11_0.c +5 -2
 				     uint32_t pstate)
 {
-	/* send msg to SMU to set pstate */
-	return 0;
+	int ret = 0;
+	mutex_lock(&(smu->mutex));
+	ret = smu_send_smc_msg_with_param(smu,
+					  SMU_MSG_SetXgmiMode,
+					  pstate ? XGMI_STATE_D0 :

XGMI_STATE_D3);

drivers/gpu/drm/amd/powerplay/smu_v11_0.c +2 -1
+	mutex_unlock(&(smu->mutex));
+	return ret;
 }
 
 static const struct smu_funcs smu_v11_0_funcs = {
--

2.7.4

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx