diff mbox

[2/2] drm/i915: move panel connectors to the front

Message ID 1351345925-17510-2-git-send-email-daniel.vetter@ffwll.ch (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel Vetter Oct. 27, 2012, 1:52 p.m. UTC
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.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/intel_display.c | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

Comments

Chris Wilson Oct. 28, 2012, 9:07 a.m. UTC | #1
On Sat, 27 Oct 2012 15:52:05 +0200, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> 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.

It's reasonable as any other arrangement. On the other hand, userspace
should understand that the kernel has no policy regarding connector
ordering, which may change on the fly if we ever do hotplug, and do the
sorting itself if it cared about making its legacy clients work better.

The code looks fine so it's a mixture of r-b and a-b.
-Chris
Adam Jackson Oct. 31, 2012, 8:05 p.m. UTC | #2
On 10/27/12 9:52 AM, Daniel Vetter wrote:
> 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.
>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Reviewed-by: Adam Jackson <ajax@redhat.com>

- ajax
Daniel Vetter Nov. 1, 2012, 9:16 p.m. UTC | #3
On Wed, Oct 31, 2012 at 04:05:33PM -0400, Adam Jackson wrote:
> On 10/27/12 9:52 AM, Daniel Vetter wrote:
> >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.
> >
> >Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> 
> Reviewed-by: Adam Jackson <ajax@redhat.com>

Slurped both this and the drm helper patch into dinq, thanks for the
review. I'll annoy Dave about including the doc patches into his tree
directly, he should get the pull which has the drm_dp_helper.c rename
tomorrow.
-Daniel
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index dc9676a..d91ee4b 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -7862,16 +7862,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)) {
@@ -7895,6 +7885,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 */
@@ -7914,7 +7908,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;
@@ -7990,6 +7984,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)