drm/i915: only flip frontbuffer if crtc is active
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>
Fri, 24 Oct 2014 13:51:34 +0000 (14:51 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 4 Nov 2014 13:04:56 +0000 (14:04 +0100)
There is no point in flipping a buffer for a disabled crtc.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-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 910e8a4603fa403637e384144b4bc8ea3a1b67be..140bbefaac8d68805de7a2759d7bfb6b91604a20 100644 (file)
@@ -8544,9 +8544,9 @@ static int intel_crtc_cursor_set_obj(struct drm_crtc *crtc,
                if (old_width != width)
                        intel_update_watermarks(crtc);
                intel_crtc_update_cursor(crtc, intel_crtc->cursor_bo != NULL);
-       }
 
-       intel_frontbuffer_flip(dev, INTEL_FRONTBUFFER_CURSOR(pipe));
+               intel_frontbuffer_flip(dev, INTEL_FRONTBUFFER_CURSOR(pipe));
+       }
 
        return 0;
 fail_unpin: