Skip to content

Commit

Permalink
drm/i915: Add a check that the VMA instance we lookup matches the req…
Browse files Browse the repository at this point in the history
…uest

Just as added paranoia against our future-selves add another check that
the lookup/created VMA instance matches the request.

Signed-off-by: Chris 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.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
  • Loading branch information
Chris Wilson committed Jan 19, 2017
1 parent 718659a commit 4ea9527
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/i915/i915_vma.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ i915_vma_instance(struct drm_i915_gem_object *obj,
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_compare(vma, vm, view));
GEM_BUG_ON(!IS_ERR(vma) && i915_vma_lookup(obj, vm, view) != vma);
return vma;
}
Expand Down

0 comments on commit 4ea9527

Please sign in to comment.