[Intel-gfx] [PATCH] drm/i915: Improve the comment on ring_sync after seqno wrap
Mika Kuoppala
mika.kuoppala at linux.intel.com
Fri Jan 31 12:04:21 CET 2014
There are quite alot of nasty things happening inside the
seemingly bening intel_ring_begin() if seqno wrap happens.
Warn the reader about it.
Signed-off-by: Mika Kuoppala <mika.kuoppala at intel.com>
---
drivers/gpu/drm/i915/intel_ringbuffer.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index d897a19..f99e2ae 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -727,7 +727,13 @@ gen6_ring_sync(struct intel_ring_buffer *waiter,
if (ret)
return ret;
- /* If seqno wrap happened, omit the wait with no-ops */
+ /* Seqno allocation is inside intel_ring_begin() so the seqno
+ * wrap (re init of driver seqno counter) might have happened.
+ * This means that the seqno we are syncing to, just became
+ * irrelevant in this brand new seqno universe. And as it does
+ * not exists anymore, waiting for it to happen is unwise.
+ * If this is the case, emit no-ops instead.
+ */
if (likely(!i915_gem_has_seqno_wrapped(waiter->dev, seqno))) {
intel_ring_emit(waiter,
dw1 |
--
1.7.9.5
More information about the Intel-gfx
mailing list