Quoting Tvrtko Ursulin (2019-03-05 17:31:23) > > > On 01/03/2019 14:03, Chris Wilson wrote: > > Push the intel_context pin callback down from intel_engine_cs onto the > > context itself by virtue of having a central caller for > > intel_context_pin() being able to lookup the intel_context itself. > > > > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> > > --- > > -static struct intel_context * > > -execlists_context_pin(struct intel_engine_cs *engine, > > - struct i915_gem_context *ctx) > > +static int execlists_context_pin(struct intel_context *ce) > > { > > - struct intel_context *ce; > > - > > - ce = intel_context_instance(ctx, engine); > > - if (IS_ERR(ce)) > > - return ce; > > - > > - lockdep_assert_held(&ctx->i915->drm.struct_mutex); > > - GEM_BUG_ON(!ctx->ppgtt); > > - > > - if (likely(ce->pin_count++)) > > - return ce; > > - GEM_BUG_ON(!ce->pin_count); /* no overflow please! */ > > - > > - return __execlists_context_pin(engine, ctx, ce); > > + return __execlists_context_pin(ce, ce->engine); > > } > > Do you need this trivial wrapper for later? Yes, it's being kept because virtual engine wants to feed a different engine. -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx