From f1185667e3982372230b3573c72cd49105b0b9b9 Mon Sep 17 00:00:00 2001 From: Mika Kuoppala Date: Thu, 13 Dec 2012 21:39:42 +0200 Subject: [PATCH 2/4] drm/i915: Always clear semaphore mboxes on seqno wrap We need to clear the hw semaphore values explicitly. Even if sync_seqnos are zero, there might still be invalid values in the hw semaphores when we wrap. Signed-off-by: Mika Kuoppala --- drivers/gpu/drm/i915/i915_gem.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 8dc5cc1..0231fdb 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -1932,18 +1932,6 @@ i915_gem_handle_seqno_wrap(struct drm_device *dev) struct intel_ring_buffer *ring; int ret, i, j; - /* The hardware uses various monotonic 32-bit counters, if we - * detect that they will wraparound we need to idle the GPU - * and reset those counters. - */ - ret = 0; - for_each_ring(ring, dev_priv, i) { - for (j = 0; j < ARRAY_SIZE(ring->sync_seqno); j++) - ret |= ring->sync_seqno[j] != 0; - } - if (ret == 0) - return ret; - /* Carefully retire all requests without writing to the rings */ for_each_ring(ring, dev_priv, i) { ret = intel_ring_idle(ring); -- 1.7.9.5