All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/dp: Check DP sink status after training is complete
@ 2012-02-14 19:49 Adam Jackson
  2012-02-15  1:30 ` Peter Colberg
  0 siblings, 1 reply; 3+ messages in thread
From: Adam Jackson @ 2012-02-14 19:49 UTC (permalink / raw)
  To: intel-gfx; +Cc: peter

This patch is wrong and please do not merge it as is.  My hope here is
that the sink will actually _tell_ us when it can't sink something.

If the bug that prompted this is doing what I think it's doing, then we
should see SINK_STATUS fail to light up, and we should then retry link
setup at the lower link rate like the spec suggests.

Bugzilla: https://bugs.freedesktop.org/45801

Not-signed-off-by: Adam Jackson <ajax@redhat.com>
---
 drivers/gpu/drm/i915/intel_dp.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 94f860c..a10775e 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1271,6 +1271,17 @@ static void intel_dp_commit(struct drm_encoder *encoder)
 
 	if (HAS_PCH_CPT(dev))
 		intel_cpt_verify_modeset(dev, intel_crtc->pipe);
+
+	/* check sink status. this doesn't belong here. */
+	do {
+		uint8_t byte;
+		int ret = intel_dp_aux_native_read(intel_dp, DP_SINK_STATUS,
+						   &byte, 1);
+		if (ret != 1)
+			DRM_ERROR("Checking DP sink status failed\n");
+		else
+			DRM_DEBUG_KMS("Sink status after training: %x\n", byte);
+	} while (0);
 }
 
 static void
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-02-15 15:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-14 19:49 [PATCH] drm/i915/dp: Check DP sink status after training is complete Adam Jackson
2012-02-15  1:30 ` Peter Colberg
2012-02-15 15:32   ` Adam Jackson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.