Commit 4ea9527c authored by Chris Wilson's avatar Chris Wilson

drm/i915: Add a check that the VMA instance we lookup matches the request

Just as added paranoia against our future-selves add another check that
the lookup/created VMA instance matches the request.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170116152131.18089-3-chris@chris-wilson.co.ukReviewed-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
parent 718659a6
...@@ -242,6 +242,7 @@ i915_vma_instance(struct drm_i915_gem_object *obj, ...@@ -242,6 +242,7 @@ i915_vma_instance(struct drm_i915_gem_object *obj,
vma = i915_vma_create(obj, vm, view); vma = i915_vma_create(obj, vm, view);
GEM_BUG_ON(!IS_ERR(vma) && i915_vma_is_closed(vma)); GEM_BUG_ON(!IS_ERR(vma) && i915_vma_is_closed(vma));
GEM_BUG_ON(!IS_ERR(vma) && i915_vma_compare(vma, vm, view));
GEM_BUG_ON(!IS_ERR(vma) && i915_vma_lookup(obj, vm, view) != vma); GEM_BUG_ON(!IS_ERR(vma) && i915_vma_lookup(obj, vm, view) != vma);
return vma; return vma;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment