[Intel-gfx] [PATCH] drm/i915: Apply context workarounds directly

Chris Wilson chris at chris-wilson.co.uk
Tue Jun 19 15:06:55 UTC 2018


Quoting Joonas Lahtinen (2018-06-18 13:25:16)
> Quoting Chris Wilson (2018-06-15 19:37:33)
> > From: Oscar Mateo <oscar.mateo at intel.com>
> > 
> > Once upon a time, we tried to apply workarounds for registers that lived
> > inside the context image for every new context. That meant emitting LRI
> > commands soon after each context was created.
> > 
> > Nowadays, we have a single golden context that gets used as a master
> > template for future contexts. That golden context will acquire initial
> > values for its image from the existing values in HW (thanks to inhibit
> > restore bit). If all WAs are applied normally (i.e. using MMIO writes)
> > before that happens, they will get soaked up by the golden context and
> > transmitted correctly to new contexts.
> > 
> > All of this means we don't have to distinguish between context and
> > non-context WAs anymore, because both can be applied in the same way
> > (we still want to distinguish them though, because we would like to
> > check their validity using i-g-t, and that means making sure we have
> > a context loaded for ctx-residing WAs).
> > 
> > Signed-off-by: Oscar Mateo <oscar.mateo at intel.com>
> > Cc: Chris Wilson <chris at chris-wilson.co.uk>
> > Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> > Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> Reviewed-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>

I can't decide if we want to follow through on this or not. On the one
hand, direct mmio writes is simpler, but on the other hand LRI run
inside the target context and so much easier to reason will be saved as
part of that context.

Ville mentioned that Mika might have some evidence to show that we
cannot always predict when the power context is loaded that would
invalidate our assumptions that the direct writes will be saved (and not
overridden by a later load of the power context).

Oscar, if you can think of a way to confirm that the mmio writes will be
saved that would be useful. Otherwise, I'll wait until Mika returns and
we can probe his memory as to what he was doing to throw doubt on
forcewake-vs-powercontext.
-Chris


More information about the Intel-gfx mailing list