From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Widawsky Subject: Re: [PATCH 06/10] drm/i915: Stop using AGP layer for GEN6+ Date: Wed, 24 Oct 2012 10:56:15 -0700 Message-ID: <20121024105615.5cf6633e@bwidawsk.net> References: <1350956055-3224-1-git-send-email-ben@bwidawsk.net> <1350956055-3224-7-git-send-email-ben@bwidawsk.net> <878vaxwk61.fsf@gaia.fi.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from shiva.chad-versace.us (209-20-75-48.static.cloud-ips.com [209.20.75.48]) by gabe.freedesktop.org (Postfix) with ESMTP id 366759E7B4 for ; Wed, 24 Oct 2012 10:56:28 -0700 (PDT) In-Reply-To: <878vaxwk61.fsf@gaia.fi.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Mika Kuoppala , intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Tue, 23 Oct 2012 13:35:18 +0300 Mika Kuoppala wrote: > On Mon, 22 Oct 2012 18:34:11 -0700, Ben Widawsky wrote: > > +static void teardown_scratch_page(struct drm_device *dev) > > +{ > > + struct drm_i915_private *dev_priv = dev->dev_private; > > + set_pages_wb(dev_priv->mm.gtt->scratch_page, 1); > > + pci_unmap_page(dev->pdev, dev_priv->mm.gtt->scratch_page_dma, > > + PAGE_SIZE, PCI_DMA_BIDIRECTIONAL); > > #ifdef CONFIG_INTEL_IOMMU needed around pci_unmap_page? It preserves the original behavior, which I believe is fine as is. The iommu code should just do nothing. I am partial thuogh, since I am the original reviewer on the patch that introduced that. > > > + put_page(dev_priv->mm.gtt->scratch_page); > > + __free_page(dev_priv->mm.gtt->scratch_page); > > +} > > + -- Ben Widawsky, Intel Open Source Technology Center