[Intel-gfx] [PATCH 01/23] drm/i915: Move aliasing_ppgtt underneath its i915_ggtt

Chris Wilson chris at chris-wilson.co.uk
Wed Jul 24 09:37:19 UTC 2019


Quoting Chris Wilson (2019-07-24 10:27:38)
> Quoting Tvrtko Ursulin (2019-07-24 09:56:34)
> > 
> > On 23/07/2019 19:38, Chris Wilson wrote:
> > > +static int __context_pin_ppgtt(struct intel_context *ce)
> > >   {
> > >       struct i915_address_space *vm;
> > >       int err = 0;
> > >   
> > > -     vm = ctx->vm ?: &ctx->i915->mm.aliasing_ppgtt->vm;
> > > +     vm = vm_alias(ce);
> > >       if (vm)
> > 
> > Can't return NULL it seems. (Same below.)
> 
> Are you so sure?
> 
> ce->gem_context->vm is only !NULL if there is a full-ppgtt
> &ggtt->alias->vm is only !NULL if there is an aliasing-ppgtt
> 
> There may be contexts with neither (gen4, gen5).

It's not until the next patch where we always set ce->vm will it be
non-NULL. Point taken.
-Chris


More information about the Intel-gfx mailing list