]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Move ringbuffer accounting to begin/advance.
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 4 Aug 2010 14:18:13 +0000 (15:18 +0100)
committerEric Anholt <eric@anholt.net>
Mon, 9 Aug 2010 18:24:31 +0000 (11:24 -0700)
commit63fc570056c849525119e1d7b0cd9262d91e4064
tree831529a147ec7cd85ae080e415a84b351af574fe
parenta375633d7c4fb6ecc215e6de0073408cf1806a71
drm/i915: Move ringbuffer accounting to begin/advance.

As we check that the ringbuffer will not wrap upon emission, we do not
need to check that incrementing the tail wrapped every time. However, we
do upon advancing just in case the tail is now pointing at the very end
of the ring.

Likewise we can account for the space used during emission in begin()
and avoid decrementing it for every emit.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/i915/intel_ringbuffer.c