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: Mon, 21 Mar 2011 14:11:07 +0100 Message-ID: <1300713067.8042.13.camel@thor.local> References: <1294420304-24811-1-git-send-email-konrad.wilk@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <1294420304-24811-1-git-send-email-konrad.wilk@oracle.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 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 toyin= g > with modifying the TTM API to pass in 'struct device' or 'struct pci_= device' > but figured it would make first sense to get your guys input before h= eading that route. It's worse than unsightly: It breaks TTM on PPC. See arch/powerpc/include/asm/dma-mapping.h: get_dma_ops() returns NULL 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. Dave, please prevent this change from entering mainline before there's = a solution for this. --=20 Earthling Michel D=C3=A4nzer | http://www.vmwa= re.com Libre software enthusiast | Debian, X and DRI develope= r