From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH] drm/i915: inline vma_create into lookup_or_create_vma Date: Wed, 14 Aug 2013 18:47:00 +0200 Message-ID: <20130814164700.GX9296@phenom.ffwll.local> References: <1376473116-21874-5-git-send-email-daniel.vetter@ffwll.ch> <1376474349-30928-1-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ea0-f180.google.com (mail-ea0-f180.google.com [209.85.215.180]) by gabe.freedesktop.org (Postfix) with ESMTP id 075CBE6A1E for ; Wed, 14 Aug 2013 09:46:52 -0700 (PDT) Received: by mail-ea0-f180.google.com with SMTP id h10so984875eaj.11 for ; Wed, 14 Aug 2013 09:46:52 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1376474349-30928-1-git-send-email-daniel.vetter@ffwll.ch> 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: Intel Graphics Development Cc: Daniel Vetter , Ben Widawsky List-Id: intel-gfx@lists.freedesktop.org On Wed, Aug 14, 2013 at 11:59:09AM +0200, Daniel Vetter wrote: > In the execbuf code we don't clean up any vmas which ended up not > getting bound for code simplicity. To make sure that we don't end up > creating multiple vma for the same vm kill the somewhat dangerous > vma_create function and inline it into lookup_or_create. > > This is just a safety measure to prevent surprises in the future. > > Also update the somewhat confused comment in the execbuf code and > clarify what kind of magic is going on with a new one. > > Cc: Ben Widawsky > Signed-off-by: Daniel Vetter > --- > > That's the only concern I could come up with when reading the execbuf > vma conversion patch. So looks good and I'll slurp it all in as soon > as some more head scratching is done for the very first patch in this > series about the vma_unbind fix to only call vma_destroy if the vma > isn't bound. One thing I've noticed but forgot to mention here is that the reloc code still uses obj_ggtt_size/offset. I guess that will be fixed later on? -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch