RE: [PATCH] drm/amd/pm: print the timeout of smc message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[AMD Official Use Only - Internal Distribution Only]

Reviewed-by: Evan Quan <evan.quan@xxxxxxx>

-----Original Message-----
From: Huang, Ray <Ray.Huang@xxxxxxx>
Sent: Wednesday, January 20, 2021 8:13 PM
To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx
Cc: Deucher, Alexander <Alexander.Deucher@xxxxxxx>; Quan, Evan <Evan.Quan@xxxxxxx>; Huang, Ray <Ray.Huang@xxxxxxx>
Subject: [PATCH] drm/amd/pm: print the timeout of smc message

This patch is to help firmware designer to know the smc message timeout
status.

Signed-off-by: Huang Rui <ray.huang@xxxxxxx>
---
 drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c b/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
index e4eff6d9f092..ffd373e63f0d 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
@@ -142,10 +142,15 @@ int smu_cmn_send_smc_msg_with_param(struct smu_context *smu,

 ret = smu_cmn_wait_for_response(smu);
 if (ret != 0x1) {
-dev_err(adev->dev, "failed send message: %10s (%d) \tparam: 0x%08x response %#x\n",
-smu_get_message_name(smu, msg), index, param, ret);
-if (ret != -ETIME)
+if (ret == -ETIME) {
+dev_err(adev->dev, "message: %10s (%d) \tparam: 0x%08x is timeout (no response)\n",
+smu_get_message_name(smu, msg), index, param);
+} else {
+dev_err(adev->dev, "failed send message: %10s (%d) \tparam: 0x%08x response %#x\n",
+smu_get_message_name(smu, msg), index, param,
+ret);
 ret = -EIO;
+}
 goto out;
 }

--
2.25.1

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



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux