summaryrefslogtreecommitdiff
path: root/linux-core/drm_vm.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2007-03-29 21:33:41 +0200
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2007-04-03 10:29:14 +0200
commit72d457fc1973a61f906a42d049c1c160cc7dee4e (patch)
tree862a17949d0e7108bfd34e65fcc2ee69a2ba5fda /linux-core/drm_vm.c
parent5395a92d40337aa3de424f87fb38cb5a0ca45bcf (diff)
Make sure CMA (Can't map aperture) pages are mapped uncached.
(Should really make this write-combined using PATs, at some point).
Diffstat (limited to 'linux-core/drm_vm.c')
-rw-r--r--linux-core/drm_vm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/linux-core/drm_vm.c b/linux-core/drm_vm.c
index 54a0849f..1f905fba 100644
--- a/linux-core/drm_vm.c
+++ b/linux-core/drm_vm.c
@@ -796,7 +796,9 @@ static unsigned long drm_bo_vm_nopfn(struct vm_area_struct *vma,
goto out_unlock;
}
pfn = page_to_pfn(page);
- vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
+ vma->vm_page_prot = (bo->mem.flags & DRM_BO_FLAG_CACHED) ?
+ vm_get_page_prot(vma->vm_flags) :
+ drm_io_prot(_DRM_TTM, vma);
}
err = vm_insert_pfn(vma, address, pfn);