diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-01-19 19:26:58 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-01-21 10:32:27 +0000 |
commit | 44a0ec0d3bd5ebbe2233b48cc53b5c79b66277b7 (patch) | |
tree | 3dac5a68089709a8840acdc7d819e78eb35666bd /drivers/gpu/drm/i915/i915_vma.c | |
parent | e0216b762a7096639db395a22bdda7d1a7213c0f (diff) | |
download | op-kernel-dev-44a0ec0d3bd5ebbe2233b48cc53b5c79b66277b7.zip op-kernel-dev-44a0ec0d3bd5ebbe2233b48cc53b5c79b66277b7.tar.gz |
drm/i915: Assert the drm_mm_node is allocated when on the VM lists
Before moving the vma between the VM active/inactive lists, assert that
the node is still allocated.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/20170119192659.31789-5-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_vma.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_vma.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c index e58d879..ecb495b 100644 --- a/drivers/gpu/drm/i915/i915_vma.c +++ b/drivers/gpu/drm/i915/i915_vma.c @@ -45,6 +45,7 @@ i915_vma_retire(struct i915_gem_active *active, if (i915_vma_is_active(vma)) return; + GEM_BUG_ON(!drm_mm_node_allocated(&vma->node)); list_move_tail(&vma->vm_link, &vma->vm->inactive_list); if (unlikely(i915_vma_is_closed(vma) && !i915_vma_is_pinned(vma))) WARN_ON(i915_vma_unbind(vma)); @@ -493,6 +494,7 @@ i915_vma_insert(struct i915_vma *vma, u64 size, u64 alignment, u64 flags) GEM_BUG_ON(vma->node.start < start); GEM_BUG_ON(vma->node.start + vma->node.size > end); } + GEM_BUG_ON(!drm_mm_node_allocated(&vma->node)); GEM_BUG_ON(!i915_gem_valid_gtt_space(vma, obj->cache_level)); list_move_tail(&obj->global_link, &dev_priv->mm.bound_list); |