summaryrefslogtreecommitdiff
path: root/shared-core/mach64_dma.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 /shared-core/mach64_dma.c
parent31709aa2be54877c45ca382bf370b41dbaf5c2ec (diff)
[FreeBSD] Ensure that drm_pci_alloc is never called while locks are held.
Diffstat (limited to 'shared-core/mach64_dma.c')
-rw-r--r--shared-core/mach64_dma.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/shared-core/mach64_dma.c b/shared-core/mach64_dma.c
index 339234fa..3f2367ba 100644
--- a/shared-core/mach64_dma.c
+++ b/shared-core/mach64_dma.c
@@ -834,8 +834,14 @@ static int mach64_bm_dma_test(struct drm_device * dev)
/* FIXME: get a dma buffer from the freelist here */
DRM_DEBUG("Allocating data memory ...\n");
+#ifdef __FreeBSD__
+ DRM_UNLOCK();
+#endif
cpu_addr_dmah =
drm_pci_alloc(dev, 0x1000, 0x1000, 0xfffffffful);
+#ifdef __FreeBSD__
+ DRM_LOCK();
+#endif
if (!cpu_addr_dmah) {
DRM_INFO("data-memory allocation failed!\n");
return -ENOMEM;