drm/amd/pm: print the timeout of smc message
Subsystems (3)
PATCH 1/1 drm/amd/pm: print the timeout of smc message
This patch is to help firmware designer to know the smc message timeout status.
--- drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c +8 -3
@@ -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; }
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
________________________________
From: amd-gfx <[email protected]> on behalf of Huang Rui <[email protected]>
Sent: Wednesday, January 20, 2021 8:13 PM
To: [email protected] <[email protected]>
Cc: Deucher, Alexander <[email protected]>; Quan, Evan <[email protected]>; Huang, Ray <[email protected]>
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.
--- drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c +7 -3
@@ -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 ;
[kevin]:
the print format %10s is right aligned by default, change to %-10s is better to show it in kernel log. and change 10 to 15 is better to adapt for all SMU msg names..
Best Regards,
Kevin
+ }
goto out;
}--
2.25.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7CKevin1.Wang%40amd.com%7C0d1fa26019a94de6aefe08d8bd3cd3c1%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637467416247588610%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=lUw0Kl44HCu83kjeTqCsSNP62KztSTGO80w6Yl6RaXc%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
-----Original Message-----
From: Huang, Ray <[email protected]>
Sent: Wednesday, January 20, 2021 8:13 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Quan, Evan <[email protected]>; Huang, Ray <[email protected]>
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.
--- drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c +8 -3
@@ -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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx