[Intel-gfx] [PATCH 13/37] drm/i915: Add convenience wrappers for vma's object get/put

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Fri Aug 12 08:03:36 UTC 2016


On pe, 2016-08-12 at 07:54 +0100, Chris Wilson wrote:
> +static inline struct i915_vma *i915_vma_get(struct i915_vma *vma)
> +{
> +	i915_gem_object_get(vma->obj);
> +	return vma;
> +}
> +
> +static inline void i915_vma_put(struct i915_vma *vma)
> +{
> +	lockdep_assert_held(&vma->vm->dev->struct_mutex);
> +	i915_gem_object_put(vma->obj);
> +}

As noted in IRC, the locking asymmetry is kinda meh, to be consolidated
in the future I hope.

Reviewed-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation


More information about the Intel-gfx mailing list