Author: rnoland
Date: Thu Apr  2 17:53:30 2009
New Revision: 190647
URL: http://svn.freebsd.org/changeset/base/190647

Log:
  Merge 190123,190282
  
  Fix up the flags to bus_dmamem again.  The man page incorrectly showed
  the BUS_DMA_NOCACHE flags as being a valid flag for load instead of alloc.
  
  Approved by:  re (kib)

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/ati_pcigart.c
  stable/7/sys/dev/drm/drm_scatter.c

Modified: stable/7/sys/dev/drm/ati_pcigart.c
==============================================================================
--- stable/7/sys/dev/drm/ati_pcigart.c  Thu Apr  2 17:16:39 2009        
(r190646)
+++ stable/7/sys/dev/drm/ati_pcigart.c  Thu Apr  2 17:53:30 2009        
(r190647)
@@ -75,14 +75,14 @@ drm_ati_alloc_pcigart_table(struct drm_d
            NULL, NULL, /* filtfunc, filtfuncargs */
            gart_info->table_size, 1, /* maxsize, nsegs */
            gart_info->table_size, /* 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 ENOMEM;
        }
 
-       flags = BUS_DMA_NOWAIT | BUS_DMA_ZERO;
+       flags = BUS_DMA_WAITOK | BUS_DMA_ZERO;
        if (gart_info->gart_reg_if == DRM_ATI_GART_IGP)
            flags |= BUS_DMA_NOCACHE;
        
@@ -95,7 +95,8 @@ drm_ati_alloc_pcigart_table(struct drm_d
        DRM_LOCK();
 
        ret = bus_dmamap_load(dmah->tag, dmah->map, dmah->vaddr,
-           gart_info->table_size, drm_ati_alloc_pcigart_table_cb, dmah, 0);
+           gart_info->table_size, drm_ati_alloc_pcigart_table_cb, dmah,
+           BUS_DMA_NOWAIT);
        if (ret != 0) {
                bus_dmamem_free(dmah->tag, dmah->vaddr, dmah->map);
                bus_dma_tag_destroy(dmah->tag);

Modified: stable/7/sys/dev/drm/drm_scatter.c
==============================================================================
--- stable/7/sys/dev/drm/drm_scatter.c  Thu Apr  2 17:16:39 2009        
(r190646)
+++ stable/7/sys/dev/drm/drm_scatter.c  Thu Apr  2 17:53:30 2009        
(r190647)
@@ -92,7 +92,7 @@ drm_sg_alloc(struct drm_device *dev, str
        }
 
        ret = bus_dmamem_alloc(dmah->tag, &dmah->vaddr,
-           BUS_DMA_WAITOK | BUS_DMA_ZERO, &dmah->map);
+           BUS_DMA_WAITOK | BUS_DMA_ZERO | BUS_DMA_NOCACHE, &dmah->map);
        if (ret != 0) {
                bus_dma_tag_destroy(dmah->tag);
                free(dmah, DRM_MEM_DMA);
@@ -102,8 +102,7 @@ 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,
-           BUS_DMA_NOWAIT | BUS_DMA_NOCACHE);
+           request->size, drm_sg_alloc_cb, entry, BUS_DMA_NOWAIT);
        if (ret != 0) {
                bus_dmamem_free(dmah->tag, dmah->vaddr, dmah->map);
                bus_dma_tag_destroy(dmah->tag);
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to