summaryrefslogtreecommitdiff
path: root/linux-core/drm_compat.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2008-05-07 15:10:23 +1000
committerDave Airlie <airlied@linux.ie>2008-05-07 15:10:23 +1000
commitb44f2da380e78769b58c751e81f376f0fa1f48aa (patch)
tree570d5357a572641bed27d3527d3b21db90bdfe95 /linux-core/drm_compat.h
parentd015219bd0b25f367be23e5df8355f479ee53a0f (diff)
drm: nopage compat fixup for drm_vm
The kernel has removed nopage so move the old nopage codepaths into a compat vm file and switch to using the fault paths. nopfn is on its way out in the future also, so we should switch to using fault for that path as well soon
Diffstat (limited to 'linux-core/drm_compat.h')
-rw-r--r--linux-core/drm_compat.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/linux-core/drm_compat.h b/linux-core/drm_compat.h
index 3b1287e1..30834f33 100644
--- a/linux-core/drm_compat.h
+++ b/linux-core/drm_compat.h
@@ -343,4 +343,23 @@ extern void *kmap_atomic_prot_pfn(unsigned long pfn, enum km_type type,
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : (1ULL<<(n)) - 1)
#endif
+#ifndef VM_CAN_NONLINEAR
+#define DRM_VM_NOPAGE 1
+#endif
+
+#ifdef DRM_VM_NOPAGE
+
+extern struct page *drm_vm_nopage(struct vm_area_struct *vma,
+ unsigned long address, int *type);
+
+extern struct page *drm_vm_shm_nopage(struct vm_area_struct *vma,
+ unsigned long address, int *type);
+
+extern struct page *drm_vm_dma_nopage(struct vm_area_struct *vma,
+ unsigned long address, int *type);
+
+extern struct page *drm_vm_sg_nopage(struct vm_area_struct *vma,
+ unsigned long address, int *type);
+#endif
+
#endif