[PATCH 1/2] drm/i915: Prepare for multiple GTs
Andi Shyti
andi.shyti at linux.intel.com
Wed Jan 12 18:43:48 UTC 2022
Hi Dale,
thanks for looking into this patch,
> > + /*
> > + * i915->gt[0] == &i915->gt0
> > + */
> > +#define I915_MAX_GT 4
> > + struct intel_gt *gt[I915_MAX_GT];
> > +
>
>
> It would be nice if I915_MAX_GT was defined in a more basic header file so
> that the definition of I915_MAX_GT would be available without the necessity of
> including this heavier file i915_drv.h. Maybe gt/intel_gt.h would be a good
> place, as that is where macro for_each_gt (a user of I915_MAX_GT) is defined.
I actually see I915_MAX_GT more suited for in drv.h as it is a
description for i915 rather than the GT singularly.
We should see the GT as a standalone elemnt not aware of the
overall properties of the entire GPU.
While for_each_gt() is more an utility from intel_gt.
Personally, I do not even like this define: I think the number
of the GTs should be read during startup and stored in
drm_i915_private or similar, but this is another discussion.
Thank you,
Andi
More information about the dri-devel
mailing list