diff options
Diffstat (limited to 'sys/dev/drm/ati_pcigart.c')
-rw-r--r-- | sys/dev/drm/ati_pcigart.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/dev/drm/ati_pcigart.c b/sys/dev/drm/ati_pcigart.c index 3073cb1..10be0af 100644 --- a/sys/dev/drm/ati_pcigart.c +++ b/sys/dev/drm/ati_pcigart.c @@ -75,18 +75,15 @@ drm_ati_alloc_pcigart_table(struct drm_device *dev, 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; - if (gart_info->gart_reg_if == DRM_ATI_GART_IGP) - flags |= BUS_DMA_NOCACHE; - - ret = bus_dmamem_alloc(dmah->tag, &dmah->vaddr, flags, &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); @@ -94,8 +91,12 @@ drm_ati_alloc_pcigart_table(struct drm_device *dev, } DRM_LOCK(); + flags = BUS_DMA_NOWAIT; + if (gart_info->gart_reg_if == DRM_ATI_GART_IGP) + flags |= BUS_DMA_NOCACHE; + 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, flags); if (ret != 0) { bus_dmamem_free(dmah->tag, dmah->vaddr, dmah->map); bus_dma_tag_destroy(dmah->tag); |