drm/ttm: replace drm_mm_pre_get() by direct alloc
authorDavid Herrmann <dh.herrmann@gmail.com>
Sat, 27 Jul 2013 11:37:59 +0000 (13:37 +0200)
committerDave Airlie <airlied@redhat.com>
Wed, 7 Aug 2013 00:15:29 +0000 (10:15 +1000)
commit78af329a85bee7dd4671c67abfecde37b0057b10
tree69dd90aad1c0809e902abd248e614170980a52ac
parent28ec711cd427f8b61f73712a43b8100ba8ca933b
drm/ttm: replace drm_mm_pre_get() by direct alloc

Instead of calling drm_mm_pre_get() in a row, we now preallocate the node
and then use the atomic insertion functions. This has the exact same
semantics and there is no reason to use the racy pre-allocations.

Note that ttm_bo_man_get_node() does not run in atomic context. Nouveau
already uses GFP_KERNEL alloc in nouveau/nouveau_ttm.c in
nouveau_gart_manager_new(). So we can do the same in
ttm_bo_man_get_node().

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/ttm/ttm_bo_manager.c