]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit9ec7d6b6e8c06a5868851b46b7a67531fa79a47a
tree69dd90aad1c0809e902abd248e614170980a52ac
parent1f6dd9c7506bf9d1feddd8f24cadf5828fdeca9d
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