summaryrefslogtreecommitdiff
path: root/linux-core/drm_compat.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@nx6125b.(none)>2007-06-05 10:09:11 +1000
committerDave Airlie <airlied@nx6125b.(none)>2007-06-05 10:09:11 +1000
commit07345af838a7443d29d12cb3fe91614e43c4fa81 (patch)
tree9a16e9ea79c70c6aea65ac11e395dfbf83459453 /linux-core/drm_compat.c
parent704ca0638977f58742a8bff6aba9905fe862cfb3 (diff)
parent4327d7f3142cdbf3f3f94426ae33e2d30b5a40c8 (diff)
Merge branch 'origin' into radeon-ttm
Conflicts: shared-core/radeon_drv.h
Diffstat (limited to 'linux-core/drm_compat.c')
-rw-r--r--linux-core/drm_compat.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/linux-core/drm_compat.c b/linux-core/drm_compat.c
index 23441811..9ac5658c 100644
--- a/linux-core/drm_compat.c
+++ b/linux-core/drm_compat.c
@@ -275,12 +275,14 @@ static struct page *drm_bo_vm_fault(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);
- if (!err || err == -EBUSY)
+ if (!err || err == -EBUSY)
data->type = VM_FAULT_MINOR;
else
data->type = VM_FAULT_OOM;