drm/i915: Add intel_ring_handle_seqno wrap
authorMika Kuoppala <mika.kuoppala@linux.intel.com>
Tue, 4 Dec 2012 13:12:04 +0000 (15:12 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 6 Dec 2012 12:14:34 +0000 (13:14 +0100)
commit498d2ac15ce0fc08edb005a7faf9ed6b5aa028d8
tree64128e5fd2809354ab5ca8bfb8080f0d63f4095f
parentcbcc80dff3896015385c67d6be0beb3399999e5c
drm/i915: Add intel_ring_handle_seqno wrap

If there are pre-wrap values in semaphore-mbox registers after wrap,
syncing against some after-wrap request will complete immediately.
Fix this by emitting ring commands to set mbox registers to zero
when the wrap happens.

v2: Use __intel_ring_begin to emit ring commands, from
Chris Wilson.

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
[danvet: Add a small comment to handle_seqno_wrap.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/intel_ringbuffer.c
drivers/gpu/drm/i915/intel_ringbuffer.h