Quoting Chris Wilson (2017-07-03 09:58:51) > When doing a GPU reset, the CSB register will be trashed and we will > lose any context-switch notifications that happened since the tasklet > was disabled. If we find that all requests on this engine were > completed, we want to make sure that the ELSP tracker is similarly empty > so that we do not feed back in the completed requests upon recovering > from the reset. > > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> > Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx> > Cc: Mika Kuoppala <mika.kuoppala@xxxxxxxxxxxxxxx> > --- > drivers/gpu/drm/i915/intel_lrc.c | 28 ++++++++++++++++++---------- > 1 file changed, 18 insertions(+), 10 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c > index 699868d81de8..60d86f9492c3 100644 > --- a/drivers/gpu/drm/i915/intel_lrc.c > +++ b/drivers/gpu/drm/i915/intel_lrc.c > @@ -1306,6 +1306,23 @@ static void reset_common_ring(struct intel_engine_cs *engine, > { > struct execlist_port *port = engine->execlist_port; > struct intel_context *ce; > + unsigned int n; > + > + /* Catch up with any missed context-switch interrupts */ * Ideally we would just read the remaining CSB entries now that we know * the gpu is idle. However, the CSB registers are sometimes trashed * across a GPU reset! Instead we have to rely on guessing the missed * context-switch events by looking at what requests were completed. */ -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx