summaryrefslogtreecommitdiff
path: root/linux-core/drmP.h
diff options
context:
space:
mode:
authorMichel Daenzer <michel@daenzer.net>2004-01-11 00:14:28 +0000
committerMichel Daenzer <michel@daenzer.net>2004-01-11 00:14:28 +0000
commit2b9c12ef83b8de5acba782918212f7fa250c9e45 (patch)
tree9621363bdb8edb5f79c2210fb179351962de158e /linux-core/drmP.h
parent0dea4de28873252221d40e3597997f6d0141171d (diff)
Adapt to nopage() prototype change in Linux 2.6.1.
Reviewed by: Arjan van de Ven <arjanv@redhat.com>, additional feedback from William Lee Irwin III and Linus Torvalds.
Diffstat (limited to 'linux-core/drmP.h')
-rw-r--r--linux-core/drmP.h29
1 files changed, 17 insertions, 12 deletions
diff --git a/linux-core/drmP.h b/linux-core/drmP.h
index 1fe9c72c..b7b346d4 100644
--- a/linux-core/drmP.h
+++ b/linux-core/drmP.h
@@ -309,6 +309,19 @@ static inline struct page * vmalloc_to_page(void * vmalloc_addr)
DRM(ioremapfree)( (map)->handle, (map)->size, (dev) ); \
} while (0)
+#ifndef VMAP_4_ARGS
+
+#define DRM_IOREMAPAGP(map, dev) \
+ (map)->handle = DRM(ioremap_agp)( (map)->offset, (map)->size, (dev) )
+
+#define DRM_IOREMAPAGPFREE(map) \
+ do { \
+ if ( (map)->handle && (map)->size ) \
+ DRM(ioremap_agp_free)( (map)->handle, (map)->size ); \
+ } while (0)
+
+#endif
+
/**
* Find mapping.
*
@@ -806,18 +819,6 @@ extern int DRM(flush)(struct file *filp);
extern int DRM(fasync)(int fd, struct file *filp, int on);
/* Mapping support (drm_vm.h) */
-extern struct page *DRM(vm_nopage)(struct vm_area_struct *vma,
- unsigned long address,
- int write_access);
-extern struct page *DRM(vm_shm_nopage)(struct vm_area_struct *vma,
- unsigned long address,
- int write_access);
-extern struct page *DRM(vm_dma_nopage)(struct vm_area_struct *vma,
- unsigned long address,
- int write_access);
-extern struct page *DRM(vm_sg_nopage)(struct vm_area_struct *vma,
- unsigned long address,
- int write_access);
extern void DRM(vm_open)(struct vm_area_struct *vma);
extern void DRM(vm_close)(struct vm_area_struct *vma);
extern void DRM(vm_shm_close)(struct vm_area_struct *vma);
@@ -845,6 +846,10 @@ extern void *DRM(ioremap_nocache)(unsigned long offset, unsigned long size,
extern void DRM(ioremapfree)(void *pt, unsigned long size, drm_device_t *dev);
#if __REALLY_HAVE_AGP
+#ifndef VMAP_4_ARGS
+extern void *DRM(ioremap_agp)(unsigned long offset, unsigned long size, drm_device_t *dev);
+extern void DRM(ioremap_agp_free)(void *pt, unsigned long size);
+#endif
extern DRM_AGP_MEM *DRM(alloc_agp)(int pages, u32 type);
extern int DRM(free_agp)(DRM_AGP_MEM *handle, int pages);
extern int DRM(bind_agp)(DRM_AGP_MEM *handle, unsigned int start);