diff -u -r xc-igp/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.kernel xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.kernel --- xc-igp/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.kernel Tue Aug 5 23:28:17 2003 +++ xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.kernel Tue Aug 5 23:45:54 2003 @@ -21,12 +21,15 @@ BELOW25 := $(shell if [ $(PATCHLEVEL) -lt 5 ]; then echo y; fi) + + # There were major build changes starting with 2.5.52 ifneq ($(BELOW25),y) -BELOW2552 := $(shell if [ $(SUBLEVEL) -lt 52 ]; then echo y; fi) +BELOW2552 := $(shell if [$(PATCHLEVEL) -lt 6 $(SUBLEVEL) -lt 52 ]; then echo y; fi) else BELOW2552 := y endif + ifeq ($(BELOW25),y) O_TARGET := drm.o diff -u -r xc-igp/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drmP.h xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drmP.h --- xc-igp/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drmP.h Tue Aug 5 23:28:37 2003 +++ xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drmP.h Tue Aug 5 23:47:25 2003 @@ -48,8 +48,10 @@ #include #include #include -#include #include +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,1) +#include +#endif #include #include /* For (un)lock_kernel */ #include @@ -470,7 +472,7 @@ #if __REALLY_HAVE_AGP typedef struct drm_agp_mem { unsigned long handle; - agp_memory *memory; + struct agp_memory *memory; unsigned long bound; /* address */ int pages; struct drm_agp_mem *prev; @@ -478,7 +480,7 @@ } drm_agp_mem_t; typedef struct drm_agp_head { - agp_kern_info agp_info; + struct agp_kern_info agp_info; drm_agp_mem_t *memory; unsigned long mode; int enabled; @@ -688,10 +690,10 @@ extern void DRM(ioremapfree)(void *pt, unsigned long size, drm_device_t *dev); #if __REALLY_HAVE_AGP -extern agp_memory *DRM(alloc_agp)(int pages, u32 type); -extern int DRM(free_agp)(agp_memory *handle, int pages); -extern int DRM(bind_agp)(agp_memory *handle, unsigned int start); -extern int DRM(unbind_agp)(agp_memory *handle); +extern struct agp_memory *DRM(alloc_agp)(int pages, u32 type); +extern int DRM(free_agp)(struct agp_memory *handle, int pages); +extern int DRM(bind_agp)(struct agp_memory *handle, unsigned int start); +extern int DRM(unbind_agp)(struct agp_memory *handle); #endif /* Misc. IOCTL support (drm_ioctl.h) */ @@ -835,10 +837,10 @@ 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); +extern struct agp_memory *DRM(agp_allocate_memory)(size_t pages, u32 type); +extern int DRM(agp_free_memory)(struct agp_memory *handle); +extern int DRM(agp_bind_memory)(struct agp_memory *handle, off_t start); +extern int DRM(agp_unbind_memory)(struct agp_memory *handle); #endif /* Stub support (drm_stub.h) */ diff -u -r xc-igp/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm_agpsupport.h xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm_agpsupport.h --- xc-igp/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm_agpsupport.h Tue Aug 5 23:29:32 2003 +++ xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm_agpsupport.h Sun Aug 3 00:41:36 2003 @@ -38,14 +38,14 @@ #define DRM_AGP_GET (drm_agp_t *)inter_module_get("drm_agp") #define DRM_AGP_PUT inter_module_put("drm_agp") -static const drm_agp_t *drm_agp = NULL; +static const drm_agp_t *drm_agp = NULL; int DRM(agp_info)(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) { drm_file_t *priv = filp->private_data; drm_device_t *dev = priv->dev; - agp_kern_info *kern; + struct agp_kern_info *kern; drm_agp_info_t info; if (!dev->agp || !dev->agp->acquired || !drm_agp->copy_info) @@ -127,7 +127,7 @@ drm_device_t *dev = priv->dev; drm_agp_buffer_t request; drm_agp_mem_t *entry; - agp_memory *memory; + struct agp_memory *memory; unsigned long pages; u32 type; @@ -287,26 +287,26 @@ drm_agp = NULL; } -agp_memory *DRM(agp_allocate_memory)(size_t pages, u32 type) +struct agp_memory *DRM(agp_allocate_memory)(size_t pages, u32 type) { if (!drm_agp->allocate_memory) return NULL; return drm_agp->allocate_memory(pages, type); } -int DRM(agp_free_memory)(agp_memory *handle) +int DRM(agp_free_memory)(struct agp_memory *handle) { if (!handle || !drm_agp->free_memory) return 0; drm_agp->free_memory(handle); return 1; } -int DRM(agp_bind_memory)(agp_memory *handle, off_t start) +int DRM(agp_bind_memory)(struct agp_memory *handle, off_t start) { if (!handle || !drm_agp->bind_memory) return -EINVAL; return drm_agp->bind_memory(handle, start); } -int DRM(agp_unbind_memory)(agp_memory *handle) +int DRM(agp_unbind_memory)(struct agp_memory *handle) { if (!handle || !drm_agp->unbind_memory) return -EINVAL; return drm_agp->unbind_memory(handle); diff -u -r xc-igp/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm_memory.h xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm_memory.h --- xc-igp/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm_memory.h Tue Aug 5 23:28:37 2003 +++ xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm_memory.h Sun Aug 3 00:42:25 2003 @@ -288,22 +288,22 @@ } #if __REALLY_HAVE_AGP -agp_memory *DRM(alloc_agp)(int pages, u32 type) +struct agp_memory *DRM(alloc_agp)(int pages, u32 type) { return DRM(agp_allocate_memory)(pages, type); } -int DRM(free_agp)(agp_memory *handle, int pages) +int DRM(free_agp)(struct agp_memory *handle, int pages) { return DRM(agp_free_memory)(handle) ? 0 : -EINVAL; } -int DRM(bind_agp)(agp_memory *handle, unsigned int start) +int DRM(bind_agp)(struct agp_memory *handle, unsigned int start) { return DRM(agp_bind_memory)(handle, start); } -int DRM(unbind_agp)(agp_memory *handle) +int DRM(unbind_agp)(struct agp_memory *handle) { return DRM(agp_unbind_memory)(handle); }