All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adam Jackson <ajax@redhat.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 2/6] drm/i915/dp: Correctly report eDP in the core connector type
Date: Fri, 16 Jul 2010 14:46:28 -0400	[thread overview]
Message-ID: <1279305992-19619-2-git-send-email-ajax@redhat.com> (raw)
In-Reply-To: <1279305992-19619-1-git-send-email-ajax@redhat.com>

Do this for both real eDP and for PCH_DP_D when used as the eDP
connection.

Signed-off-by: Adam Jackson <ajax@redhat.com>
---
 drivers/gpu/drm/i915/intel_dp.c |   26 ++++++++++++++------------
 1 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index c2b3d9b..48076a8 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1443,6 +1443,7 @@ intel_dp_init(struct drm_device *dev, int output_reg)
 	struct intel_connector *intel_connector;
 	struct intel_dp_priv *dp_priv;
 	const char *name = NULL;
+	int type;
 
 	intel_encoder = kcalloc(sizeof(struct intel_encoder) +
 			       sizeof(struct intel_dp_priv), 1, GFP_KERNEL);
@@ -1457,18 +1458,24 @@ intel_dp_init(struct drm_device *dev, int output_reg)
 
 	dp_priv = (struct intel_dp_priv *)(intel_encoder + 1);
 
+	if (HAS_PCH_SPLIT(dev) && (output_reg == PCH_DP_D))
+		if (intel_dpd_is_edp(dev))
+			dp_priv->is_pch_edp = true;
+
+	if (output_reg == DP_A || IS_PCH_eDP(dp_priv)) {
+		type = DRM_MODE_CONNECTOR_eDP;
+		intel_encoder->type = INTEL_OUTPUT_EDP;
+	} else {
+		type = DRM_MODE_CONNECTOR_DisplayPort;
+		intel_encoder->type = INTEL_OUTPUT_DISPLAYPORT;
+	}
+
 	connector = &intel_connector->base;
-	drm_connector_init(dev, connector, &intel_dp_connector_funcs,
-			   DRM_MODE_CONNECTOR_DisplayPort);
+	drm_connector_init(dev, connector, &intel_dp_connector_funcs, type);
 	drm_connector_helper_add(connector, &intel_dp_connector_helper_funcs);
 
 	connector->polled = DRM_CONNECTOR_POLL_HPD;
 
-	if (output_reg == DP_A)
-		intel_encoder->type = INTEL_OUTPUT_EDP;
-	else
-		intel_encoder->type = INTEL_OUTPUT_DISPLAYPORT;
-
 	if (output_reg == DP_B || output_reg == PCH_DP_B)
 		intel_encoder->clone_mask = (1 << INTEL_DP_B_CLONE_BIT);
 	else if (output_reg == DP_C || output_reg == PCH_DP_C)
@@ -1479,11 +1486,6 @@ intel_dp_init(struct drm_device *dev, int output_reg)
 	if (IS_eDP(intel_encoder))
 		intel_encoder->clone_mask = (1 << INTEL_EDP_CLONE_BIT);
 
-	if (HAS_PCH_SPLIT(dev) && (output_reg == PCH_DP_D)) {
-		if (intel_dpd_is_edp(dev))
-			dp_priv->is_pch_edp = true;
-	}
-
 	intel_encoder->crtc_mask = (1 << 0) | (1 << 1);
 	connector->interlace_allowed = true;
 	connector->doublescan_allowed = 0;
-- 
1.7.1.1

  reply	other threads:[~2010-07-16 18:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-16 18:46 [PATCH 1/6] drm/i915/dp: Rename has_edp to is_pch_edp to reflect its real meaning Adam Jackson
2010-07-16 18:46 ` Adam Jackson [this message]
2010-09-02 15:37   ` [PATCH 2/6] drm/i915/dp: Correctly report eDP in the core connector type Zhenyu Wang
2010-10-03 15:04     ` Jesse Barnes
2010-10-04 13:13       ` Jan-Hendrik Zab
2010-10-04 16:45         ` Jesse Barnes
2010-07-16 18:46 ` [PATCH 3/6] drm/i915: Initialize LVDS and eDP outputs before anything else Adam Jackson
2010-07-16 18:46 ` [PATCH 4/6] drm/i915/pch: Set transcoder sync polarity for DP based on actual mode Adam Jackson
2010-07-16 18:46 ` [PATCH 5/6] drm/i915/hdmi: Set sync polarity " Adam Jackson
2010-07-16 18:46 ` [PATCH 6/6] drm/i915/sdvo: " Adam Jackson
2010-08-02  2:38   ` Eric Anholt

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=1279305992-19619-2-git-send-email-ajax@redhat.com \
    --to=ajax@redhat.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 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.