[Intel-gfx] [PATCH 1/2] drm/i915/guc: Fill preempt context once at init time

Chris Wilson chris at chris-wilson.co.uk
Mon Feb 26 14:46:31 UTC 2018


Quoting Chris Wilson (2018-02-26 14:38:20)
> Quoting Chris Wilson (2018-02-26 14:28:36)
> > Quoting MichaƂ Winiarski (2018-02-26 13:59:59)
> > > +       for_each_engine(engine, dev_priv, id) {
> >                 struct intel_engine *ce = &client->owner->engine[id];
> > 
> >                 /* The preempt context must be pinned on each engine);
> >                 GEM_BUG_ON(!ce->pin_count);
> > 
> >                 /*
> >                  * We rely on the context image *not* being saved after
> >                  * preemption. This ensures that the RING_HEAD / RING_TAIL
> >                  * do not advance and they remain pointing at this command
> >                  * sequence forever.
> >                  */
> 
> Hmm, this is not true. See intel_lr_context_resume().

Continuing this chain of thought, that doesn't matter. The reg state is
reset to 0, which is what we expect with context-save-inhibit anyway.
What it does do is reset ring->tail to 0 as well. That doesn't play well
with my idea to use ring->tail.
-Chris


More information about the Intel-gfx mailing list