]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Repeat evictions whilst pageflip completions are outstanding
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 20 Jan 2014 10:17:37 +0000 (10:17 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 22 Jan 2014 09:34:41 +0000 (10:34 +0100)
commit65b05b507a929ab3c2c721da71ad91ee1c460649
tree0da3fc9fdfceb187bb116c9759fa4e28f19b841a
parent4cdb4891077df5918d471ed53dd232dae732fb34
drm/i915: Repeat evictions whilst pageflip completions are outstanding

Since an old pageflip will keep its scanout buffer object pinned until
it has executed its unpin task on the common workqueue, we can clog up
our GGTT with stale pinned objects. As we cannot flush those workqueues
without dropping our locks, we have to resort to falling back to
userspace and telling them to repeat the operation in order to have a
chance to run our workqueues and free up the required memory. If we
fail, then we are forced to report ENOSPC back to userspace causing the
operation to fail and best-case scenario is that it introduces temporary
corruption.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Jon Bloomfield <jon.bloomfield@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem_evict.c