mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-27 01:10:11 +01:00
Only return EBUSY after we've established we need to schedule a new swap.
(cherry picked from 50a0284a61 commit)
This commit is contained in:
parent
cef0f24325
commit
c47ebd9707
1 changed files with 5 additions and 5 deletions
|
|
@ -427,11 +427,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));
|
||||
|
||||
|
|
@ -496,6 +491,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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue