drm/i915: Try harder to allocate an mmap_offset
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 11 Aug 2012 14:41:03 +0000 (15:41 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 21 Aug 2012 12:34:36 +0000 (14:34 +0200)
commitd8cb5086695dcdd076e911fc298a5a6701497371
tree89be5fefdb195b4c3ff8878694fa2b6fe790470e
parentc110a6d728d0243a755973d34e363952b74af984
drm/i915: Try harder to allocate an mmap_offset

Given the persistence of an offset for the lifetime of an object, itis
easy to contemplate how the mmap space becomes badly fragmented to the
point that further allocations fail with ENOSPC. Our only recourse at
this point is to try to purge the objects to release some space and
reattempt the allocation.

References: https://bugs.freedesktop.org/show_bug.cgi?id=39552
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem.c