summaryrefslogtreecommitdiff
path: root/linux-core/drm_compat.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2006-12-27 15:32:09 +0100
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2006-12-27 15:32:09 +0100
commit975136d6e5adc6b6a03719499cf39fbd3f67dc90 (patch)
tree86767019ee5da639391837d2a570e9a5e4fa3c41 /linux-core/drm_compat.c
parentc38ede06670b47620bbce33c5a4affd063769475 (diff)
Proper allocation of AGP pages for ttms.
Diffstat (limited to 'linux-core/drm_compat.c')
-rw-r--r--linux-core/drm_compat.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/linux-core/drm_compat.c b/linux-core/drm_compat.c
index cde77ea7..6bb58424 100644
--- a/linux-core/drm_compat.c
+++ b/linux-core/drm_compat.c
@@ -251,7 +251,8 @@ struct page *drm_vm_ttm_nopage(struct vm_area_struct *vma,
page = NOPAGE_OOM;
goto out;
}
- page = ttm->pages[page_offset] = drm_alloc_gatt_pages(0);
+ page = ttm->pages[page_offset] =
+ alloc_page(GFP_KERNEL | __GFP_ZERO | GFP_DMA32);
if (!page) {
drm_free_memctl(PAGE_SIZE);
page = NOPAGE_OOM;
@@ -259,8 +260,6 @@ struct page *drm_vm_ttm_nopage(struct vm_area_struct *vma,
}
++bm->cur_pages;
SetPageLocked(page);
- clear_page(kmap(page));
- kunmap(page);
}
get_page(page);