Skip to contentSkip to conversation

drm/amd/pm: Enhanced reporting also for a stuck command

PATCH In review Luben Tuikov 2 participants 2 messages Nov 10, 2021

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

PATCH 1/1 drm/amd/pm: Enhanced reporting also for a stuck command

Also print the message index and parameter of the stuck command.

---
 drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c +6 -2
index 843d2cbfc71d4c..ea6f50c08c5f3b 100644
@@ -139,9 +139,13 @@ static void __smu_cmn_reg_print_error(struct smu_context *smu,
 	const char *message = smu_get_message_name(smu, msg);
 
 	switch (reg_c2pmsg_90) {
-	case SMU_RESP_NONE:
+	case SMU_RESP_NONE: {
+		u32 msg_idx = RREG32_SOC15(MP1, 0, mmMP1_SMN_C2PMSG_66);
+		u32 prm     = RREG32_SOC15(MP1, 0, mmMP1_SMN_C2PMSG_82);
 		dev_err_ratelimited(adev->dev,
-				    "SMU: I'm not done with your previous command!");
+				    "SMU: I'm not done with your previous command: SMN_C2PMSG_66:0x%08X SMN_C2PMSG_82:0x%08X",
+				    msg_idx, prm);
+	}
 		break;
 	case SMU_RESP_OK:
 		/* The SMU executed the command. It completed with a

base-commit: 14271bc7f5e7ec276c58927ea87af9e81d97fdf3

Signature · 1 line
2.33.1.558.g2bd2f258f4
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Luben Tuikov

Also print the message index and parameter of the stuck command.

Quoted 29 lines
---
 drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c +6 -2
index 843d2cbfc71d4c..ea6f50c08c5f3b 100644
@@ -139,9 +139,13 @@ static void __smu_cmn_reg_print_error(struct smu_context *smu,
        const char *message = smu_get_message_name(smu, msg);
 
        switch (reg_c2pmsg_90) {
-       case SMU_RESP_NONE:
+       case SMU_RESP_NONE: {
+               u32 msg_idx = RREG32_SOC15(MP1, 0, mmMP1_SMN_C2PMSG_66);
+               u32 prm     = RREG32_SOC15(MP1, 0, mmMP1_SMN_C2PMSG_82);
                dev_err_ratelimited(adev->dev,
-                                   "SMU: I'm not done with your previous command!");
+                                   "SMU: I'm not done with your previous command: SMN_C2PMSG_66:0x%08X SMN_C2PMSG_82:0x%08X",
+                                   msg_idx, prm);
+       }
                break;
        case SMU_RESP_OK:
                /* The SMU executed the command. It completed with a

base-commit: 14271bc7f5e7ec276c58927ea87af9e81d97fdf3 --
2.33.1.558.g2bd2f258f4