diff options
Diffstat (limited to 'drivers/gpu/drm/i915/intel_dp.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_dp.c | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index a2935234ac03..6f3a9e8f7078 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c | |||
@@ -2980,24 +2980,35 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port, | |||
2980 | if (intel_dpd_is_edp(dev)) | 2980 | if (intel_dpd_is_edp(dev)) |
2981 | intel_dp->is_pch_edp = true; | 2981 | intel_dp->is_pch_edp = true; |
2982 | 2982 | ||
2983 | type = DRM_MODE_CONNECTOR_DisplayPort; | ||
2983 | /* | 2984 | /* |
2984 | * FIXME : We need to initialize built-in panels before external panels. | 2985 | * FIXME : We need to initialize built-in panels before external panels. |
2985 | * For X0, DP_C is fixed as eDP. Revisit this as part of VLV eDP cleanup | 2986 | * For X0, DP_C is fixed as eDP. Revisit this as part of VLV eDP cleanup |
2986 | */ | 2987 | */ |
2987 | if (IS_VALLEYVIEW(dev) && port == PORT_C) { | 2988 | switch (port) { |
2988 | type = DRM_MODE_CONNECTOR_eDP; | 2989 | case PORT_A: |
2989 | intel_encoder->type = INTEL_OUTPUT_EDP; | ||
2990 | } else if (port == PORT_A || is_pch_edp(intel_dp)) { | ||
2991 | type = DRM_MODE_CONNECTOR_eDP; | 2990 | type = DRM_MODE_CONNECTOR_eDP; |
2992 | intel_encoder->type = INTEL_OUTPUT_EDP; | 2991 | break; |
2993 | } else { | 2992 | case PORT_C: |
2994 | /* The intel_encoder->type value may be INTEL_OUTPUT_UNKNOWN for | 2993 | if (IS_VALLEYVIEW(dev)) |
2995 | * DDI or INTEL_OUTPUT_DISPLAYPORT for the older gens, so don't | 2994 | type = DRM_MODE_CONNECTOR_eDP; |
2996 | * rewrite it. | 2995 | break; |
2997 | */ | 2996 | case PORT_D: |
2998 | type = DRM_MODE_CONNECTOR_DisplayPort; | 2997 | if (HAS_PCH_SPLIT(dev) && intel_dpd_is_edp(dev)) |
2998 | type = DRM_MODE_CONNECTOR_eDP; | ||
2999 | break; | ||
3000 | default: /* silence GCC warning */ | ||
3001 | break; | ||
2999 | } | 3002 | } |
3000 | 3003 | ||
3004 | /* | ||
3005 | * For eDP we always set the encoder type to INTEL_OUTPUT_EDP, but | ||
3006 | * for DP the encoder type can be set by the caller to | ||
3007 | * INTEL_OUTPUT_UNKNOWN for DDI, so don't rewrite it. | ||
3008 | */ | ||
3009 | if (type == DRM_MODE_CONNECTOR_eDP) | ||
3010 | intel_encoder->type = INTEL_OUTPUT_EDP; | ||
3011 | |||
3001 | drm_connector_init(dev, connector, &intel_dp_connector_funcs, type); | 3012 | drm_connector_init(dev, connector, &intel_dp_connector_funcs, type); |
3002 | drm_connector_helper_add(connector, &intel_dp_connector_helper_funcs); | 3013 | drm_connector_helper_add(connector, &intel_dp_connector_helper_funcs); |
3003 | 3014 | ||