From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michel =?ISO-8859-1?Q?D=E4nzer?= Subject: Re: [RFC PATCH v2] Utilize the PCI API in the TTM framework. Date: Tue, 22 Mar 2011 16:10:22 +0100 Message-ID: <1300806622.3522.41.camel@thor.local> 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> <20110322145400.GC26952@dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <20110322145400.GC26952@dumpdata.com> Sender: linux-kernel-owner@vger.kernel.org To: Konrad Rzeszutek Wilk 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 Die, 2011-03-22 at 10:54 -0400, Konrad Rzeszutek Wilk wrote:=20 > On Tue, Mar 22, 2011 at 02:13:19PM +0100, Michel D=C3=A4nzer 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=C3=A4nzer wrot= e: > > > > 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 w= as toying > > > > > with modifying the TTM API to pass in 'struct device' or 'str= uct pci_device' > > > > > but figured it would make first sense to get your guys input = before 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 N= ULL if > > > > NULL is passed in for the device, and most of its callers BUG i= n that > > > > case. The exception being dma_supported(), so a possible soluti= on might > > > > be to use that for checking if dma_alloc_coherent can be used. > > > >=20 > > > > Dave, please prevent this change from entering mainline before = there'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 deve= l/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=3Dcomm= itdiff;h=3D02bbfbab7dd6a107ea2f5d6e882631cd31c72eda and http://git.kern= el.org/?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? > When I implemented this patchset I hadn't thought about PPC b/c..well > I didn't have the hardware nor did I think there were any ATI/Nvidia > cards that worked with it. Can you give me an idea of type of hardwar= e > this is and where I could purchase it? It's an Apple PowerBook with a Mobility Radeon 9700, to buy one new you'd have to go back in time a couple of years first. ;) You should be able to use more recent GPUs in a second-hand Apple G5 or YDL PowerStation, which also have reasonably fast CPUs. --=20 Earthling Michel D=C3=A4nzer | http://www.vmwa= re.com Libre software enthusiast | Debian, X and DRI develope= r