drm/i915: Improve the comment on ring_sync after seqno wrap
Subsystems (2)
PATCH 1/1 drm/i915: Improve the comment on ring_sync after seqno wrap
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 <[email protected]>
--- drivers/gpu/drm/i915/intel_ringbuffer.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_ringbuffer.c +7 -1
@@ -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 |
Signature · 1 line
1.7.9.5
Quoted 14 lines · Mika Kuoppala
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 <[email protected]>--- drivers/gpu/drm/i915/intel_ringbuffer.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_ringbuffer.c +0
-0
drivers/gpu/drm/i915/intel_ringbuffer.c gen6_ring_sync(struct intel_ring_buffer *waiter, · line 730
Quoted 4 lines
drivers/gpu/drm/i915/intel_ringbuffer.c +0
-1@@ -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 */
/* If the seqno have wrapped and so reset, omit the wait with no-ops. */ -Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre