drm: dpcd: Print more useful information during error
Subsystems (2)
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
@@ -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
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.
Signed-off-by Aurabindo Pillai <[email protected]>--- drivers/gpu/drm/drm_dp_helper.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/gpu/drm/drm_dp_helper.c +0
-0
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
-0ret = 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
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
@@ -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.
Signed-off-by Aurabindo Pillai <[email protected]>--- drivers/gpu/drm/drm_dp_helper.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/gpu/drm/drm_dp_helper.c +0
-0drivers/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
-0ret = err; unlock:--
Jani Nikula, Intel Open Source Graphics Center
Signature · 4 lines
Thanks and Regards, Aurabindo J Pillai https://aurabindo.in