From: Lyude Date: Sat, 6 Aug 2016 00:30:33 +0000 (-0400) Subject: drm/dp_helper: Print first error received on failure in drm_dp_dpcd_access() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=29f21e0491819d05d28b4a1f7a5b7e68f802c60b;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/dp_helper: Print first error received on failure in drm_dp_dpcd_access() Since we always retry in drm_dp_dpcd_access() regardless of the error, we're going to make a lot of noise if the aux->transfer function prints it's own errors (as is the case with radeon). If we can print the error code here, this reduces the need for drivers to do this. So instead of having to print "dp_aux_ch timed out" over 32 times we can just print once. Signed-off-by: Lyude Reviewed-by: Christian König Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1470443443-27252-2-git-send-email-cpaul@redhat.com --- diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c index eae5ef963cb7..198e9e22f72b 100644 --- a/drivers/gpu/drm/drm_dp_helper.c +++ b/drivers/gpu/drm/drm_dp_helper.c @@ -223,7 +223,7 @@ static int drm_dp_dpcd_access(struct drm_dp_aux *aux, u8 request, err = ret; } - DRM_DEBUG_KMS("too many retries, giving up\n"); + DRM_DEBUG_KMS("Too many retries, giving up. First error: %d\n", err); ret = err; unlock: