drm/i915: Make sure we don't detect eDP on g4x
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 11 Sep 2015 18:04:38 +0000 (21:04 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 23 Sep 2015 14:58:22 +0000 (16:58 +0200)
We don't support eDP on g4x, so let's not even look at the VBT
to determine the port type, just in case the VBT is bonkers
on some g4x machines and indicates the precense of eDP.

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

index 02401a397dccb31f660a00eb6b2338197e6a14a5..5fe1648cd9c8ee1d2a70e36fa35c2382f06acc5f 100644 (file)
@@ -5255,6 +5255,13 @@ bool intel_dp_is_edp(struct drm_device *dev, enum port port)
                [PORT_E] = DVO_PORT_DPE,
        };
 
+       /*
+        * eDP not supported on g4x. so bail out early just
+        * for a bit extra safety in case the VBT is bonkers.
+        */
+       if (INTEL_INFO(dev)->gen < 5)
+               return false;
+
        if (port == PORT_A)
                return true;