From 679531e1669085115bac5f6fc982d54a4a9608e8 Mon Sep 17 00:00:00 2001 From: Rik Faith Date: Wed, 15 Nov 2000 15:47:51 +0000 Subject: Sync with Linux 2.4.0-test11-pre5 Provide backward compatibility tested against 2.2.18pre21 As usual, since all 2.4.0-test* kernels set LINUX_VERSION_CODE to the same value, if you are running a 2.4.0-test kernel, you MUST be running 2.4.0-test11-pre4 or later (although anything after 2.4.0-test11-pre1 should work fine -- I tested with pre4/pre5). I expect 2.2.x support to continue to work for all recent kernels, but I tested with 2.2.18pre21 -- we use the old intermodule symbol communication for 2.2.x kernels, so they should all continue to work. --- linux/drmP.h | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) (limited to 'linux/drmP.h') diff --git a/linux/drmP.h b/linux/drmP.h index 46e08e05..affeae70 100644 --- a/linux/drmP.h +++ b/linux/drmP.h @@ -59,15 +59,6 @@ #include #include #include - -#ifndef copy_to_user_ret -#define copy_to_user_ret(to,from,n,retval) ({ if (copy_to_user(to,from,n)) return retval; }) -#endif - -#ifndef copy_from_user_ret -#define copy_from_user_ret(to,from,n,retval) ({ if (copy_from_user(to,from,n)) return retval; }) -#endif - #ifdef CONFIG_MTRR #include #endif @@ -519,19 +510,6 @@ typedef struct drm_agp_head { unsigned long base; int agp_mtrr; } drm_agp_head_t; - -typedef struct { - void (*free_memory)(agp_memory *); - agp_memory *(*allocate_memory)(size_t, u32); - int (*bind_memory)(agp_memory *, off_t); - int (*unbind_memory)(agp_memory *); - void (*enable)(u32); - int (*acquire)(void); - void (*release)(void); - void (*copy_info)(agp_kern_info *); -} drm_agp_func_t; - -extern drm_agp_func_t drm_agp; #endif typedef struct drm_sigdata { @@ -833,6 +811,7 @@ extern drm_agp_head_t *drm_agp_init(void); extern void drm_agp_uninit(void); extern int drm_agp_acquire(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); +extern void _drm_agp_release(void); extern int drm_agp_release(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); extern int drm_agp_enable(struct inode *inode, struct file *filp, @@ -847,6 +826,10 @@ extern int drm_agp_unbind(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); extern int drm_agp_bind(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); +extern agp_memory *drm_agp_allocate_memory(size_t pages, u32 type); +extern int drm_agp_free_memory(agp_memory *handle); +extern int drm_agp_bind_memory(agp_memory *handle, off_t start); +extern int drm_agp_unbind_memory(agp_memory *handle); #endif #endif #endif -- cgit v1.2.3