From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: ttm dma allocator issue ? Date: Mon, 12 Dec 2011 16:45:06 -0500 Message-ID: <20111212214506.GA12318@phenom.dumpdata.com> References: <20111210022543.GA2363@homer.localdomain> <20111212162115.GA17658@phenom.dumpdata.com> <20111212173743.GA2431@phenom.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by gabe.freedesktop.org (Postfix) with ESMTP id 6C3CD9E81A for ; Mon, 12 Dec 2011 13:46:02 -0800 (PST) Content-Disposition: inline In-Reply-To: <20111212173743.GA2431@phenom.dumpdata.com> 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: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Mon, Dec 12, 2011 at 12:37:43PM -0500, Konrad Rzeszutek Wilk wrote: > > > Any ideas ? > > > > The only way to do that would be to modify the 'struct dma_page' vaddr and dma > > variables from what they had in __ttm_dma_alloc_page. But I am not seeing any > > willfull modifications. We do pass in to dma_free_coherent the _same_ values! > > > > > > Hm, it might be worth adding in the 'struct dma_page' a 'virt_to_phys' value > > (which is what the DMA debug API uses to check), and see we get inconsitent > > values _before_ we call the DMA debug API. This is rather to double check > > the DMA API debug API. I am going to try something like this (not compile tested at all): > > This one is compile tested :-) > > diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c > index 6678abc..659b0ee 100644 > --- a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c > +++ b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c > @@ -32,7 +32,7 @@ > * - Tracks whether the page is UC, WB or cached (and reverts to WB > * when freed). > */ > - And I think if you cherry-pick git commit 91ec37cc1015220965e39bf342fb846810d19e79 Author: Thomas Jarosch Date: Thu Nov 17 20:31:02 2011 +0100 Fix comparison using wrong pointer variable in dma debug code which fixes the DMA debug API code, the error you are getting will go away.