summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/i915_gem.c
diff options
context:
space:
mode:
authorMika Kuoppala <mika.kuoppala@linux.intel.com>2012-12-04 17:12:04 +0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-12-06 16:14:34 +0400
commit498d2ac15ce0fc08edb005a7faf9ed6b5aa028d8 (patch)
tree64128e5fd2809354ab5ca8bfb8080f0d63f4095f /drivers/gpu/drm/i915/i915_gem.c
parentcbcc80dff3896015385c67d6be0beb3399999e5c (diff)
downloadlinux-498d2ac15ce0fc08edb005a7faf9ed6b5aa028d8.tar.xz
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>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index cb941448c2bc..02d315164aa9 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1952,6 +1952,10 @@ i915_gem_handle_seqno_wrap(struct drm_device *dev)
i915_gem_retire_requests(dev);
for_each_ring(ring, dev_priv, i) {
+ ret = intel_ring_handle_seqno_wrap(ring);
+ if (ret)
+ return ret;
+
for (j = 0; j < ARRAY_SIZE(ring->sync_seqno); j++)
ring->sync_seqno[j] = 0;
}