From: Paulo Zanoni <[email protected]>

This should fix the FDI assertions we're getting on Haswell.

Signed-off-by: Paulo Zanoni <[email protected]>
---
 drivers/gpu/drm/i915/intel_display.c | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c 
b/drivers/gpu/drm/i915/intel_display.c
index c7ba7ad..4aa2c1d 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3289,10 +3289,13 @@ static void ironlake_crtc_disable(struct drm_crtc *crtc)
        int pipe = intel_crtc->pipe;
        int plane = intel_crtc->plane;
        u32 reg, temp;
+       bool is_pch_port;
 
        if (!intel_crtc->active)
                return;
 
+       is_pch_port = intel_crtc_driving_pch(crtc);
+
        intel_crtc_wait_for_pending_flips(crtc);
        drm_vblank_off(dev, pipe);
        intel_crtc_update_cursor(crtc, false);
@@ -3310,14 +3313,17 @@ static void ironlake_crtc_disable(struct drm_crtc *crtc)
 
        ironlake_fdi_disable(crtc);
 
-       /* This is a horrible layering violation; we should be doing this in
-        * the connector/encoder ->prepare instead, but we don't always have
-        * enough information there about the config to know whether it will
-        * actually be necessary or just cause undesired flicker.
-        */
-       intel_disable_pch_ports(dev_priv, pipe);
+       if (is_pch_port) {
+               /* This is a horrible layering violation; we should be doing
+                * this in the connector/encoder ->prepare instead, but we don't
+                * always have enough information there about the config to know
+                * whether it will actually be necessary or just cause undesired
+                * flicker.
+                */
+               intel_disable_pch_ports(dev_priv, pipe);
 
-       intel_disable_transcoder(dev_priv, pipe);
+               intel_disable_transcoder(dev_priv, pipe);
+       }
 
        if (HAS_PCH_CPT(dev)) {
                /* disable TRANS_DP_CTL */
-- 
1.7.11.2

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to