[Intel-gfx] [PATCH 06/11] drm/i915/gtt: Subclass gen6_hw_ppgtt
Chris Wilson
chris at chris-wilson.co.uk
Tue Jun 5 09:58:29 UTC 2018
Quoting Joonas Lahtinen (2018-06-05 10:43:14)
> Quoting Chris Wilson (2018-06-05 10:19:44)
> > The legacy gen6 ppgtt needs a little more hand holding than gen8+, and
> > so requires a larger structure. As I intend to make this slightly more
> > complicated in the future, separate the gen6 from the core gen8 hw
> > struct by subclassing. This patch moves the gen6 only features out to
> > gen6_hw_ppgtt and pipes the new type everywhere that needs it.
> >
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> > Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> > Cc: Mika Kuoppala <mika.kuoppala at linux.intel.com>
> > Cc: Matthew Auld <matthew.william.auld at gmail.com>
>
> It's at times confusing when gen6_foo takes either the ppgtt or
> ppgtt->base, but at least compiler will protect from that.
The only consolation is that the number of gen6/i915 switches are reduced
over time. I was trying to keep it as strongly typed as possible with
the minimal of fuss. Hopefully, I struck the right balance (for the
present time, at this point in the series).
-Chris
More information about the Intel-gfx
mailing list