[PATCH 2/2] bug?

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Wed Aug 25 09:55:56 UTC 2021


From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
---
 drivers/gpu/drm/i915/gt/intel_ring_submission.c | 12 ++++--------
 drivers/gpu/drm/i915/i915_request.c             |  3 ++-
 2 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_ring_submission.c b/drivers/gpu/drm/i915/gt/intel_ring_submission.c
index 2822b086cdf6..2c5cf59365ac 100644
--- a/drivers/gpu/drm/i915/gt/intel_ring_submission.c
+++ b/drivers/gpu/drm/i915/gt/intel_ring_submission.c
@@ -591,19 +591,15 @@ static void ring_context_revoke(struct intel_context *ce,
 				struct i915_request *rq,
 				unsigned int preempt_timeout_ms)
 {
-	struct intel_engine_cs *engine;
+	list_for_each_entry_from_rcu(rq, &ce->timeline->requests, link) {
+		if (!i915_request_is_active(rq))
+			return;
 
-	if (!rq || !i915_request_is_active(rq))
-		return;
-
-	engine = rq->engine;
-	lockdep_assert_held(&engine->sched_engine->lock);
-	list_for_each_entry_continue(rq, &engine->sched_engine->requests,
-				     sched.link)
 		if (rq->context == ce) {
 			i915_request_set_error_once(rq, -EIO);
 			__i915_request_skip(rq);
 		}
+	}
 }
 
 static void ring_context_cancel_request(struct intel_context *ce,
diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c
index b1a9bec83339..cb37ac16cb95 100644
--- a/drivers/gpu/drm/i915/i915_request.c
+++ b/drivers/gpu/drm/i915/i915_request.c
@@ -2019,12 +2019,13 @@ void i915_request_show(struct drm_printer *m,
 
 	x = print_sched_attr(&rq->sched.attr, buf, x, sizeof(buf));
 
-	drm_printf(m, "%s%.*s%c %llx:%lld%s%s %s @ %dms: %s\n",
+	drm_printf(m, "%s%.*s%c %llx:%lld%s%s (%d) %s @ %dms: %s\n",
 		   prefix, indent, "                ",
 		   queue_status(rq),
 		   rq->fence.context, rq->fence.seqno,
 		   run_status(rq),
 		   fence_status(rq),
+		   READ_ONCE(rq->fence.error),
 		   buf,
 		   jiffies_to_msecs(jiffies - rq->emitted_jiffies),
 		   name);
-- 
2.30.2



More information about the Intel-gfx-trybot mailing list