[Intel-gfx] [PATCH v2 01/11] drm/i915: Create distinct lockclasses for execution vs user timelines

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Tue Nov 8 07:43:21 UTC 2016


On ma, 2016-11-07 at 13:59 +0000, Chris Wilson wrote:
> @@ -56,6 +61,24 @@ int i915_gem_timeline_init(struct drm_i915_private *i915,
>  	return 0;
>  }
>  
> +int i915_gem_timeline_init(struct drm_i915_private *i915,
> +			   struct i915_gem_timeline *timeline,
> +			   const char *name)
> +{
> +	static struct lock_class_key class;
> +	return __i915_gem_timeline_init(i915, timeline, name,
> +					&class, "timeline");
> +}
> +
> +int i915_gem_timeline_init__global(struct drm_i915_private *i915)
> +{
> +	static struct lock_class_key class;
> +	return __i915_gem_timeline_init(i915,
> +					&i915->gt.global_timeline,
> +					"[execution]",
> +					&class, "global-timeline");
> +}
> +

These names might have potential to be confusing in lockdep splat,
don't you think?

> @@ -67,6 +67,7 @@ struct i915_gem_timeline {
>  int i915_gem_timeline_init(struct drm_i915_private *i915,
>  			   struct i915_gem_timeline *tl,
>  			   const char *name);
> +int i915_gem_timeline_init__global(struct drm_i915_private *i915);

I'm not super fond of this function name either :P But init_timeline vs
timeline_init is also confusing.

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