drm/i915: Warn if trying to register eDP on port != B/C on vlv/chv
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 16 Oct 2014 18:27:27 +0000 (21:27 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 4 Nov 2014 22:21:59 +0000 (23:21 +0100)
Only ports B and C have the power sequencer and backlight controls,
so complain if we ever try to register an eDP connector on some other
port.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_dp.c

index b474a29d00d50e8da4e413359b6f088c17a08628..3f1858065a1cd64c240b16df5e253c17abebe566 100644 (file)
@@ -5203,6 +5203,11 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
        if (type == DRM_MODE_CONNECTOR_eDP)
                intel_encoder->type = INTEL_OUTPUT_EDP;
 
+       /* eDP only on port B and/or C on vlv/chv */
+       if (WARN_ON(IS_VALLEYVIEW(dev) && is_edp(intel_dp) &&
+                   port != PORT_B && port != PORT_C))
+               return false;
+
        DRM_DEBUG_KMS("Adding %s connector on port %c\n",
                        type == DRM_MODE_CONNECTOR_eDP ? "eDP" : "DP",
                        port_name(port));