diff options
author | Robert Noland <rnoland@2hip.net> | 2009-03-08 22:55:01 -0500 |
---|---|---|
committer | Robert Noland <rnoland@2hip.net> | 2009-03-08 22:55:01 -0500 |
commit | af1afb3c381797e6bf0fb56abd4505094cb6c11e (patch) | |
tree | 0c7a1d7f41bc196c907c28d4b6b6b4d26fbdd5d5 /bsd-core | |
parent | 2221e16703bf5bf813a98926b968bd5b28eb5d70 (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.
Diffstat (limited to 'bsd-core')
-rw-r--r-- | bsd-core/drm_scatter.c | 5 |
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); |