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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx>
---
 drivers/gpu/drm/i915/gt/intel_lrc.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

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);
-- 
2.24.0.rc1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux