From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH 22/29] drm/i915: Handle stolen objects in pwrite Date: Wed, 22 Aug 2012 16:47:39 +0100 Message-ID: <1345650465_1872@CP5-2952> References: <1344696088-24760-1-git-send-email-chris@chris-wilson.co.uk> <1344696088-24760-23-git-send-email-chris@chris-wilson.co.uk> <20120820195608.GH5170@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from fireflyinternet.com (smtp.fireflyinternet.com [109.228.6.236]) by gabe.freedesktop.org (Postfix) with ESMTP id A6C7A9E78E for ; Wed, 22 Aug 2012 08:47:50 -0700 (PDT) In-Reply-To: <20120820195608.GH5170@phenom.ffwll.local> 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: Daniel Vetter Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Mon, 20 Aug 2012 21:56:08 +0200, Daniel Vetter wrote: > On Sat, Aug 11, 2012 at 03:41:21PM +0100, Chris Wilson wrote: > > Signed-off-by: Chris Wilson > > What about putting kmap/unmap abstractions into obj->ops (like the dma_buf > interface already has)? Since the pwrite/pread code is already rather > branch heave I hope we don't see the overhead of the indirect call even > in microbenchmarks (haven't checked). And this way we would also neatly > wrap up dma_bufs for pwrite (if anyone ever really wants that ...). > > The kmap(_atomic) for stolen mem backed objects would boil down to doing > the pointer arithmetic, kunmap would be just a noop. Sounds nice, I'll cook something up and allocate yet another pointer in drm_i915_gem_object for the typed ops. I wonder if we can unify the phys and the dma_buf... -Chris -- Chris Wilson, Intel Open Source Technology Centre