diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-01-16 15:21:29 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-01-19 10:17:24 +0000 |
commit | 4ea9527cc03e73afc6a4ac5979d1ecde43b85cf3 (patch) | |
tree | 6edb61492ff9bb6d46ef10ffcebc86f57239af41 /drivers/gpu/drm | |
parent | 718659a63054261d052cd94f2f9502111ff5173f (diff) |
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: 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>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/i915/i915_vma.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c index 87273b0137ec..b4d7b51266d2 100644 --- a/drivers/gpu/drm/i915/i915_vma.c +++ b/drivers/gpu/drm/i915/i915_vma.c @@ -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; } |