[Intel-gfx] [RFC 08/14] drm/i915: Store backpointer to intel_gt in the engine

Chris Wilson chris at chris-wilson.co.uk
Mon Jun 10 16:16:57 UTC 2019


Quoting Tvrtko Ursulin (2019-06-10 16:54:13)
> diff --git a/drivers/gpu/drm/i915/gt/intel_engine_types.h b/drivers/gpu/drm/i915/gt/intel_engine_types.h
> index 01223864237a..343c4459e8a3 100644
> --- a/drivers/gpu/drm/i915/gt/intel_engine_types.h
> +++ b/drivers/gpu/drm/i915/gt/intel_engine_types.h
> @@ -34,6 +34,7 @@ struct drm_i915_reg_table;
>  struct i915_gem_context;
>  struct i915_request;
>  struct i915_sched_attr;
> +struct intel_gt;
>  struct intel_uncore;
>  
>  typedef u8 intel_engine_mask_t;
> @@ -266,6 +267,7 @@ struct intel_engine_execlists {
>  
>  struct intel_engine_cs {
>         struct drm_i915_private *i915;
> +       struct intel_gt *gt;

I'd push for gt as being the backpointer, and i915 its distant grand
parent. Not sure how much pain that would bring just for the elimination
of one more drm_i915_private, but that's how I picture the
encapsulation.

I'm sure I'm missing a link or two :)
-Chris


More information about the Intel-gfx mailing list