]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/i915: move panel connectors to the front
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Sat, 27 Oct 2012 13:52:05 +0000 (15:52 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Sun, 11 Nov 2012 22:51:29 +0000 (23:51 +0100)
This essentially reverts

commit cb0953d734348e8862d6d7edc666cfb3bf6d8fae
Author: Adam Jackson <ajax@redhat.com>
Date:   Fri Jul 16 14:46:29 2010 -0400

    drm/i915: Initialize LVDS and eDP outputs before anything else

simply because it doesn't scale: It misses SDVO and DVO panels,
and now with DDI encoders on haswell this is becoming unmanageable.

Instead we simply sort the connector list after everything is
set up.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c

index 6d48c73b5cf3b1744a3a7058cf198d03e90dc6f6..2b63859a74b651db9b02b6614551e031fc122a43 100644 (file)
@@ -8269,16 +8269,6 @@ static void intel_setup_outputs(struct drm_device *dev)
                I915_WRITE(PFIT_CONTROL, 0);
        }
 
-       if (HAS_PCH_SPLIT(dev)) {
-               dpd_is_edp = intel_dpd_is_edp(dev);
-
-               if (has_edp_a(dev))
-                       intel_dp_init(dev, DP_A, PORT_A);
-
-               if (dpd_is_edp && (I915_READ(PCH_DP_D) & DP_DETECTED))
-                       intel_dp_init(dev, PCH_DP_D, PORT_D);
-       }
-
        intel_crt_init(dev);
 
        if (IS_HASWELL(dev)) {
@@ -8302,6 +8292,10 @@ static void intel_setup_outputs(struct drm_device *dev)
                        intel_ddi_init(dev, PORT_D);
        } else if (HAS_PCH_SPLIT(dev)) {
                int found;
+               dpd_is_edp = intel_dpd_is_edp(dev);
+
+               if (has_edp_a(dev))
+                       intel_dp_init(dev, DP_A, PORT_A);
 
                if (I915_READ(HDMIB) & PORT_DETECTED) {
                        /* PCH SDVOB multiplex with HDMIB */
@@ -8321,7 +8315,7 @@ static void intel_setup_outputs(struct drm_device *dev)
                if (I915_READ(PCH_DP_C) & DP_DETECTED)
                        intel_dp_init(dev, PCH_DP_C, PORT_C);
 
-               if (!dpd_is_edp && (I915_READ(PCH_DP_D) & DP_DETECTED))
+               if (I915_READ(PCH_DP_D) & DP_DETECTED)
                        intel_dp_init(dev, PCH_DP_D, PORT_D);
        } else if (IS_VALLEYVIEW(dev)) {
                int found;
@@ -8397,6 +8391,8 @@ static void intel_setup_outputs(struct drm_device *dev)
 
        if (HAS_PCH_IBX(dev) || HAS_PCH_CPT(dev))
                ironlake_init_pch_refclk(dev);
+
+       drm_helper_move_panel_connectors_to_head(dev);
 }
 
 static void intel_user_framebuffer_destroy(struct drm_framebuffer *fb)