drm/i915: Sanitize prepare_pipes after valleyview_modeset_global_pipes()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 5 Nov 2013 20:34:12 +0000 (22:34 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 6 Nov 2013 16:28:36 +0000 (17:28 +0100)
valleyview_modeset_global_pipes() may add pipes that are getting fully
disabled to prepare_pipes bitmask. The rest of the code doesn't expect
this, so clear out any such pipes from the prepare_pipes bitmask.

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

index 3c17e959a0eb7d72e703a4d8b342022dddef62f7..e36b3b05780135e83c70bccfbdc4f1d2a83f725c 100644 (file)
@@ -9493,10 +9493,14 @@ static int __intel_set_mode(struct drm_crtc *crtc,
         * mode set on this crtc.  For other crtcs we need to use the
         * adjusted_mode bits in the crtc directly.
         */
-       if (IS_VALLEYVIEW(dev))
+       if (IS_VALLEYVIEW(dev)) {
                valleyview_modeset_global_pipes(dev, &prepare_pipes,
                                                modeset_pipes, pipe_config);
 
+               /* may have added more to prepare_pipes than we should */
+               prepare_pipes &= ~disable_pipes;
+       }
+
        for_each_intel_crtc_masked(dev, disable_pipes, intel_crtc)
                intel_crtc_disable(&intel_crtc->base);