drm/i915: Remove unnecessary test on the gen in intel_do_mmio_flip()
authorDamien Lespiau <damien.lespiau@intel.com>
Fri, 24 Oct 2014 23:11:11 +0000 (00:11 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 4 Nov 2014 13:04:57 +0000 (14:04 +0100)
use_mmio_flip() makes sure we only enable MMIO flips on gen5+. So we
don't need to take into account older devices.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c

index 140bbefaac8d68805de7a2759d7bfb6b91604a20..46224c6307cb660779fe1a8fbaa433bdffb1d2b6 100644 (file)
@@ -9567,12 +9567,11 @@ static void intel_do_mmio_flip(struct intel_crtc *intel_crtc)
        reg = DSPCNTR(intel_crtc->plane);
        dspcntr = I915_READ(reg);
 
-       if (INTEL_INFO(dev)->gen >= 4) {
-               if (obj->tiling_mode != I915_TILING_NONE)
-                       dspcntr |= DISPPLANE_TILED;
-               else
-                       dspcntr &= ~DISPPLANE_TILED;
-       }
+       if (obj->tiling_mode != I915_TILING_NONE)
+               dspcntr |= DISPPLANE_TILED;
+       else
+               dspcntr &= ~DISPPLANE_TILED;
+
        I915_WRITE(reg, dspcntr);
 
        I915_WRITE(DSPSURF(intel_crtc->plane),