Re: [PATCH 52/55] drm/i915: Track active vma requests

Joonas Lahtinen
2016-07-27T09:47:48Z

On ma, 2016-07-25 at 18:32 +0100, Chris Wilson wrote:

> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.h b/drivers/gpu/drm/i915/i915_gem_gtt.h
> index 529fb483afc8..d2206f40f7b2 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.h
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.h
>
> +static inline bool i915_vma_is_active(const struct i915_vma *vma)
> +{
> + return vma->active;
> +}
> +
> +static inline void i915_vma_set_active(struct i915_vma *vma,
> +        unsigned int engine)
> +{
> + vma->active |= BIT(engine);
> +}
> +
> +static inline void i915_vma_unset_active(struct i915_vma *vma,
> +  unsigned int engine)
> +{
> + vma->active &= ~BIT(engine);
> +}
> +
> +static inline bool i915_vma_has_active_engine(const struct i915_vma *vma,
> +       unsigned int engine)
> +{
> + return vma->active & BIT(engine);
> +}
> +

Are these going to grow more complex? Otherwise looks fine,

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

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