diff options
author | Adam Jackson <ajax@redhat.com> | 2010-07-16 14:46:28 -0400 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-08-01 22:37:51 -0400 |
commit | b329530ca7cdf6bf014f2124efd983e01265d623 (patch) | |
tree | 843793923ad2322628a18db7accfcb2b1b04fc97 | |
parent | f091737978251811e34e7813ba4bfae5cae0b810 (diff) |
drm/i915/dp: Correctly report eDP in the core connector type
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>
Signed-off-by: Eric Anholt <eric@anholt.net>
-rw-r--r-- | 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 a06d186a14a5..016a9237a020 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c | |||
@@ -1492,6 +1492,7 @@ intel_dp_init(struct drm_device *dev, int output_reg) | |||
1492 | struct intel_connector *intel_connector; | 1492 | struct intel_connector *intel_connector; |
1493 | struct intel_dp_priv *dp_priv; | 1493 | struct intel_dp_priv *dp_priv; |
1494 | const char *name = NULL; | 1494 | const char *name = NULL; |
1495 | int type; | ||
1495 | 1496 | ||
1496 | intel_encoder = kcalloc(sizeof(struct intel_encoder) + | 1497 | intel_encoder = kcalloc(sizeof(struct intel_encoder) + |
1497 | sizeof(struct intel_dp_priv), 1, GFP_KERNEL); | 1498 | sizeof(struct intel_dp_priv), 1, GFP_KERNEL); |
@@ -1506,18 +1507,24 @@ intel_dp_init(struct drm_device *dev, int output_reg) | |||
1506 | 1507 | ||
1507 | dp_priv = (struct intel_dp_priv *)(intel_encoder + 1); | 1508 | dp_priv = (struct intel_dp_priv *)(intel_encoder + 1); |
1508 | 1509 | ||
1510 | if (HAS_PCH_SPLIT(dev) && (output_reg == PCH_DP_D)) | ||
1511 | if (intel_dpd_is_edp(dev)) | ||
1512 | dp_priv->is_pch_edp = true; | ||
1513 | |||
1514 | if (output_reg == DP_A || IS_PCH_eDP(dp_priv)) { | ||
1515 | type = DRM_MODE_CONNECTOR_eDP; | ||
1516 | intel_encoder->type = INTEL_OUTPUT_EDP; | ||
1517 | } else { | ||
1518 | type = DRM_MODE_CONNECTOR_DisplayPort; | ||
1519 | intel_encoder->type = INTEL_OUTPUT_DISPLAYPORT; | ||
1520 | } | ||
1521 | |||
1509 | connector = &intel_connector->base; | 1522 | connector = &intel_connector->base; |
1510 | drm_connector_init(dev, connector, &intel_dp_connector_funcs, | 1523 | drm_connector_init(dev, connector, &intel_dp_connector_funcs, type); |
1511 | DRM_MODE_CONNECTOR_DisplayPort); | ||
1512 | drm_connector_helper_add(connector, &intel_dp_connector_helper_funcs); | 1524 | drm_connector_helper_add(connector, &intel_dp_connector_helper_funcs); |
1513 | 1525 | ||
1514 | connector->polled = DRM_CONNECTOR_POLL_HPD; | 1526 | connector->polled = DRM_CONNECTOR_POLL_HPD; |
1515 | 1527 | ||
1516 | if (output_reg == DP_A) | ||
1517 | intel_encoder->type = INTEL_OUTPUT_EDP; | ||
1518 | else | ||
1519 | intel_encoder->type = INTEL_OUTPUT_DISPLAYPORT; | ||
1520 | |||
1521 | if (output_reg == DP_B || output_reg == PCH_DP_B) | 1528 | if (output_reg == DP_B || output_reg == PCH_DP_B) |
1522 | intel_encoder->clone_mask = (1 << INTEL_DP_B_CLONE_BIT); | 1529 | intel_encoder->clone_mask = (1 << INTEL_DP_B_CLONE_BIT); |
1523 | else if (output_reg == DP_C || output_reg == PCH_DP_C) | 1530 | else if (output_reg == DP_C || output_reg == PCH_DP_C) |
@@ -1528,11 +1535,6 @@ intel_dp_init(struct drm_device *dev, int output_reg) | |||
1528 | if (IS_eDP(intel_encoder)) | 1535 | if (IS_eDP(intel_encoder)) |
1529 | intel_encoder->clone_mask = (1 << INTEL_EDP_CLONE_BIT); | 1536 | intel_encoder->clone_mask = (1 << INTEL_EDP_CLONE_BIT); |
1530 | 1537 | ||
1531 | if (HAS_PCH_SPLIT(dev) && (output_reg == PCH_DP_D)) { | ||
1532 | if (intel_dpd_is_edp(dev)) | ||
1533 | dp_priv->is_pch_edp = true; | ||
1534 | } | ||
1535 | |||
1536 | intel_encoder->crtc_mask = (1 << 0) | (1 << 1); | 1538 | intel_encoder->crtc_mask = (1 << 0) | (1 << 1); |
1537 | connector->interlace_allowed = true; | 1539 | connector->interlace_allowed = true; |
1538 | connector->doublescan_allowed = 0; | 1540 | connector->doublescan_allowed = 0; |