[Intel-gfx] [PATCH 10/38] drm/i915: Defer active reference until required

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Wed Sep 21 08:44:31 UTC 2016


Kerneldoc could help with getting grip of the convention introduced
here.

Does this really have visible results in real world workloads? It adds
further complexity.

On ti, 2016-09-20 at 09:29 +0100, Chris Wilson wrote:
> @@ -2383,6 +2390,28 @@ i915_gem_object_has_active_engine(const struct drm_i915_gem_object *obj,
>  	return obj->flags & BIT(engine + I915_BO_ACTIVE_SHIFT);
>  }
>  
> +static inline bool
> +i915_gem_object_has_active_reference(const struct drm_i915_gem_object *obj)
> +{
> +	return obj->flags & I915_BO_ACTIVE_REF;
> +}
> 

We're still having a mix of set_bit and manual fondling. Oh well.

> @@ -2413,6 +2442,11 @@ static inline void i915_vma_put(struct i915_vma *vma)
> >  	i915_gem_object_put(vma->obj);
>  }
>  
> +static inline void i915_vma_put_internal(struct i915_vma *vma)

Not __i915_vma_put? We only have one _internal function, lets not add
another style mixing here.
 
> +void __i915_gem_object_release_unless_active(struct drm_i915_gem_object *obj)
> +{
> +	if (!obj)
> +		return;

I know I hate this.

Anyway,

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