[Intel-gfx] [PATCH 06/16] drm/i915: Add a reminder that i915_vma_move_to_active() requires struct_mutex

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Thu Dec 8 17:40:22 UTC 2016


On 07/12/2016 13:58, Chris Wilson wrote:
> i915_vma_move_to_active() requires the struct_mutex for serialisation
> with retirement, so mark it up with lockdep_assert_held().
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/i915_gem_execbuffer.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> index d665a33229bd..c64438f8171c 100644
> --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> @@ -1259,6 +1259,7 @@ void i915_vma_move_to_active(struct i915_vma *vma,
>  	struct drm_i915_gem_object *obj = vma->obj;
>  	const unsigned int idx = req->engine->id;
>
> +	lockdep_assert_held(&req->i915->drm.struct_mutex);
>  	GEM_BUG_ON(!drm_mm_node_allocated(&vma->node));
>
>  	/* Add a reference if we're newly entering the active list.
>

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

Regards,

Tvrtko


More information about the Intel-gfx mailing list