Skip to content

Commit

Permalink
drm/i915: Account for space on the ring buffer consumed whilst wrapping.
Browse files Browse the repository at this point in the history
If we fill the tail of the physical ring buffer with NOOP when wrapping,
we need to account for the reduction in available space.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
  • Loading branch information
Chris Wilson authored and Eric Anholt committed Jul 1, 2010
1 parent 1afe3e9 commit 43ed340
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/i915/intel_ringbuffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,7 @@ int intel_wrap_ring_buffer(struct drm_device *dev,
*virt++ = MI_NOOP;

ring->tail = 0;
ring->space = ring->head - 8;

return 0;
}
Expand Down

0 comments on commit 43ed340

Please sign in to comment.