Skip to contentSkip to conversation

drm/amd/pm: check specific index for smu13

PATCH In review Jesse Zhang 1 participant 1 message May 14, 2024

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

PATCH 1/2 drm/amd/pm: check specific index for smu13

To avoid warning problems, drop index and
use PPSMC_MSG_GfxDriverReset instead of index for smu13.

---
 .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c  | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +5 -10
index 46ab70a244af..27ec95a4e81d 100644
@@ -2330,20 +2330,15 @@ static void smu_v13_0_6_restore_pci_config(struct smu_context *smu)
 
 static int smu_v13_0_6_mode2_reset(struct smu_context *smu)
 {
-	int ret = 0, index;
+	int ret = 0;
 	struct amdgpu_device *adev = smu->adev;
 	int timeout = 10;
 
-	index = smu_cmn_to_asic_specific_index(smu, CMN2ASIC_MAPPING_MSG,
-					       SMU_MSG_GfxDeviceDriverReset);
-	if (index < 0)
-		return index;
-
 	mutex_lock(&smu->message_lock);
-
-	ret = smu_cmn_send_msg_without_waiting(smu, (uint16_t)index,
-					       SMU_RESET_MODE_2);
-
+	ret = smu_cmn_send_smc_msg_with_param(smu, SMU_MSG_GfxDeviceDriverReset,
+						SMU_RESET_MODE_2, NULL);
+	if (ret)
+		goto out;
 	/* Reset takes a bit longer, wait for 200ms. */
 	msleep(200);
 
Signature · 1 line
2.25.1