drm/i915: Preallocate the drm_mm_node prior to manipulating the GTT drm_mm manager
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 7 Dec 2012 20:37:07 +0000 (20:37 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 18 Dec 2012 21:02:29 +0000 (22:02 +0100)
As we may reap neighbouring objects in order to free up pages for
allocations, we need to be careful not to allocate in the middle of the
drm_mm manager. To accomplish this, we can simply allocate the
drm_mm_node up front and then use the combined search & insert
drm_mm routines, reducing our code footprint in the process.

Fixes (partially) i-g-t/gem_tiled_swapping

Reported-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
[danvet: Again fixup atomic bikeshed.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

No differences found