]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/i915: Fix test on inputs for vma_compare()
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 3 Nov 2016 20:08:52 +0000 (20:08 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 14 Nov 2016 15:59:21 +0000 (15:59 +0000)
When supplying a view to vma_compare() it is required that the supplied
i915_address_space is the global GTT. I tested the VMA instead (which is
the current position in the rbtree and maybe from any address space).

(This reapplies commit a44342acde30 ("drm/i915: Fix test on inputs for
vma_compare()") as it was lost in the vma split)

Reported-by: Matthew Auld <matthew.auld@intel.com>
Tested-by: Matthew Auld <matthew.auld@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98579
Fixes: db6c2b4151f2 ("drm/i915: Store the vma in an rbtree...")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161103200852.23431-1-chris@chris-wilson.co.uk
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Reported-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Fixes: b42fe9ca0a1e ("drm/i915: Split out i915_vma.c")
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
drivers/gpu/drm/i915/i915_vma.h

index 329b3fe79d5327f1310c1c2f0ce6ca05fb51be99..2e49f5dd610764a960a10bb50812d42a0b09bc42 100644 (file)
@@ -184,7 +184,7 @@ i915_vma_compare(struct i915_vma *vma,
                 struct i915_address_space *vm,
                 const struct i915_ggtt_view *view)
 {
-       GEM_BUG_ON(view && !i915_vma_is_ggtt(vma));
+       GEM_BUG_ON(view && !i915_is_ggtt(vm));
 
        if (vma->vm != vm)
                return vma->vm - vm;