drm/i915: Flush read-only buffers from the active list upon idle as well
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 28 Oct 2010 20:28:46 +0000 (21:28 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 28 Oct 2010 20:31:19 +0000 (21:31 +0100)
commit395b70be54bed5fdf6c4173c78e8a49f960f241d
treeb9ba0a69fdacb2808d093a436a53ceab51619c5a
parent8f28f54aad8bcf52a47afb6447fac34f96597b6f
drm/i915: Flush read-only buffers from the active list upon idle as well

It is possible for the active list to only contain a read-only buffer so
that the ring->gpu_write_list remains entry. This leads to an
inconsistency between i915_gpu_is_active() and i915_gpu_idle() causing
an infinite spin during the shrinker and an assertion failure that
i915_gpu_idle() does indeed flush all buffers from the active lists.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_evict.c