summaryrefslogtreecommitdiff
path: root/bsd-core/drm_bufs.c
diff options
context:
space:
mode:
authorRobert Noland <rnoland@2hip.net>2008-09-06 18:37:06 -0400
committerRobert Noland <rnoland@2hip.net>2008-09-06 18:37:06 -0400
commit6f2479c67432f764bfc4e248689f1737c1935237 (patch)
treed78b9dc1913cda30088176b534d8295334e25b25 /bsd-core/drm_bufs.c
parent31709aa2be54877c45ca382bf370b41dbaf5c2ec (diff)
[FreeBSD] Ensure that drm_pci_alloc is never called while locks are held.
Diffstat (limited to 'bsd-core/drm_bufs.c')
-rw-r--r--bsd-core/drm_bufs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bsd-core/drm_bufs.c b/bsd-core/drm_bufs.c
index 45e01470..94f51386 100644
--- a/bsd-core/drm_bufs.c
+++ b/bsd-core/drm_bufs.c
@@ -595,8 +595,10 @@ static int drm_do_addbufs_pci(struct drm_device *dev, struct drm_buf_desc *reque
page_count = 0;
while (entry->buf_count < count) {
+ DRM_SPINUNLOCK(&dev->dma_lock);
drm_dma_handle_t *dmah = drm_pci_alloc(dev, size, alignment,
0xfffffffful);
+ DRM_SPINLOCK(&dev->dma_lock);
if (dmah == NULL) {
/* Set count correctly so we free the proper amount. */
entry->buf_count = count;