summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/ttm/ttm_tt.c
diff options
context:
space:
mode:
authorDave Airlie2009-07-10 14:36:26 +0200
committerDave Airlie2009-07-15 09:13:18 +0200
commitad49f501867cba87e1e45e5ebae0b12435d68bf1 (patch)
tree4602e5caf96451b1dcdda7a38628d494466d2e20 /drivers/gpu/drm/ttm/ttm_tt.c
parentdrm/radeon: Endianness fixes for radeondrmfb. (diff)
downloadkernel-qcow2-linux-ad49f501867cba87e1e45e5ebae0b12435d68bf1.tar.gz
kernel-qcow2-linux-ad49f501867cba87e1e45e5ebae0b12435d68bf1.tar.xz
kernel-qcow2-linux-ad49f501867cba87e1e45e5ebae0b12435d68bf1.zip
drm/ttm/radeon: add dma32 support.
This add support for using dma32 memory on gpus that really need it. Currently IGPs are left without DMA32 but we might need to change that unless we can fix rs690. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_tt.c')
-rw-r--r--drivers/gpu/drm/ttm/ttm_tt.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
index 75dc8bd24592..81ab81f030a3 100644
--- a/drivers/gpu/drm/ttm/ttm_tt.c
+++ b/drivers/gpu/drm/ttm/ttm_tt.c
@@ -131,10 +131,15 @@ static void ttm_tt_free_page_directory(struct ttm_tt *ttm)
static struct page *ttm_tt_alloc_page(unsigned page_flags)
{
+ gfp_t gfp_flags = GFP_HIGHUSER;
+
if (page_flags & TTM_PAGE_FLAG_ZERO_ALLOC)
- return alloc_page(GFP_HIGHUSER | __GFP_ZERO);
+ gfp_flags |= __GFP_ZERO;
+
+ if (page_flags & TTM_PAGE_FLAG_DMA32)
+ gfp_flags |= __GFP_DMA32;
- return alloc_page(GFP_HIGHUSER);
+ return alloc_page(gfp_flags);
}
static void ttm_tt_free_user_pages(struct ttm_tt *ttm)