[Intel-gfx] [PATCH 3/5] drm/i915: Drop address size from ppgtt_type

Chris Wilson chris at chris-wilson.co.uk
Fri Mar 15 08:32:56 UTC 2019


Quoting Rodrigo Vivi (2019-03-15 00:03:43)
> On Thu, Mar 14, 2019 at 10:38:37PM +0000, Chris Wilson wrote:
> > With the introduction of the separate addressable bits into the device
> > info, we can remove the conflation of the ppgtt size from the ppgtt
> > type.
> > 
> > Based on a patch by Bob Paauwe <bob.j.paauwe at intel.com>
> > 
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> > Cc: Bob Paauwe <bob.j.paauwe at intel.com>
> > Cc: Matthew Auld <matthew.william.auld at gmail.com>
> > Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/i915_drv.c             | 2 +-
> >  drivers/gpu/drm/i915/i915_drv.h             | 2 --
> >  drivers/gpu/drm/i915/i915_pci.c             | 4 ++--
> >  drivers/gpu/drm/i915/intel_device_info.h    | 1 -
> >  drivers/gpu/drm/i915/selftests/huge_pages.c | 2 +-
> >  5 files changed, 4 insertions(+), 7 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> > index ad695cdc0487..a3b00ecc58c9 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.c
> > +++ b/drivers/gpu/drm/i915/i915_drv.c
> > @@ -348,7 +348,7 @@ static int i915_getparam_ioctl(struct drm_device *dev, void *data,
> >               value = HAS_WT(dev_priv);
> >               break;
> >       case I915_PARAM_HAS_ALIASING_PPGTT:
> > -             value = min_t(int, INTEL_PPGTT(dev_priv), I915_GEM_PPGTT_FULL);
> > +             value = INTEL_PPGTT(dev_priv);
> 
> I don't know the users of this param so I'm not 100% confident that this
> doesn't break something.

The point was that we made the change earlier to define intel_ppgtt_type
from the uABI values, of which INTEL_PPGTT_FULL_4LVL was the odd one out
for not being exported as it still implied _48b_ (back when it was just
a reflection of the modparam). Upon introducing 48b, we added
I915_CONTEXT_PARAM_GTT_SIZE precisely for the purpose of reporting the
actual GTT size (with the hope that we could one day support dynamic
resizing per-context) rather than infer it based on an global enum.
-Chris


More information about the Intel-gfx mailing list