From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [RFC PATCH v2] Utilize the PCI API in the TTM framework. Date: Tue, 22 Mar 2011 10:54:00 -0400 Message-ID: <20110322145400.GC26952@dumpdata.com> References: <1294420304-24811-1-git-send-email-konrad.wilk@oracle.com> <1300713067.8042.13.camel@thor.local> <20110321231835.GA20159@dumpdata.com> <1300799599.3522.6.camel@thor.local> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Content-Disposition: inline In-Reply-To: <1300799599.3522.6.camel@thor.local> Sender: linux-kernel-owner@vger.kernel.org To: Michel =?iso-8859-1?Q?D=E4nzer?= Cc: dri-devel@lists.freedesktop.org, thomas@shipmail.org, airlied@linux.ie, linux-kernel@vger.kernel.org, konrad@darnok.org List-Id: dri-devel@lists.freedesktop.org On Tue, Mar 22, 2011 at 02:13:19PM +0100, Michel D=E4nzer wrote: > On Mon, 2011-03-21 at 19:18 -0400, Konrad Rzeszutek Wilk wrote:=20 > > On Mon, Mar 21, 2011 at 02:11:07PM +0100, Michel D=E4nzer wrote: > > > On Fre, 2011-01-07 at 12:11 -0500, Konrad Rzeszutek Wilk wrote:=20 > > > >=20 > > > > 1) The 'NULL' when doing dma_alloc_coherent is unsightly. I was= toying > > > > with modifying the TTM API to pass in 'struct device' or 'struc= t pci_device' > > > > but figured it would make first sense to get your guys input be= fore heading that route. > > >=20 > > > It's worse than unsightly: It breaks TTM on PPC. See > > > arch/powerpc/include/asm/dma-mapping.h: get_dma_ops() returns NUL= L if > > > NULL is passed in for the device, and most of its callers BUG in = that > > > case. The exception being dma_supported(), so a possible solution= might > > > be to use that for checking if dma_alloc_coherent can be used. > > >=20 > > > Dave, please prevent this change from entering mainline before th= ere's a > > > solution for this. > >=20 > > We do have a fix for it:=20 > >=20 > > git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen.git devel/= ttm.pci-api.v5 > >=20 > > Can you tell me if that works for you? >=20 > Yeah, > http://git.kernel.org/?p=3Dlinux/kernel/git/konrad/xen.git;a=3Dcommit= diff;h=3D02bbfbab7dd6a107ea2f5d6e882631cd31c72eda and http://git.kernel= =2Eorg/?p=3Dlinux/kernel/git/konrad/xen.git;a=3Dcommitdiff;h=3D73330192= 0082553b52ce4453493fe6abf6aa7d1a fix the problem. >=20 Wheew. Good! What kind of hardware do you have that triggered this? Whe= n I implemented this patchset I hadn't thought about PPC b/c..well I didn't have the ha= rdware nor did I think there were any ATI/Nvidia cards that worked with it. Can yo= u give me an idea of type of hardware this is and where I could purchase it? Much appreciated and thank you for testing this!