提交 3b32a35b 编写于 作者: V Ville Syrjälä 提交者: Daniel Vetter

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: NJesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
上级 5d8a7752
...@@ -3337,6 +3337,9 @@ bool intel_dp_is_edp(struct drm_device *dev, enum port port) ...@@ -3337,6 +3337,9 @@ bool intel_dp_is_edp(struct drm_device *dev, enum port port)
[PORT_D] = PORT_IDPD, [PORT_D] = PORT_IDPD,
}; };
if (port == PORT_A)
return true;
if (!dev_priv->vbt.child_dev_num) if (!dev_priv->vbt.child_dev_num)
return false; return false;
...@@ -3621,27 +3624,10 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port, ...@@ -3621,27 +3624,10 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
intel_dp->DP = I915_READ(intel_dp->output_reg); intel_dp->DP = I915_READ(intel_dp->output_reg);
intel_dp->attached_connector = intel_connector; intel_dp->attached_connector = intel_connector;
type = DRM_MODE_CONNECTOR_DisplayPort; if (intel_dp_is_edp(dev, port))
/*
* 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:
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; type = DRM_MODE_CONNECTOR_eDP;
break; else
default: /* silence GCC warning */ type = DRM_MODE_CONNECTOR_DisplayPort;
break;
}
/* /*
* For eDP we always set the encoder type to INTEL_OUTPUT_EDP, but * For eDP we always set the encoder type to INTEL_OUTPUT_EDP, but
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册