Subsystems (3)
From 3348a4bb465834b165de80dc42d11630ac5c6a83 Mon Sep 17 00:00:00 2001
From: Jesse Zhang <[email protected]>
Date: Tue, 14 May 2024 13:59:18 +0800
Subject: [PATCH 2/2 v2] drm/amd/pm: check specific index for aldebaran
To avoid warning problems, drop index and
use PPSMC_MSG_GfxDriverReset instead of index for aldebaran.
Signed-off-by Jesse Zhang <[email protected]>
Suggested-by Lijo Lazar <[email protected]>
--- drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c +7 -6
@@ -1880,17 +1880,18 @@ static int aldebaran_mode1_reset(struct smu_context *smu)static int aldebaran_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 -EINVAL ;mutex_lock (&smu->message_lock);if (smu->smc_fw_version >=0x00441400 ) { - ret =smu_cmn_send_msg_without_waiting (smu, (uint16_t )index,SMU_RESET_MODE_2 ); + ret =smu_cmn_send_smc_msg_with_param (smu, PPSMC_MSG_GfxDriverReset, +SMU_RESET_MODE_2 ,NULL ); +if (ret) { +dev_err (smu->adev->dev,"Failed to mode2 reset!\n" ); + goto out; + }/* This is similar to FLR, wait till max FLR timeout */ msleep (100 );dev_dbg (smu->adev->dev,"restore config space...\n" );
Signature · 1 line
2.25.1