All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 3/7] drm/i915/dp: read more receiver capability bits on hotplug
Date: Thu,  7 Jul 2011 11:10:59 -0700	[thread overview]
Message-ID: <1310062263-5595-4-git-send-email-jbarnes@virtuousgeek.org> (raw)
In-Reply-To: <1310062263-5595-1-git-send-email-jbarnes@virtuousgeek.org>

When a hotplug event is received, we need to check the receiver cap bits
in case they've changed (as they might with a hub or chain config).

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 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 fc51730..a9a5051 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1522,6 +1522,8 @@ intel_dp_link_down(struct intel_dp *intel_dp)
 static void
 intel_dp_check_link_status(struct intel_dp *intel_dp)
 {
+	int ret;
+
 	if (!intel_dp->base.base.crtc)
 		return;
 
@@ -1530,6 +1532,15 @@ intel_dp_check_link_status(struct intel_dp *intel_dp)
 		return;
 	}
 
+	/* Try to read receiver status if the link appears to be up */
+	ret = intel_dp_aux_native_read(intel_dp,
+				       0x000, intel_dp->dpcd,
+				       sizeof (intel_dp->dpcd));
+	if (ret != sizeof(intel_dp->dpcd)) {
+		intel_dp_link_down(intel_dp);
+		return;
+	}
+
 	if (!intel_channel_eq_ok(intel_dp)) {
 		intel_dp_start_link_train(intel_dp);
 		intel_dp_complete_link_train(intel_dp);
-- 
1.7.4.1

  parent reply	other threads:[~2011-07-07 18:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-07 18:10 Updated DP fixes Jesse Barnes
2011-07-07 18:10 ` [PATCH 1/7] drm/i915/dp: retry link status read 3 times on failure Jesse Barnes
2011-07-07 18:10 ` [PATCH 2/7] drm/i915/dp: use DP DPCD defines when looking at DPCD values Jesse Barnes
2011-07-07 18:10 ` Jesse Barnes [this message]
2011-07-07 18:11 ` [PATCH 4/7] drm/i915/dp: try to read receiver capabilities 3 times when detecting Jesse Barnes
2011-07-07 20:13   ` Keith Packard
2011-07-07 18:11 ` [PATCH 5/7] drm/i915/dp: remove DPMS mode tracking from DP Jesse Barnes
2011-07-07 18:11 ` [PATCH 6/7] drm/i915/dp: consolidate AUX retry code Jesse Barnes
2011-07-07 18:11 ` [PATCH 7/7] drm/i915/dp: manage sink power state if possible Jesse Barnes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1310062263-5595-4-git-send-email-jbarnes@virtuousgeek.org \
    --to=jbarnes@virtuousgeek.org \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.