diff mbox series

drm/i915/execlists: Skip over foreign requests on the context timeline

Message ID 20191026103012.18838-1-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show
Series drm/i915/execlists: Skip over foreign requests on the context timeline | expand

Commit Message

Chris Wilson Oct. 26, 2019, 10:30 a.m. UTC
When searching for the last active request on our timeline, we only care
about the requests matching the current context. (The context's timeline
may have barrier entries from the kernel_context for example.) Just skip
these foreign requests so we replay our own ring.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/gt/intel_lrc.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
index 16340740139d..9978375db976 100644
--- a/drivers/gpu/drm/i915/gt/intel_lrc.c
+++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
@@ -265,8 +265,9 @@  static struct i915_request *active_request(struct i915_request *rq)
 		if (i915_request_completed(rq))
 			break;
 
+		/* Ignore foreign requests when rewinding this context */
 		if (rq->hw_context != ce)
-			break;
+			continue;
 
 		active = rq;
 	}
@@ -3043,7 +3044,7 @@  static void __execlists_reset(struct intel_engine_cs *engine, bool stalled)
 	restore_default_state(ce, engine);
 
 out_replay:
-	GEM_TRACE("%s replay {head:%04x, tail:%04x\n",
+	GEM_TRACE("%s replay {head:%04x, tail:%04x}\n",
 		  engine->name, ce->ring->head, ce->ring->tail);
 	intel_ring_update_space(ce->ring);
 	__execlists_reset_reg_state(ce, engine);