aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_dp.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2013-11-01 12:22:41 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-11-28 07:42:25 -0500
commit3b32a35b31b19c8f9340d3b3a149062fce1cd89f (patch)
treed16ba52aa5814a635867b39c94f09feb5d16c351 /drivers/gpu/drm/i915/intel_dp.c
parent5d8a77529bd6864361005117c3a611b6d810aa77 (diff)
drm/i915: Simplify DP vs. eDP detection
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> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_dp.c')
-rw-r--r--drivers/gpu/drm/i915/intel_dp.c26
1 files changed, 6 insertions, 20 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 2e5154e5955f..30c627c7b7ba 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -3337,6 +3337,9 @@ bool intel_dp_is_edp(struct drm_device *dev, enum port port)
3337 [PORT_D] = PORT_IDPD, 3337 [PORT_D] = PORT_IDPD,
3338 }; 3338 };
3339 3339
3340 if (port == PORT_A)
3341 return true;
3342
3340 if (!dev_priv->vbt.child_dev_num) 3343 if (!dev_priv->vbt.child_dev_num)
3341 return false; 3344 return false;
3342 3345
@@ -3621,27 +3624,10 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
3621 intel_dp->DP = I915_READ(intel_dp->output_reg); 3624 intel_dp->DP = I915_READ(intel_dp->output_reg);
3622 intel_dp->attached_connector = intel_connector; 3625 intel_dp->attached_connector = intel_connector;
3623 3626
3624 type = DRM_MODE_CONNECTOR_DisplayPort; 3627 if (intel_dp_is_edp(dev, port))
3625 /*
3626 * FIXME : We need to initialize built-in panels before external panels.
3627 * For X0, DP_C is fixed as eDP. Revisit this as part of VLV eDP cleanup
3628 */
3629 switch (port) {
3630 case PORT_A:
3631 type = DRM_MODE_CONNECTOR_eDP; 3628 type = DRM_MODE_CONNECTOR_eDP;
3632 break; 3629 else
3633 case PORT_B: 3630 type = DRM_MODE_CONNECTOR_DisplayPort;
3634 case PORT_C:
3635 if (IS_VALLEYVIEW(dev) && intel_dp_is_edp(dev, port))
3636 type = DRM_MODE_CONNECTOR_eDP;
3637 break;
3638 case PORT_D:
3639 if (HAS_PCH_SPLIT(dev) && intel_dp_is_edp(dev, port))
3640 type = DRM_MODE_CONNECTOR_eDP;
3641 break;
3642 default: /* silence GCC warning */
3643 break;
3644 }
3645 3631
3646 /* 3632 /*
3647 * For eDP we always set the encoder type to INTEL_OUTPUT_EDP, but 3633 * For eDP we always set the encoder type to INTEL_OUTPUT_EDP, but