[PATCH 2/7] drm/amd/pm: enhance the real response for smu message

Quan, Evan Evan.Quan at amd.com
Fri Jan 8 10:02:37 UTC 2021


[AMD Official Use Only - Internal Distribution Only]

Better to make this modification in smu_cmn_wait_for_response.

-----Original Message-----
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Huang Rui
Sent: Friday, January 8, 2021 4:55 PM
To: amd-gfx at lists.freedesktop.org
Cc: Deucher, Alexander <Alexander.Deucher at amd.com>; Hou, Xiaomeng (Matthew) <Xiaomeng.Hou at amd.com>; Huang, Ray <Ray.Huang at amd.com>; Liu, Aaron <Aaron.Liu at amd.com>; Du, Xiaojian <Xiaojian.Du at amd.com>
Subject: [PATCH 2/7] drm/amd/pm: enhance the real response for smu message

The user prefers to know the real response value from C2PMSG 90 register which is written by firmware not -EIO.

Signed-off-by: Huang Rui <ray.huang at amd.com>
---
 drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c b/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
index f8260769061c..42b125701436 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
@@ -111,6 +111,7 @@ int smu_cmn_send_smc_msg_with_param(struct smu_context *smu,  {
 struct amdgpu_device *adev = smu->adev;
 int ret = 0, index = 0;
+int response;

 if (smu->adev->in_pci_err_recovery)
 return 0;
@@ -137,8 +138,9 @@ int smu_cmn_send_smc_msg_with_param(struct smu_context *smu,

 ret = smu_cmn_wait_for_response(smu);
 if (ret) {
+response = RREG32_SOC15_NO_KIQ(MP1, 0, mmMP1_SMN_C2PMSG_90);
 dev_err(adev->dev, "failed send message: %10s (%d) \tparam: 0x%08x response %#x\n",
-       smu_get_message_name(smu, msg), index, param, ret);
+       smu_get_message_name(smu, msg), index, param, response);
 goto out;
 }

--
2.25.1

_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Cevan.quan%40amd.com%7C718dcaae805d4ff6474b08d8b3b33521%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637456929563780241%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Ja6ng8bQk7EFStqmiTizGOC202Aw78HLlL5XvXNKZzo%3D&reserved=0


More information about the amd-gfx mailing list