[Intel-gfx] [PATCH] drm/i915/execlists: Verify we don't submit two identical tags
Chris Wilson
chris at chris-wilson.co.uk
Mon Apr 27 17:03:25 UTC 2020
Check that we do not submit two contexts into ELSP with the same tag
[upper portion of the descriptor].
References: https://gitlab.freedesktop.org/drm/intel/-/issues/1793
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
drivers/gpu/drm/i915/gt/intel_lrc.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
index d68a04f2a9d5..7226b6c915ec 100644
--- a/drivers/gpu/drm/i915/gt/intel_lrc.c
+++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
@@ -1621,6 +1621,7 @@ assert_pending_valid(const struct intel_engine_execlists *execlists,
struct i915_request * const *port, *rq;
struct intel_context *ce = NULL;
bool sentinel = false;
+ u32 tag = -1;
trace_ports(execlists, msg, execlists->pending);
@@ -1654,6 +1655,14 @@ assert_pending_valid(const struct intel_engine_execlists *execlists,
}
ce = rq->context;
+ if (tag == upper_32_bits(ce->lrc_desc)) {
+ GEM_TRACE_ERR("Dup tag:%x context:%llx in pending[%zd]\n",
+ tag, ce->timeline->fence_context,
+ port - execlists->pending);
+ return false;
+ }
+ tag = upper_32_bits(ce->lrc_desc);
+
/*
* Sentinels are supposed to be lonely so they flush the
* current exection off the HW. Check that they are the
--
2.20.1
More information about the Intel-gfx
mailing list