public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: ville.syrjala@linux.intel.com
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 3/3] drm/i915: Simplify DP vs. eDP detection
Date: Fri,  1 Nov 2013 18:22:41 +0200	[thread overview]
Message-ID: <1383322961-7394-4-git-send-email-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <1383322961-7394-1-git-send-email-ville.syrjala@linux.intel.com>

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reduce the eDP detection to just checking if it's port A, or if
the VBT tells us that the port is eDP for the other ports.

Suggested-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c | 26 ++++++--------------------
 1 file changed, 6 insertions(+), 20 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 87cfb12..1e6bf7b 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -3274,6 +3274,9 @@ bool intel_dp_is_edp(struct drm_device *dev, enum port port)
 		[PORT_D] = PORT_IDPD,
 	};
 
+	if (port == PORT_A)
+		return true;
+
 	if (!dev_priv->vbt.child_dev_num)
 		return false;
 
@@ -3560,27 +3563,10 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
 	intel_dp->DP = I915_READ(intel_dp->output_reg);
 	intel_dp->attached_connector = intel_connector;
 
-	type = DRM_MODE_CONNECTOR_DisplayPort;
-	/*
-	 * FIXME : We need to initialize built-in panels before external panels.
-	 * For X0, DP_C is fixed as eDP. Revisit this as part of VLV eDP cleanup
-	 */
-	switch (port) {
-	case PORT_A:
+	if (intel_dp_is_edp(dev, port))
 		type = DRM_MODE_CONNECTOR_eDP;
-		break;
-	case PORT_B:
-	case PORT_C:
-		if (IS_VALLEYVIEW(dev) && intel_dp_is_edp(dev, port))
-			type = DRM_MODE_CONNECTOR_eDP;
-		break;
-	case PORT_D:
-		if (HAS_PCH_SPLIT(dev) && intel_dp_is_edp(dev, port))
-			type = DRM_MODE_CONNECTOR_eDP;
-		break;
-	default:	/* silence GCC warning */
-		break;
-	}
+	else
+		type = DRM_MODE_CONNECTOR_DisplayPort;
 
 	/*
 	 * For eDP we always set the encoder type to INTEL_OUTPUT_EDP, but
-- 
1.8.1.5

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

  parent reply	other threads:[~2013-11-01 16:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-01 16:22 [PATCH 0/3] drm/i915: eDP vs. DP detection changes ville.syrjala
2013-11-01 16:22 ` [PATCH 1/3] drm/i915: Check VBT for eDP ports on VLV ville.syrjala
2013-11-01 17:23   ` Jesse Barnes
2013-11-01 16:22 ` [PATCH 2/3] drm/i915: Make intel_dp_is_edp() less specific ville.syrjala
2013-11-01 17:25   ` Jesse Barnes
2013-11-01 18:32     ` [PATCH 1/2] drm/i915: Give names to the VBT child device type bits ville.syrjala
2013-11-01 18:32       ` [PATCH v2 2/2] drm/i915: Make intel_dp_is_edp() less specific ville.syrjala
2013-11-04 16:08         ` Paulo Zanoni
2013-11-04 16:30           ` Daniel Vetter
2013-11-04 15:58       ` [PATCH 1/2] drm/i915: Give names to the VBT child device type bits Paulo Zanoni
2013-11-01 16:22 ` ville.syrjala [this message]
2013-11-01 17:25   ` [PATCH 3/3] drm/i915: Simplify DP vs. eDP detection Jesse Barnes
2013-11-28 12:43     ` Daniel Vetter

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=1383322961-7394-4-git-send-email-ville.syrjala@linux.intel.com \
    --to=ville.syrjala@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