From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH 17/26] drm/i915: Clean up pagetable DMA map & unmap Date: Tue, 18 Mar 2014 09:24:56 +0000 Message-ID: <20140318092456.GH18530@nuc-i3427.alporthouse.com> References: <1395121738-29126-1-git-send-email-benjamin.widawsky@intel.com> <1395121738-29126-18-git-send-email-benjamin.widawsky@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from fireflyinternet.com (mail.fireflyinternet.com [87.106.93.118]) by gabe.freedesktop.org (Postfix) with ESMTP id 2C2C58A602 for ; Tue, 18 Mar 2014 02:25:00 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1395121738-29126-18-git-send-email-benjamin.widawsky@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Ben Widawsky Cc: Intel GFX List-Id: intel-gfx@lists.freedesktop.org On Mon, Mar 17, 2014 at 10:48:49PM -0700, Ben Widawsky wrote: > Map and unmap are common operations across all generations for > pagetables. With a simple helper, we can get a nice net code reduction > as well as simplified complexity. > > There is some room for optimization here, for instance with the multiple > page mapping, that can be done in one pci_map operation. In that case > however, the max value we'll ever see there is 512, and so I believe the > simpler code makes this a worthwhile trade-off. Also, the range mapping > functions are place holders to help transition the code. Eventually, > mapping will only occur during a page allocation which will always be a > discrete operation. Nice. (Except still uneasy about that WARN_ON ;-) -Chris -- Chris Wilson, Intel Open Source Technology Centre