diff options
author | Michel Dänzer <michel@tungstengraphics.com> | 2006-09-01 11:48:07 +0200 |
---|---|---|
committer | Michel Dänzer <michel@tungstengraphics.com> | 2006-09-28 15:41:36 +0200 |
commit | 50a0284a61d4415c0ebdb02decee76ef3115007a (patch) | |
tree | 791c8c0a771e63f54332b15d7de2e7c5e18a8a5b /shared-core | |
parent | cf6b2c5299e9be3542d4deddfd05d5811f11d2ef (diff) |
Only return EBUSY after we've established we need to schedule a new swap.
Diffstat (limited to 'shared-core')
-rw-r--r-- | shared-core/i915_irq.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/shared-core/i915_irq.c b/shared-core/i915_irq.c index 9cd8ece4..d32f592f 100644 --- a/shared-core/i915_irq.c +++ b/shared-core/i915_irq.c @@ -395,11 +395,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)); @@ -464,6 +459,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) { |