All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH 01/54] drm/i915/gt: Cancel submitted requests upon context reset
@ 2020-12-28 15:51 Chris Wilson
  2020-12-28 15:51 ` [Intel-gfx] [PATCH 02/54] drm/i915/gt: Pull context closure check from request submit to schedule-in Chris Wilson
                   ` (55 more replies)
  0 siblings, 56 replies; 61+ messages in thread
From: Chris Wilson @ 2020-12-28 15:51 UTC (permalink / raw)
  To: intel-gfx; +Cc: Chris Wilson

Since we process schedule-in of a context after submitting the request,
if we decide to reset the context at that time, we also have to cancel
the requets we have marked for submission.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 .../drm/i915/gt/intel_execlists_submission.c  | 22 ++++++++++++++-----
 drivers/gpu/drm/i915/i915_request.c           |  2 ++
 2 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
index 1fae6c6f3868..eb2c086dbce6 100644
--- a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
+++ b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
@@ -215,22 +215,32 @@ static void mark_eio(struct i915_request *rq)
 }
 
 static struct i915_request *
-active_request(const struct intel_timeline * const tl, struct i915_request *rq)
+__active_request(const struct intel_timeline * const tl,
+		 struct i915_request *rq,
+		 int error)
 {
 	struct i915_request *active = rq;
 
-	rcu_read_lock();
-	list_for_each_entry_continue_reverse(rq, &tl->requests, link) {
+	list_for_each_entry_from_reverse(rq, &tl->requests, link) {
 		if (__i915_request_is_complete(rq))
 			break;
 
+		if (error) {
+			i915_request_set_error_once(rq, error);
+			__i915_request_skip(rq);
+		}
 		active = rq;
 	}
-	rcu_read_unlock();
 
 	return active;
 }
 
+static struct i915_request *
+active_request(const struct intel_timeline * const tl, struct i915_request *rq)
+{
+	return __active_request(tl, rq, 0);
+}
+
 static inline void
 ring_set_paused(const struct intel_engine_cs *engine, int state)
 {
@@ -487,14 +497,14 @@ static void reset_active(struct i915_request *rq,
 	 * remain correctly ordered. And we defer to __i915_request_submit()
 	 * so that all asynchronous waits are correctly handled.
 	 */
-	ENGINE_TRACE(engine, "{ rq=%llx:%lld }\n",
+	ENGINE_TRACE(engine, "{ reset rq=%llx:%lld }\n",
 		     rq->fence.context, rq->fence.seqno);
 
 	/* On resubmission of the active request, payload will be scrubbed */
 	if (__i915_request_is_complete(rq))
 		head = rq->tail;
 	else
-		head = active_request(ce->timeline, rq)->head;
+		head = __active_request(ce->timeline, rq, -EIO)->head;
 	head = intel_ring_wrap(ce->ring, head);
 
 	/* Scrub the context image to prevent replaying the previous batch */
diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c
index de434697dccd..03ac6eead4db 100644
--- a/drivers/gpu/drm/i915/i915_request.c
+++ b/drivers/gpu/drm/i915/i915_request.c
@@ -490,6 +490,8 @@ void __i915_request_skip(struct i915_request *rq)
 	if (rq->infix == rq->postfix)
 		return;
 
+	RQ_TRACE(rq, "error: %d\n", rq->fence.error);
+
 	/*
 	 * As this request likely depends on state from the lost
 	 * context, clear out all the user operations leaving the
-- 
2.20.1

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

^ permalink raw reply related	[flat|nested] 61+ messages in thread

end of thread, other threads:[~2020-12-30 14:24 UTC | newest]

Thread overview: 61+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-28 15:51 [Intel-gfx] [PATCH 01/54] drm/i915/gt: Cancel submitted requests upon context reset Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 02/54] drm/i915/gt: Pull context closure check from request submit to schedule-in Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 03/54] drm/i915/gem: Peek at the inflight context Chris Wilson
2020-12-29 12:18   ` Andi Shyti
2020-12-28 15:51 ` [Intel-gfx] [PATCH 04/54] drm/i915: Mark up protected uses of 'i915_request_completed' Chris Wilson
2020-12-29 12:17   ` Andi Shyti
2020-12-29 12:23     ` Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 05/54] drm/i915: Drop i915_request.lock serialisation around await_start Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 06/54] drm/i915: Drop i915_request.lock requirement for intel_rps_boost() Chris Wilson
2020-12-30 14:22   ` Mika Kuoppala
2020-12-28 15:51 ` [Intel-gfx] [PATCH 07/54] drm/i915/gem: Reduce ctx->engine_mutex for reading the clone source Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 08/54] drm/i915/gem: Reduce ctx->engines_mutex for get_engines() Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 09/54] drm/i915: Reduce test_and_set_bit to set_bit in i915_request_submit() Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 10/54] drm/i915/gt: Drop atomic for engine->fw_active tracking Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 11/54] drm/i915/gt: Extract busy-stats for ring-scheduler Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 12/54] drm/i915/gt: Convert stats.active to plain unsigned int Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 13/54] drm/i915/gt: Do not suspend bonded requests if one hangs Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 14/54] drm/i915/gt: Remove timeslice suppression Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 15/54] drm/i915/gt: Skip over completed active execlists, again Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 16/54] drm/i915: Strip out internal priorities Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 17/54] drm/i915: Remove I915_USER_PRIORITY_SHIFT Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 18/54] drm/i915: Replace engine->schedule() with a known request operation Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 19/54] drm/i915: Teach the i915_dependency to use a double-lock Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 20/54] drm/i915: Restructure priority inheritance Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 21/54] drm/i915/selftests: Measure set-priority duration Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 22/54] drm/i915/selftests: Exercise priority inheritance around an engine loop Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 23/54] drm/i915: Improve DFS for priority inheritance Chris Wilson
2020-12-28 15:51 ` [Intel-gfx] [PATCH 24/54] drm/i915: Extract request submission from execlists Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 25/54] drm/i915: Extract request rewinding " Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 26/54] drm/i915: Extract request suspension from the execlists backend Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 27/54] drm/i915: Extract the ability to defer and rerun a request later Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 28/54] drm/i915: Fix the iterative dfs for defering requests Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 29/54] drm/i915: Move common active lists from engine to i915_scheduler Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 30/54] drm/i915: Move scheduler queue Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 31/54] drm/i915: Move tasklet from execlists to sched Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 32/54] drm/i915: Replace priolist rbtree with a skiplist Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 33/54] drm/i915: Wrap cmpxchg64 with try_cmpxchg64() helper Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 34/54] drm/i915: Fair low-latency scheduling Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 35/54] drm/i915/gt: Specify a deadline for the heartbeat Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 36/54] drm/i915: Extend the priority boosting for the display with a deadline Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 37/54] drm/i915/gt: Support virtual engine queues Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 38/54] drm/i915: Move saturated workload detection back to the context Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 39/54] drm/i915: Bump default timeslicing quantum to 5ms Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 40/54] drm/i915/gt: Wrap intel_timeline.has_initial_breadcrumb Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 41/54] drm/i915/gt: Track timeline GGTT offset separately from subpage offset Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 42/54] drm/i915/gt: Add timeline "mode" Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 43/54] drm/i915/gt: Use indices for writing into relative timelines Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 44/54] drm/i915/selftests: Exercise relative timeline modes Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 45/54] drm/i915/gt: Use ppHWSP for unshared non-semaphore related timelines Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 46/54] Restore "drm/i915: drop engine_pin/unpin_breadcrumbs_irq" Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 47/54] drm/i915/gt: Couple tasklet scheduling for all CS interrupts Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 48/54] drm/i915/gt: Support creation of 'internal' rings Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 49/54] drm/i915/gt: Use client timeline address for seqno writes Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 50/54] drm/i915/gt: Infrastructure for ring scheduling Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 51/54] drm/i915/gt: Enable busy-stats for ring-scheduler Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 52/54] drm/i915/gt: Implement ring scheduler for gen6/7 Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 53/54] drm/i915/gt: Enable ring scheduling " Chris Wilson
2020-12-28 15:52 ` [Intel-gfx] [PATCH 54/54] drm/i915/gt: Limit C-states while waiting for requests Chris Wilson
2020-12-29  9:39 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/54] drm/i915/gt: Cancel submitted requests upon context reset Patchwork
2020-12-29  9:41 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2020-12-29 10:27 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.