[Intel-gfx] [PATCH 4/6] drm/i915: Record the default hw state after reset upon load

Chris Wilson chris at chris-wilson.co.uk
Thu Nov 2 14:10:17 UTC 2017


Quoting Mika Kuoppala (2017-11-02 13:56:50)
> Chris Wilson <chris at chris-wilson.co.uk> writes:
> > -
> > -     execlists_init_reg_state(vaddr + LRC_STATE_PN * PAGE_SIZE,
> > -                              ctx, engine, ring);
> > +     regs = vaddr + LRC_STATE_PN * PAGE_SIZE;
> > +     execlists_init_reg_state(regs, ctx, engine, ring);
> > +     if (!engine->default_state) {
> > +             regs[CTX_CONTEXT_CONTROL+1] |=
> > +                     _MASKED_BIT_ENABLE(CTX_CTRL_ENGINE_CTX_RESTORE_INHIBIT);
> > +     }
> 
> We will get the default state we copy from now with restore inhibit set
> for all copied context. Where do we clear it?

It's one of those magic bits that only affect the next context-switch.
When the context is saved again, the bit it cleared, so the default
state we inherit doesn't have that bit set.
-Chris


More information about the Intel-gfx mailing list