aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/i915_irq.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/drm/i915_irq.c')
-rw-r--r--drivers/char/drm/i915_irq.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/char/drm/i915_irq.c b/drivers/char/drm/i915_irq.c
index df28bc1e84c6..40c55edfa2ee 100644
--- a/drivers/char/drm/i915_irq.c
+++ b/drivers/char/drm/i915_irq.c
@@ -392,11 +392,6 @@ int i915_vblank_swap(DRM_IOCTL_ARGS)
392 return DRM_ERR(EINVAL); 392 return DRM_ERR(EINVAL);
393 } 393 }
394 394
395 if (dev_priv->swaps_pending >= 100) {
396 DRM_DEBUG("Too many swaps queued\n");
397 return DRM_ERR(EBUSY);
398 }
399
400 DRM_COPY_FROM_USER_IOCTL(swap, (drm_i915_vblank_swap_t __user *) data, 395 DRM_COPY_FROM_USER_IOCTL(swap, (drm_i915_vblank_swap_t __user *) data,
401 sizeof(swap)); 396 sizeof(swap));
402 397
@@ -461,6 +456,11 @@ int i915_vblank_swap(DRM_IOCTL_ARGS)
461 456
462 spin_unlock_irqrestore(&dev_priv->swaps_lock, irqflags); 457 spin_unlock_irqrestore(&dev_priv->swaps_lock, irqflags);
463 458
459 if (dev_priv->swaps_pending >= 100) {
460 DRM_DEBUG("Too many swaps queued\n");
461 return DRM_ERR(EBUSY);
462 }
463
464 vbl_swap = drm_calloc(1, sizeof(vbl_swap), DRM_MEM_DRIVER); 464 vbl_swap = drm_calloc(1, sizeof(vbl_swap), DRM_MEM_DRIVER);
465 465
466 if (!vbl_swap) { 466 if (!vbl_swap) {