Date: Mon, 9 Mar 2009 07:38:22 +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: r189559 - head/sys/dev/drm Message-ID: <200903090738.n297cMZl013305@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903090738.n297cMZl013305>