aboutsummaryrefslogtreecommitdiff
path: root/bsd-core/drm_bufs.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2008-07-31 15:18:32 -0400
committerKristian Høgsberg <krh@redhat.com>2008-07-31 15:18:32 -0400
commit5052e966ec7fe5146c2d73b90482003619add5da (patch)
treea48e771871fd64a2892f5ce75e6e309b03db5e06 /bsd-core/drm_bufs.c
parent6d4e147480a334d32fa59c7fde53e10d7ab6e106 (diff)
parent95c02743c96ca9e959f68a6e942206bdfadae53a (diff)
Merge commit 'origin/master' into modesetting-gem
Conflicts: linux-core/Makefile.kernel linux-core/ati_pcigart.c linux-core/drm_compat.h linux-core/drm_irq.c linux-core/drm_lock.c linux-core/i915_drv.c shared-core/i915_dma.c shared-core/i915_drv.h shared-core/i915_irq.c shared-core/nouveau_mem.c shared-core/radeon_cp.c shared-core/radeon_drv.h
Diffstat (limited to 'bsd-core/drm_bufs.c')
-rw-r--r--bsd-core/drm_bufs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bsd-core/drm_bufs.c b/bsd-core/drm_bufs.c
index 3508331a..c793634b 100644
--- a/bsd-core/drm_bufs.c
+++ b/bsd-core/drm_bufs.c
@@ -832,12 +832,12 @@ int drm_addbufs_sg(struct drm_device *dev, drm_buf_desc_t *request)
if (request->count < 0 || request->count > 4096)
return EINVAL;
- DRM_SPINLOCK(&dev->dma_lock);
-
order = drm_order(request->size);
if (order < DRM_MIN_ORDER || order > DRM_MAX_ORDER)
return EINVAL;
+ DRM_SPINLOCK(&dev->dma_lock);
+
/* No more allocations after first buffer-using ioctl. */
if (dev->buf_use != 0) {
DRM_SPINUNLOCK(&dev->dma_lock);