public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: David Weinehall <david.weinehall@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 1/2] drm/i915: Skip live status if not supported
Date: Wed, 17 Aug 2016 11:02:31 +0300	[thread overview]
Message-ID: <1471420952-24482-2-git-send-email-david.weinehall@linux.intel.com> (raw)
In-Reply-To: <1471420952-24482-1-git-send-email-david.weinehall@linux.intel.com>

Rather than first attempting to use live status on platforms where
its functionality is spotty, and then forcing it to true no matter
what, we first check whether we're on a supported platform,
*then* try to detect whether there's anything connected or not.

This doesn't improve things for newer platforms, but for older
platforms we save ~80ms / HDMI-port with no display connected
whenever intel_hdmi_detect() is called.

Signed-off-by: David Weinehall <david.weinehall@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_hdmi.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 4df9f384910c..713c91ce7f70 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -1475,6 +1475,14 @@ intel_hdmi_detect(struct drm_connector *connector, bool force)
 
 	intel_display_power_get(dev_priv, POWER_DOMAIN_GMBUS);
 
+	/*
+	 * Live status register is not reliable on all intel platforms.
+	 * So consider live_status only for certain platforms, for
+	 * others, read EDID to determine presence of sink.
+	 */
+	if (INTEL_INFO(dev_priv)->gen < 7 || IS_IVYBRIDGE(dev_priv))
+		live_status = true;
+
 	for (try = 0; !live_status && try < 9; try++) {
 		if (try)
 			msleep(10);
@@ -1482,16 +1490,8 @@ intel_hdmi_detect(struct drm_connector *connector, bool force)
 				hdmi_to_dig_port(intel_hdmi));
 	}
 
-	if (!live_status) {
+	if (!live_status)
 		DRM_DEBUG_KMS("HDMI live status down\n");
-		/*
-		 * Live status register is not reliable on all intel platforms.
-		 * So consider live_status only for certain platforms, for
-		 * others, read EDID to determine presence of sink.
-		 */
-		if (INTEL_INFO(dev_priv)->gen < 7 || IS_IVYBRIDGE(dev_priv))
-			live_status = true;
-	}
 
 	intel_hdmi_unset_edid(connector);
 
-- 
2.8.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-08-17  8:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-17  8:02 [PATCH 0/2] Live status detection fixes David Weinehall
2016-08-17  8:02 ` David Weinehall [this message]
2016-08-17  8:02 ` [PATCH 2/2] drm/i915: add module param for live_status David Weinehall
2016-08-17  8:08   ` Chris Wilson
2016-08-17  9:25     ` David Weinehall
2016-08-17  9:35       ` Chris Wilson
2016-08-18  9:56         ` Daniel Vetter
2016-08-17  8:35 ` ✗ Ro.CI.BAT: failure for Live status detection fixes Patchwork

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=1471420952-24482-2-git-send-email-david.weinehall@linux.intel.com \
    --to=david.weinehall@linux.intel.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox