diff options
author | Mika Kuoppala <mika.kuoppala@linux.intel.com> | 2012-12-19 04:13:07 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-12-19 05:17:41 -0500 |
commit | ba1a7067c00f4cbdd99b00a570ff072639ae59f2 (patch) | |
tree | 2e56adfd55d938f53b8e70c9d896d4435c158a34 /drivers/gpu/drm/i915/i915_gem.c | |
parent | f7e98ad4d4a8afa043126a6f24d0a154a684e081 (diff) |
drm/i915: Always clear semaphore mboxes on seqno wrap
In preparation for setting the seqno to arbitrary value on init or
through debugfs. We need to always clear the semaphores and set the
hws page seqno index by calling intel_ring_init_seqno().
v2: rewrote the commit message as suggested by Chris Wilson.
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
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.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 51282b2c4943..bb38bca02559 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) | |||
1932 | struct intel_ring_buffer *ring; | 1932 | struct intel_ring_buffer *ring; |
1933 | int ret, i, j; | 1933 | int ret, i, j; |
1934 | 1934 | ||
1935 | /* The hardware uses various monotonic 32-bit counters, if we | ||
1936 | * detect that they will wraparound we need to idle the GPU | ||
1937 | * and reset those counters. | ||
1938 | */ | ||
1939 | ret = 0; | ||
1940 | for_each_ring(ring, dev_priv, i) { | ||
1941 | for (j = 0; j < ARRAY_SIZE(ring->sync_seqno); j++) | ||
1942 | ret |= ring->sync_seqno[j] != 0; | ||
1943 | } | ||
1944 | if (ret == 0) | ||
1945 | return ret; | ||
1946 | |||
1947 | /* Carefully retire all requests without writing to the rings */ | 1935 | /* Carefully retire all requests without writing to the rings */ |
1948 | for_each_ring(ring, dev_priv, i) { | 1936 | for_each_ring(ring, dev_priv, i) { |
1949 | ret = intel_ring_idle(ring); | 1937 | ret = intel_ring_idle(ring); |