drm/i915: Clear the Ironlake dithering flags when the pipe doesn't want it.
authorEric Anholt <eric@anholt.net>
Mon, 26 Jul 2010 21:49:07 +0000 (14:49 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 3 Aug 2010 23:23:58 +0000 (16:23 -0700)
My fine DisplayPort output was getting ST dithering forever after
having had the LVDS enabled at one point.

Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/i915/intel_display.c

index ca3b8a8933c611f164bbbb7de327a9c1dfcb5cf6..ae1718549eecf548663cafa8de9a6772088e3c89 100644 (file)
@@ -3888,6 +3888,11 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
                udelay(150);
        }
 
+       if (HAS_PCH_SPLIT(dev)) {
+               pipeconf &= ~PIPE_ENABLE_DITHER;
+               pipeconf &= ~PIPE_DITHER_TYPE_MASK;
+       }
+
        /* The LVDS pin pair needs to be on before the DPLLs are enabled.
         * This is an exception to the general rule that mode_set doesn't turn
         * things on.
@@ -3930,16 +3935,13 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
                        if (dev_priv->lvds_dither) {
                                if (HAS_PCH_SPLIT(dev)) {
                                        pipeconf |= PIPE_ENABLE_DITHER;
-                                       pipeconf &= ~PIPE_DITHER_TYPE_MASK;
                                        pipeconf |= PIPE_DITHER_TYPE_ST01;
                                } else
                                        lvds |= LVDS_ENABLE_DITHER;
                        } else {
-                               if (HAS_PCH_SPLIT(dev)) {
-                                       pipeconf &= ~PIPE_ENABLE_DITHER;
-                                       pipeconf &= ~PIPE_DITHER_TYPE_MASK;
-                               } else
+                               if (!HAS_PCH_SPLIT(dev)) {
                                        lvds &= ~LVDS_ENABLE_DITHER;
+                               }
                        }
                }
                I915_WRITE(lvds_reg, lvds);