From 6f2479c67432f764bfc4e248689f1737c1935237 Mon Sep 17 00:00:00 2001 From: Robert Noland Date: Sat, 6 Sep 2008 18:37:06 -0400 Subject: [FreeBSD] Ensure that drm_pci_alloc is never called while locks are held. --- shared-core/mach64_dma.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'shared-core/mach64_dma.c') 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; -- cgit v1.2.3