svn commit: r189857 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
dev/cxgb dev/drm
Robert Noland
rnoland at FreeBSD.org
Sun Mar 15 10:23:49 PDT 2009
Author: rnoland
Date: Sun Mar 15 17:23:46 2009
New Revision: 189857
URL: http://svn.freebsd.org/changeset/base/189857
Log:
Merge r189560
Change the flags to bus_dmamem around to allow it to sleep waiting for
resources during allocation, but not during map load. Also, zero the
buffers here.
Modified:
stable/7/sys/ (props changed)
stable/7/sys/contrib/pf/ (props changed)
stable/7/sys/dev/ath/ath_hal/ (props changed)
stable/7/sys/dev/cxgb/ (props changed)
stable/7/sys/dev/drm/drm_pci.c
Modified: stable/7/sys/dev/drm/drm_pci.c
==============================================================================
--- stable/7/sys/dev/drm/drm_pci.c Sun Mar 15 17:22:53 2009 (r189856)
+++ stable/7/sys/dev/drm/drm_pci.c Sun Mar 15 17:23:46 2009 (r189857)
@@ -83,15 +83,15 @@ drm_pci_alloc(struct drm_device *dev, si
maxaddr, BUS_SPACE_MAXADDR, /* lowaddr, highaddr */
NULL, NULL, /* filtfunc, filtfuncargs */
size, 1, size, /* maxsize, nsegs, maxsegsize */
- BUS_DMA_ALLOCNOW, NULL, NULL, /* flags, lockfunc, lockfuncargs */
+ 0, NULL, NULL, /* flags, lockfunc, lockfuncargs */
&dmah->tag);
if (ret != 0) {
free(dmah, DRM_MEM_DMA);
return NULL;
}
- ret = bus_dmamem_alloc(dmah->tag, &dmah->vaddr, BUS_DMA_NOWAIT,
- &dmah->map);
+ ret = bus_dmamem_alloc(dmah->tag, &dmah->vaddr,
+ 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,7 @@ drm_pci_alloc(struct drm_device *dev, si
}
ret = bus_dmamap_load(dmah->tag, dmah->map, dmah->vaddr, size,
- drm_pci_busdma_callback, dmah, 0);
+ drm_pci_busdma_callback, dmah, BUS_DMA_NOWAIT);
if (ret != 0) {
bus_dmamem_free(dmah->tag, dmah->vaddr, dmah->map);
bus_dma_tag_destroy(dmah->tag);
More information about the svn-src-stable
mailing list