svn commit: r189559 - head/sys/dev/drm
Robert Noland
rnoland at FreeBSD.org
Mon Mar 9 00:38:23 PDT 2009
Author: rnoland
Date: Mon Mar 9 07:38:22 2009
New Revision: 189559
URL: http://svn.freebsd.org/changeset/base/189559
Log:
Fix the flags to bus_dmamem_* to allow the allocation to sleep while
waiting for resources. It is really the load that we can't defer.
BUS_DMA_NOCACHE belongs on bus_dmamap_load() as well.
MFC after: 3 days
Modified:
head/sys/dev/drm/drm_scatter.c
Modified: head/sys/dev/drm/drm_scatter.c
==============================================================================
--- head/sys/dev/drm/drm_scatter.c Mon Mar 9 07:33:35 2009 (r189558)
+++ head/sys/dev/drm/drm_scatter.c Mon Mar 9 07:38:22 2009 (r189559)
@@ -92,7 +92,7 @@ drm_sg_alloc(struct drm_device *dev, str
}
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);
@@ -102,7 +102,8 @@ drm_sg_alloc(struct drm_device *dev, str
}
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);
More information about the svn-src-head
mailing list