From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH 6/6] drm/i915: Create VMAs Date: Thu, 18 Jul 2013 01:12:17 +0100 Message-ID: <20130718001217.GE6210@cantiga.alporthouse.com> References: <1374018609-1047-5-git-send-email-ben@bwidawsk.net> <1374088743-23250-1-git-send-email-ben@bwidawsk.net> <1374088743-23250-2-git-send-email-ben@bwidawsk.net> 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 1CE30E5F03 for ; Wed, 17 Jul 2013 17:12:23 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1374088743-23250-2-git-send-email-ben@bwidawsk.net> 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: Ben Widawsky Cc: Intel GFX List-Id: intel-gfx@lists.freedesktop.org On Wed, Jul 17, 2013 at 12:19:03PM -0700, Ben Widawsky wrote: > Formerly: "drm/i915: Create VMAs (part 1)" > > In a previous patch, the notion of a VM was introduced. A VMA describes > an area of part of the VM address space. A VMA is similar to the concept > in the linux mm. However, instead of representing regular memory, a VMA > is backed by a GEM BO. There may be many VMAs for a given object, one > for each VM the object is to be used in. This may occur through flink, > dma-buf, or a number of other transient states. > > Currently the code depends on only 1 VMA per object, for the global GTT > (and aliasing PPGTT). The following patches will address this and make > the rest of the infrastructure more suited > > v2: s/i915_obj/i915_gem_obj (Chris) > > v3: Only move an object to the now global unbound list if there are no > more VMAs for the object which are bound into a VM (ie. the list is > empty). > > v4: killed obj->gtt_space > some reworks due to rebase > > v5: Free vma on error path (Imre) > > v6: Another missed vma free in i915_gem_object_bind_to_gtt error path > (Imre) > Fixed vma freeing in stolen preallocation (Imre) Big-bada-boom; set-cache-level needs to iterate over vma, and in particular should not dereference a non-existent one. Or if we decided that set-cache-level was a ggtt only property, just not explode if there is no global vma. -Chris -- Chris Wilson, Intel Open Source Technology Centre