Skip to contentSkip to conversation

drm: dpcd: Print more useful information during error

PATCH In review Aurabindo Pillai 2 participants 3 messages Apr 9, 2020 – Apr 16, 2020

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

PATCH 1/1 drm: dpcd: Print more useful information during error

When DPCD access errors occur, knowing the register and request associated with the error helps debugging, so print the details in the debug message.

---
 drivers/gpu/drm/drm_dp_helper.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/drm_dp_helper.c +3 -1
index a5364b519..545606aac 100644
@@ -257,7 +257,9 @@ static int drm_dp_dpcd_access(struct drm_dp_aux *aux, u8 request,
 			err = ret;
 	}
 
-	DRM_DEBUG_KMS("Too many retries, giving up. First error: %d\n", err);
+	DRM_DEBUG_KMS("dpcd: Too many retries, giving up. First error: %d\t"
+		      "address: %x\trequest: %x\t size:%zu\n",
+		      err, msg.address, msg.request, msg.size);
 	ret = err;
 
 unlock:
Signature · 1 line
2.26.0
#1 lore raw
Quoted 14 lines · Aurabindo Pillai

When DPCD access errors occur, knowing the register and request associated with the error helps debugging, so print the details in the debug message.

---
 drivers/gpu/drm/drm_dp_helper.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/drm_dp_helper.c +0 -0
index a5364b519..545606aac 100644

drivers/gpu/drm/drm_dp_helper.c static int drm_dp_dpcd_access(struct drm_dp_aux *aux, u8 request, · line 262

Quoted 7 lines
drivers/gpu/drm/drm_dp_helper.c +3 -1
@@ -257,7 +257,9 @@ static int drm_dp_dpcd_access(struct drm_dp_aux *aux, u8 request,
 			err = ret;
 	}
 
-	DRM_DEBUG_KMS("Too many retries, giving up. First error: %d\n", err);
+	DRM_DEBUG_KMS("dpcd: Too many retries, giving up. First error: %d\t"
+		      "address: %x\trequest: %x\t size:%zu\n",
+		      err, msg.address, msg.request, msg.size);

Nitpicks, please don't add tabs, maybe use commas instead, and please add 0x in front of hex.

BR,
Jani.

Quoted 3 lines
drivers/gpu/drm/drm_dp_helper.c +0 -0
 	ret = err;
 
 unlock:
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw

When DPCD access errors occur, knowing the register and request associated with the error helps debugging, so print the details in the debug message.

---
 drivers/gpu/drm/drm_dp_helper.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/drm_dp_helper.c +0 -0
index c6fbe6e6b..8aafc01f5 100644
@@ -257,7 +257,9 @@ static int drm_dp_dpcd_access(struct drm_dp_aux

*aux, u8 request,

                        err = ret;
        }

- DRM_DEBUG_KMS("Too many retries, giving up. First error: %d\n", err);
+ DRM_DEBUG_KMS("dpcd: Too many retries, giving up. First error: %d,"
+ " address: 0x%x, request: 0x%x, size:%zu\n",

+                     err, msg.address, msg.request, msg.size);
        ret = err;

unlock:
--
2.26.0

Quoted 37 lines · Jani Nikula
Quoted 14 lines · Aurabindo Pillai

When DPCD access errors occur, knowing the register and request associated with the error helps debugging, so print the details in the debug message.

---
 drivers/gpu/drm/drm_dp_helper.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/drm_dp_helper.c +0 -0
index a5364b519..545606aac 100644

drivers/gpu/drm/drm_dp_helper.c static int drm_dp_dpcd_access(struct drm_dp_aux *aux, u8 request, · line 262

Quoted 7 lines
drivers/gpu/drm/drm_dp_helper.c +3 -1
@@ -257,7 +257,9 @@ static int drm_dp_dpcd_access(struct drm_dp_aux *aux, u8 request,
                      err = ret;
      }
 
-     DRM_DEBUG_KMS("Too many retries, giving up. First error: %d\n", err);
+     DRM_DEBUG_KMS("dpcd: Too many retries, giving up. First error: %d\t"
+                   "address: %x\trequest: %x\t size:%zu\n",
+                   err, msg.address, msg.request, msg.size);

Nitpicks, please don't add tabs, maybe use commas instead, and please add 0x in front of hex.

BR,
Jani.

drivers/gpu/drm/drm_dp_helper.c static int drm_dp_dpcd_access(struct drm_dp_aux *aux, u8 request, · line 265

Quoted 3 lines
drivers/gpu/drm/drm_dp_helper.c +0 -0
      ret = err;
 
 unlock:

--
Jani Nikula, Intel Open Source Graphics Center

Signature · 4 lines
Thanks and Regards,

Aurabindo J Pillai
https://aurabindo.in