summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorLyude <cpaul@redhat.com>2016-08-06 00:30:39 (GMT)
committerDaniel Vetter <daniel.vetter@ffwll.ch>2016-08-09 16:23:44 (GMT)
commit9622c38f1cbab00aa2f52715ec950c5c5f838aa5 (patch)
tree24c7091e4cc5d2d9e3a5e3f460f14337e52ff776 /drivers/gpu
parent29f21e0491819d05d28b4a1f7a5b7e68f802c60b (diff)
downloadlinux-9622c38f1cbab00aa2f52715ec950c5c5f838aa5.tar.xz
drm/dp_helper: Rate limit timeout errors from drm_dp_i2c_do_msg()
Timeouts can be errors, but timeouts are also usually normal behavior and happen a lot. Since the kernel already lets us know when we're suppressing messages due to rate limiting, rate limit timeout errors so we don't make too much noise in the kernel log. Signed-off-by: Lyude <cpaul@redhat.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1470443443-27252-8-git-send-email-cpaul@redhat.com
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/drm_dp_helper.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c
index 198e9e2..5d20255 100644
--- a/drivers/gpu/drm/drm_dp_helper.c
+++ b/drivers/gpu/drm/drm_dp_helper.c
@@ -574,7 +574,17 @@ static int drm_dp_i2c_do_msg(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg)
if (ret == -EBUSY)
continue;
- DRM_DEBUG_KMS("transaction failed: %d\n", ret);
+ /*
+ * While timeouts can be errors, they're usually normal
+ * behavior (for instance, when a driver tries to
+ * communicate with a non-existant DisplayPort device).
+ * Avoid spamming the kernel log with timeout errors.
+ */
+ if (ret == -ETIMEDOUT)
+ DRM_DEBUG_KMS_RATELIMITED("transaction timed out\n");
+ else
+ DRM_DEBUG_KMS("transaction failed: %d\n", ret);
+
return ret;
}