Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 81147b07 authored by Chris Wilson's avatar Chris Wilson
Browse files

drm/i915: Add a reminder that i915_vma_move_to_active() requires struct_mutex



i915_vma_move_to_active() requires the struct_mutex for serialisation
with retirement, so mark it up with lockdep_assert_held().

Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161218153724.8439-1-chris@chris-wilson.co.uk
parent 966d5bf5
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -1259,6 +1259,7 @@ void i915_vma_move_to_active(struct i915_vma *vma,
	struct drm_i915_gem_object *obj = vma->obj;
	struct drm_i915_gem_object *obj = vma->obj;
	const unsigned int idx = req->engine->id;
	const unsigned int idx = req->engine->id;


	lockdep_assert_held(&req->i915->drm.struct_mutex);
	GEM_BUG_ON(!drm_mm_node_allocated(&vma->node));
	GEM_BUG_ON(!drm_mm_node_allocated(&vma->node));


	/* Add a reference if we're newly entering the active list.
	/* Add a reference if we're newly entering the active list.