]> Pileus Git - ~andy/linux/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)
commit74e21ac2ccdc5e8f310d536ffe66d22571ece5c5
tree0da3fc9fdfceb187bb116c9759fa4e28f19b841a
parent5dce5b9387a06eb9301fa1cede07922a5a4d7a29
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