From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH 13/14] drm/ttm: isolate dma data from ttm_tt V3 Date: Wed, 16 Nov 2011 12:21:57 -0500 Message-ID: <20111116172157.GA5360@phenom.dumpdata.com> References: <1321051669-16675-1-git-send-email-j.glisse@gmail.com> <1321051669-16675-14-git-send-email-j.glisse@gmail.com> <20111115210746.GA17200@phenom.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by gabe.freedesktop.org (Postfix) with ESMTP id 60DB29E9C0 for ; Wed, 16 Nov 2011 09:22:07 -0800 (PST) Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Jerome Glisse Cc: thellstrom@vmware.com, Jerome Glisse , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org > >> -int ttm_dma_populate(struct ttm_tt *ttm, struct device *dev); > >> -extern void ttm_dma_unpopulate(struct ttm_tt *ttm, struct device *dev= ); > >> +int ttm_dma_populate(struct ttm_dma_tt *ttm_dma, struct device *dev); > >> +extern void ttm_dma_unpopulate(struct ttm_dma_tt *ttm_dma, struct dev= ice *dev); > >> > >> =A0#else > >> =A0static inline int ttm_dma_page_alloc_init(struct ttm_mem_global *gl= ob, > > > > You are missing changes to the static implementations in case CONFIG_SW= IOTLB is not set. > > > = > Actually i don't think i miss anything > ttm_dma_populate/ttm_dma_unpopulate is conditional on CONFIG_SWIOTLB > in both radeon and nouveau. So i should be fine. Or did i miss > something else ? You are completlty right. Somehow I had in my mind that this was present: diff --git a/include/drm/ttm/ttm_page_alloc.h b/include/drm/ttm/ttm_page_al= loc.h index 5fe2740..bb006c7 100644 --- a/include/drm/ttm/ttm_page_alloc.h +++ b/include/drm/ttm/ttm_page_alloc.h @@ -94,6 +94,16 @@ static inline int ttm_dma_page_alloc_debugfs(struct seq_= file *m, void *data) { return 0; } +static inline int ttm_dma_populate(struct ttm_tt *ttm, + struct device *dev) +{ + return -ENODEV; +} +static inline void ttm_dma_unpopulate(struct ttm_tt *ttm, + struct device *dev) +{ + return; +} #endif = #endif But that does not make sense as the nouveau and radeon are both guarded by = the #ifdef CONFIG_SWIOTLB. So if "# CONFIG_SWIOTLB is not set" is present, well= , nobody will be referencing the ttm_dma_[un|]populate calls.