Re: [PATCH 30/38] drm/i915: Make context pinning part of intel_context_ops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux