From: Chris Wilson Subject: Re: Regression introduced by 90797e6d1ec0dfde6ba62a48b9ee3803887d6ed4 ("drm/i915: create compact dma scatter lists for gem objects") Was:Re: i915 mapping large (3MB) scatter list, hitting limits on certain IOMMUs that can only map contingous regions up to 2MB. Date: Sat, 22 Jun 2013 15:22:59 +0100 Message-ID: <20130622142259.GA3499@cantiga.alporthouse.com> References: <20130621192827.GA2044@localhost.localdomain> <20130622020343.GA19139@phenom.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from fireflyinternet.com (s16502780.onlinehome-server.info [87.106.93.118]) by gabe.freedesktop.org (Postfix) with ESMTP id 2D18DE5C90 for ; Sat, 22 Jun 2013 07:23:07 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20130622020343.GA19139@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: Konrad Rzeszutek Wilk Cc: daniel.vetter@ffwll.ch, dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Fri, Jun 21, 2013 at 10:03:43PM -0400, Konrad Rzeszutek Wilk wrote: > On Fri, Jun 21, 2013 at 03:28:28PM -0400, Konrad Rzeszutek Wilk wrote: > > Hey, > > CC-ing Imre, > > Imre, your patch 90797e6d1ec0dfde6ba62a48b9ee3803887d6ed4 > ("drm/i915: create compact dma scatter lists for gem objects") is the cause > of the regression. > > If I revert your patch it boots fine without any trouble. > > I am not entirely sure why that is - as I added some debug code in > lib/swiotlb.c to trigger when it can't find 3MB area (which > is what I thought initially was the issue) - but none of the debug > code seems to be hit. > > Any thoughts? You should be hitting drivers/iommu/intel-iommu.c for the dma translation. It looks like the contiguous 3MiB segment will be special as it is the first sg that __domain_mapping() will attempt to allocate a superpage (2MiB) for. What goes wrong at point, I am not sure, but I would suggest peppering intel-iommu.c with printk to track down the error. -Chris -- Chris Wilson, Intel Open Source Technology Centre