drm: i915: Fix 'sequence has passed' condition in i915_vblank_swap().
author=?utf-8?q?Michel_D=C3=A4nzer?= <michel@tungstengraphics.com>
Tue, 24 Oct 2006 14:10:24 +0000 (00:10 +1000)
committerairlied <airlied@linux.ie>
Thu, 7 Dec 2006 04:53:30 +0000 (15:53 +1100)
Signed-off-by: Dave Airlie <airlied@linux.ie>
drivers/char/drm/i915_irq.c

index e9e46c41bf369cfedee3b45856e54b6bcb618507..df28bc1e84c67e021ff4e321354b0b74211a8699 100644 (file)
@@ -439,7 +439,7 @@ int i915_vblank_swap(DRM_IOCTL_ARGS)
                swap.sequence += curseq;
                break;
        case _DRM_VBLANK_ABSOLUTE:
-               if ((curseq - swap.sequence) > (1<<23)) {
+               if ((curseq - swap.sequence) <= (1<<23)) {
                        spin_unlock_irqrestore(&dev_priv->swaps_lock, irqflags);
                        DRM_DEBUG("Missed target sequence\n");
                        return DRM_ERR(EINVAL);