Quoting Oscar Mateo (2018-02-15 22:46:42) > 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). I think we need to guarantee that that's no possible sleep between context init and template save (that should be the case as we scrub rc6 during early load and should be holding forcewake for the entire duration). So I think we should mention the danger of losing the context-saved registers if we are not careful, and add assert_forcewakes_active(); with a similar statement inside __intel_engine_record_defaults(). With that explained and annotated, Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> and then we'll apply this after the dust from the first 2 settles. -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx