drm/i915/ringbuffer: Handle wrapping of the autoreported HEAD
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 9 Dec 2010 12:56:37 +0000 (12:56 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 9 Dec 2010 12:53:19 +0000 (12:53 +0000)
commit8c0a6bfef165ccdbf5d73afb9dd660107b0c98d5
tree09455156e4e46ac5137ddab9ec3aed65bc6a8c59
parent8316f33766a82907c694267ff911e45e256f09f9
drm/i915/ringbuffer: Handle wrapping of the autoreported HEAD

If the tail advances beyond the autoreport HEAD value, then we need to
fallback to an uncached read of the HEAD register in order to ascertain
the correct amount of remaining space in the ringbuffer.

Reported-by: Fang, Xun <xunx.fang@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32259
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/intel_ringbuffer.c
drivers/gpu/drm/i915/intel_ringbuffer.h