diff options
author | =?utf-8?q?Michel_D=C3=A4nzer?= <michel@tungstengraphics.com> | 2006-10-25 00:10:59 +1000 |
---|---|---|
committer | airlied <airlied@linux.ie> | 2006-12-07 15:53:30 +1100 |
commit | 21fa60ed4eab5b3b28d05930bb086615ecc191b1 (patch) | |
tree | 05176d5be3e7e99e36a04bff99fb766ed68df676 /drivers/char | |
parent | 2dbb232c4d6b6c89fc367f7566c7c87dd3b56cd7 (diff) | |
download | op-kernel-dev-21fa60ed4eab5b3b28d05930bb086615ecc191b1.zip op-kernel-dev-21fa60ed4eab5b3b28d05930bb086615ecc191b1.tar.gz |
drm: i915: Only return EBUSY after we've established we need to schedule a new swap.
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/drm/i915_irq.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/char/drm/i915_irq.c b/drivers/char/drm/i915_irq.c index df28bc1..40c55ed 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) return DRM_ERR(EINVAL); } - if (dev_priv->swaps_pending >= 100) { - DRM_DEBUG("Too many swaps queued\n"); - return DRM_ERR(EBUSY); - } - DRM_COPY_FROM_USER_IOCTL(swap, (drm_i915_vblank_swap_t __user *) data, sizeof(swap)); @@ -461,6 +456,11 @@ int i915_vblank_swap(DRM_IOCTL_ARGS) spin_unlock_irqrestore(&dev_priv->swaps_lock, irqflags); + if (dev_priv->swaps_pending >= 100) { + DRM_DEBUG("Too many swaps queued\n"); + return DRM_ERR(EBUSY); + } + vbl_swap = drm_calloc(1, sizeof(vbl_swap), DRM_MEM_DRIVER); if (!vbl_swap) { |