summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Noland <rnoland@2hip.net>2009-03-08 22:55:01 -0500
committerRobert Noland <rnoland@2hip.net>2009-03-08 22:55:01 -0500
commitaf1afb3c381797e6bf0fb56abd4505094cb6c11e (patch)
tree0c7a1d7f41bc196c907c28d4b6b6b4d26fbdd5d5
parent2221e16703bf5bf813a98926b968bd5b28eb5d70 (diff)
FreeBSD: Fix up the flags to bus_dmamem_*
Allow it to sleep waiting for resources during the allocation stage. Only use BUS_DMA_NOWAIT when loading the map.
-rw-r--r--bsd-core/drm_scatter.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bsd-core/drm_scatter.c b/bsd-core/drm_scatter.c
index 7cb52fd8..09bc5aae 100644
--- a/bsd-core/drm_scatter.c
+++ b/bsd-core/drm_scatter.c
@@ -89,7 +89,7 @@ drm_sg_alloc(struct drm_device *dev, struct drm_scatter_gather *request)
}
ret = bus_dmamem_alloc(dmah->tag, &dmah->vaddr,
- BUS_DMA_NOWAIT | BUS_DMA_ZERO | BUS_DMA_NOCACHE, &dmah->map);
+ BUS_DMA_WAITOK | BUS_DMA_ZERO, &dmah->map);
if (ret != 0) {
bus_dma_tag_destroy(dmah->tag);
free(dmah, DRM_MEM_DMA);
@@ -99,7 +99,8 @@ drm_sg_alloc(struct drm_device *dev, struct drm_scatter_gather *request)
}
ret = bus_dmamap_load(dmah->tag, dmah->map, dmah->vaddr,
- request->size, drm_sg_alloc_cb, entry, 0);
+ request->size, drm_sg_alloc_cb, entry,
+ BUS_DMA_NOWAIT | BUS_DMA_NOCACHE);
if (ret != 0) {
bus_dmamem_free(dmah->tag, dmah->vaddr, dmah->map);
bus_dma_tag_destroy(dmah->tag);