diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-01-21 05:07:18 -0500 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-01-23 07:52:11 -0500 |
commit | 076e2c0eb83f1a0e2e7d0ae1e4d4c0f7b13f1f64 (patch) | |
tree | 8400486c1b98ef0cd0f960666c0e5b9beec81bab /drivers/gpu/drm/i915/i915_gem.c | |
parent | c7dca47bd6fbb7c215cb1ce6bc40398b4b017752 (diff) |
drm/i915: Fix use of invalid array size for ring->sync_seqno
There are I915_NUM_RINGS-1 inter-ring synchronisation counters, but we
were clearing I915_NUM_RINGS of them. Oops.
Reported-by: Jiri Slaby <jirislaby@gmail.com>
Tested-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 3dfc848ff755..812b97b47469 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -1857,7 +1857,7 @@ i915_gem_retire_requests_ring(struct drm_device *dev, | |||
1857 | 1857 | ||
1858 | seqno = ring->get_seqno(ring); | 1858 | seqno = ring->get_seqno(ring); |
1859 | 1859 | ||
1860 | for (i = 0; i < I915_NUM_RINGS; i++) | 1860 | for (i = 0; i < ARRAY_SIZE(ring->sync_seqno); i++) |
1861 | if (seqno >= ring->sync_seqno[i]) | 1861 | if (seqno >= ring->sync_seqno[i]) |
1862 | ring->sync_seqno[i] = 0; | 1862 | ring->sync_seqno[i] = 0; |
1863 | 1863 | ||