Date: Fri, 20 Mar 2009 04:48:28 +0000 (UTC) From: Robert Noland <rnoland@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r190123 - head/sys/dev/drm Message-ID: <200903200448.n2K4mSYO086165@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rnoland Date: Fri Mar 20 04:48:27 2009 New Revision: 190123 URL: http://svn.freebsd.org/changeset/base/190123 Log: Adjust the flags to bus_dmamem around here too. MFC after: 3 days Modified: head/sys/dev/drm/ati_pcigart.c Modified: head/sys/dev/drm/ati_pcigart.c ============================================================================== --- head/sys/dev/drm/ati_pcigart.c Fri Mar 20 03:10:12 2009 (r190122) +++ head/sys/dev/drm/ati_pcigart.c Fri Mar 20 04:48:27 2009 (r190123) @@ -75,18 +75,15 @@ 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; - 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_d } 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903200448.n2K4mSYO086165>