From owner-svn-src-head@FreeBSD.ORG Sun Mar 22 20:58:29 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A75E1065673; Sun, 22 Mar 2009 20:58:29 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5E7558FC0C; Sun, 22 Mar 2009 20:58:29 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n2MKwTmh083421; Sun, 22 Mar 2009 20:58:29 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n2MKwT03083419; Sun, 22 Mar 2009 20:58:29 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200903222058.n2MKwT03083419@svn.freebsd.org> From: Robert Noland Date: Sun, 22 Mar 2009 20:58:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r190282 - head/sys/dev/drm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2009 20:58:30 -0000 Author: rnoland Date: Sun Mar 22 20:58:29 2009 New Revision: 190282 URL: http://svn.freebsd.org/changeset/base/190282 Log: 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. Discussed with: kib MFC after: 3 days Modified: head/sys/dev/drm/ati_pcigart.c head/sys/dev/drm/drm_scatter.c Modified: head/sys/dev/drm/ati_pcigart.c ============================================================================== --- head/sys/dev/drm/ati_pcigart.c Sun Mar 22 20:54:22 2009 (r190281) +++ head/sys/dev/drm/ati_pcigart.c Sun Mar 22 20:58:29 2009 (r190282) @@ -82,8 +82,11 @@ drm_ati_alloc_pcigart_table(struct drm_d return ENOMEM; } - ret = bus_dmamem_alloc(dmah->tag, &dmah->vaddr, - BUS_DMA_WAITOK | BUS_DMA_ZERO, &dmah->map); + flags = BUS_DMA_WAITOK | 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); if (ret != 0) { bus_dma_tag_destroy(dmah->tag); free(dmah, DRM_MEM_DMA); @@ -91,12 +94,9 @@ 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, flags); + 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: head/sys/dev/drm/drm_scatter.c ============================================================================== --- head/sys/dev/drm/drm_scatter.c Sun Mar 22 20:54:22 2009 (r190281) +++ head/sys/dev/drm/drm_scatter.c Sun Mar 22 20:58:29 2009 (r190282) @@ -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);