From owner-svn-src-all@FreeBSD.ORG Fri Mar 20 04:48:28 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44E571065690; Fri, 20 Mar 2009 04:48:28 +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 32A8A8FC0C; Fri, 20 Mar 2009 04:48:28 +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 n2K4mSfs086166; Fri, 20 Mar 2009 04:48:28 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n2K4mSYO086165; Fri, 20 Mar 2009 04:48:28 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200903200448.n2K4mSYO086165@svn.freebsd.org> From: Robert Noland Date: Fri, 20 Mar 2009 04:48:28 +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: r190123 - head/sys/dev/drm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Mar 2009 04:48:29 -0000 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);