[Intel-gfx] [PATCH 03/20] drm/i915/gt: Provde a local intel_context.vm

Chris Wilson chris at chris-wilson.co.uk
Mon Jul 22 16:28:13 UTC 2019


Quoting Tvrtko Ursulin (2019-07-22 13:33:14)
> 
> On 18/07/2019 08:00, Chris Wilson wrote:
> > @@ -1113,9 +1121,8 @@ static int set_ppgtt(struct drm_i915_file_private *file_priv,
> >                                  set_ppgtt_barrier,
> >                                  old);
> >       if (err) {
> > -             ctx->vm = old;
> > -             ctx->desc_template = default_desc_template(ctx->i915, old);
> > -             i915_vm_put(vm);
> > +             i915_vm_put(__set_ppgtt(ctx, old));
> > +             i915_vm_put(old);
> 
> Shouldn't this still be i915_vm_out(vm), for the extra vm reference the 
> function did further up?

__set_ppgtt() returns the vm, so this is
	i915_vm_put(vm);
	i915_vm_put(old); /* since we just acquired a ref to old again */
-Chris


More information about the Intel-gfx mailing list