Commit bf9eee24 authored by Christian König's avatar Christian König
Browse files

drm/ttm: stop using GFP_TRANSHUGE_LIGHT



The only flag we really need is __GFP_NOMEMALLOC, highmem depends on
dma32 and moveable/compound should never be set in the first place.

Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/413812/
Link: https://patchwork.freedesktop.org/patch/413964/


Fixes: d099fc8f ("drm/ttm: new TT backend allocation pool v3")
Reported-by: default avatarHans de Goede <hdegoede@redhat.com>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 19c329f6
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -79,12 +79,13 @@ static struct page *ttm_pool_alloc_page(struct ttm_pool *pool, gfp_t gfp_flags,
	struct page *p;
	void *vaddr;

	if (order) {
		gfp_flags |= GFP_TRANSHUGE_LIGHT | __GFP_NORETRY |
	/* Don't set the __GFP_COMP flag for higher order allocations.
	 * Mapping pages directly into an userspace process and calling
	 * put_page() on a TTM allocated page is illegal.
	 */
	if (order)
		gfp_flags |= __GFP_NOMEMALLOC | __GFP_NORETRY |
			__GFP_KSWAPD_RECLAIM;
		gfp_flags &= ~__GFP_MOVABLE;
		gfp_flags &= ~__GFP_COMP;
	}

	if (!pool->use_dma_alloc) {
		p = alloc_pages(gfp_flags, order);