diff options
-rw-r--r-- | bsd/Imakefile | 4 | ||||
-rw-r--r-- | libdrm/xf86drm.c | 2 | ||||
-rw-r--r-- | linux-core/drmP.h | 9 | ||||
-rw-r--r-- | linux/Makefile.linux | 6 | ||||
-rw-r--r-- | linux/drm.h | 11 | ||||
-rw-r--r-- | linux/drmP.h | 9 | ||||
-rw-r--r-- | linux/mga_bufs.c | 1 | ||||
-rw-r--r-- | linux/picker.c | 1 | ||||
-rw-r--r-- | linux/r128_drv.h | 2 | ||||
-rw-r--r-- | linux/sis_mm.c | 5 | ||||
-rw-r--r-- | shared-core/drm.h | 11 | ||||
-rw-r--r-- | shared/drm.h | 11 |
12 files changed, 60 insertions, 12 deletions
diff --git a/bsd/Imakefile b/bsd/Imakefile index 81445a7d3..47dff5bfb 100644 --- a/bsd/Imakefile +++ b/bsd/Imakefile @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/drm/kernel/Imakefile,v 1.2 2000/08/16 01:45:31 dawes Exp $ +XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/drm/kernel/Imakefile,v 1.3 2000/10/27 16:59:40 dawes Exp $ #include <Server.tmpl> @@ -18,7 +18,7 @@ LinkSourceFile(drm.h,$(XF86OSSRC)/linux/drm/kernel) LinkSourceFile(i810_drm.h,$(XF86OSSRC)/linux/drm/kernel) LinkSourceFile(mga_drm.h,$(XF86OSSRC)/linux/drm/kernel) LinkSourceFile(r128_drm.h,$(XF86OSSRC)/linux/drm/kernel) -LinkSourceFile(sis_drm_public.h,$(XF86OSSRC)/linux/drm/kernel) +LinkSourceFile(sis_drm.h,$(XF86OSSRC)/linux/drm/kernel) XCOMM This is a kludge until we determine how best to build the diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c index c933f5935..5c2c08c3b 100644 --- a/libdrm/xf86drm.c +++ b/libdrm/xf86drm.c @@ -27,7 +27,7 @@ * Authors: Rickard E. (Rik) Faith <faith@valinux.com> * Kevin E. Martin <martin@valinux.com> * - * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c,v 1.16 2000/08/28 16:55:52 dawes Exp $ + * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c,v 1.17 2000/09/24 13:51:32 alanh Exp $ * */ diff --git a/linux-core/drmP.h b/linux-core/drmP.h index 6be90c516..46e08e057 100644 --- a/linux-core/drmP.h +++ b/linux-core/drmP.h @@ -59,6 +59,15 @@ #include <asm/io.h> #include <asm/mman.h> #include <asm/uaccess.h> + +#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 <asm/mtrr.h> #endif diff --git a/linux/Makefile.linux b/linux/Makefile.linux index b76cbeaf6..adf190059 100644 --- a/linux/Makefile.linux +++ b/linux/Makefile.linux @@ -113,15 +113,15 @@ all:; @echo Error: Could not locate kernel tree in $A $B $C else SMP := $(shell gcc -E -nostdinc -I$(TREE) picker.c 2>/dev/null \ | grep -s 'SMP = ' | cut -d' ' -f3) -MODULES := $(shell gcc -E -nostdinc -I $(TREE) picker.c 2>/dev/null \ +MODULES := $(shell gcc -E -nostdinc -I$(TREE) picker.c 2>/dev/null \ | grep -s 'MODULES = ' | cut -d' ' -f3) -MODVERSIONS := $(shell gcc -E -nostdinc -I $(TREE) picker.c 2>/dev/null \ +MODVERSIONS := $(shell gcc -E -nostdinc -I$(TREE) picker.c 2>/dev/null \ | grep -s 'MODVERSIONS = ' | cut -d' ' -f3) AGP := $(shell gcc -E -nostdinc -I$(TREE) picker.c 2>/dev/null \ | grep -s 'AGP = ' | cut -d' ' -f3) SIS := $(shell gcc -E -nostdinc -I$(TREE) picker.c 2>/dev/null \ | grep -s 'SIS = ' | cut -d' ' -f3) -PARAMS := $(shell if fgrep kill_fasync $(TREE)/linux/fs.h \ +PARAMS := $(shell if fgrep kill_fasync $(TREE)/linux/fs.h 2>/dev/null \ | egrep -q '(band|int, int)'; then echo 3; else echo 2; fi) MACHINE := $(shell echo `uname -m`) ifeq ($(AGP),0) diff --git a/linux/drm.h b/linux/drm.h index b182f2c99..57032d6e2 100644 --- a/linux/drm.h +++ b/linux/drm.h @@ -82,6 +82,7 @@ typedef struct drm_clip_rect { #include "mga_drm.h" #include "i810_drm.h" #include "r128_drm.h" +#include "sis_drm.h" typedef struct drm_version { int version_major; /* Major version */ @@ -369,4 +370,14 @@ typedef struct drm_agp_info { #define DRM_IOCTL_R128_PACKET DRM_IOW( 0x44, drm_r128_packet_t) #define DRM_IOCTL_R128_VERTEX DRM_IOW( 0x45, drm_r128_vertex_t) +/* SiS specific ioctls */ +#define SIS_IOCTL_FB_ALLOC DRM_IOWR( 0x44, drm_sis_mem_t) +#define SIS_IOCTL_FB_FREE DRM_IOW( 0x45, drm_sis_mem_t) +#define SIS_IOCTL_AGP_INIT DRM_IOWR( 0x53, drm_sis_agp_t) +#define SIS_IOCTL_AGP_ALLOC DRM_IOWR( 0x54, drm_sis_mem_t) +#define SIS_IOCTL_AGP_FREE DRM_IOW( 0x55, drm_sis_mem_t) +#define SIS_IOCTL_FLIP DRM_IOW( 0x48, drm_sis_flip_t) +#define SIS_IOCTL_FLIP_INIT DRM_IO( 0x49) +#define SIS_IOCTL_FLIP_FINAL DRM_IO( 0x50) + #endif diff --git a/linux/drmP.h b/linux/drmP.h index 6be90c516..46e08e057 100644 --- a/linux/drmP.h +++ b/linux/drmP.h @@ -59,6 +59,15 @@ #include <asm/io.h> #include <asm/mman.h> #include <asm/uaccess.h> + +#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 <asm/mtrr.h> #endif diff --git a/linux/mga_bufs.c b/linux/mga_bufs.c index 05d941b4c..00c0ea7f9 100644 --- a/linux/mga_bufs.c +++ b/linux/mga_bufs.c @@ -420,6 +420,7 @@ int mga_infobufs(struct inode *inode, struct file *filp, unsigned int cmd, sizeof(dma->bufs[0] .freelist.high_mark))) return -EFAULT; + ++count; } } diff --git a/linux/picker.c b/linux/picker.c index 77519a561..4b4fbe90c 100644 --- a/linux/picker.c +++ b/linux/picker.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/picker.c,v 1.3 2000/09/01 02:31:40 tsi Exp $ */ #include <linux/config.h> #include <linux/version.h> diff --git a/linux/r128_drv.h b/linux/r128_drv.h index 63b98c727..da2f676d3 100644 --- a/linux/r128_drv.h +++ b/linux/r128_drv.h @@ -197,7 +197,7 @@ extern int r128_context_switch_complete(drm_device_t *dev, int new); #define R128_MAX_USEC_TIMEOUT 100000 /* 100 ms */ -#define R128_BASE(reg) ((u32)(dev_priv->mmio->handle)) +#define R128_BASE(reg) ((unsigned long)(dev_priv->mmio->handle)) #define R128_ADDR(reg) (R128_BASE(reg) + reg) #define R128_DEREF(reg) *(__volatile__ int *)R128_ADDR(reg) diff --git a/linux/sis_mm.c b/linux/sis_mm.c index e6e8ed7dd..9a8f83ea9 100644 --- a/linux/sis_mm.c +++ b/linux/sis_mm.c @@ -33,9 +33,6 @@ #include "sis_drm.h" #include "sis_ds.h" #include "sis_drv.h" -#include <linux/fb.h> -#include <linux/sisfb.h> -#include <linux/interrupt.h> #define MAX_CONTEXT 100 #define VIDEO_TYPE 0 @@ -73,7 +70,7 @@ static int del_alloc_set(int context, int type, unsigned int val) } /* fb management via fb device */ -#if 1 +#if 0 int sis_fb_alloc(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) { diff --git a/shared-core/drm.h b/shared-core/drm.h index b182f2c99..57032d6e2 100644 --- a/shared-core/drm.h +++ b/shared-core/drm.h @@ -82,6 +82,7 @@ typedef struct drm_clip_rect { #include "mga_drm.h" #include "i810_drm.h" #include "r128_drm.h" +#include "sis_drm.h" typedef struct drm_version { int version_major; /* Major version */ @@ -369,4 +370,14 @@ typedef struct drm_agp_info { #define DRM_IOCTL_R128_PACKET DRM_IOW( 0x44, drm_r128_packet_t) #define DRM_IOCTL_R128_VERTEX DRM_IOW( 0x45, drm_r128_vertex_t) +/* SiS specific ioctls */ +#define SIS_IOCTL_FB_ALLOC DRM_IOWR( 0x44, drm_sis_mem_t) +#define SIS_IOCTL_FB_FREE DRM_IOW( 0x45, drm_sis_mem_t) +#define SIS_IOCTL_AGP_INIT DRM_IOWR( 0x53, drm_sis_agp_t) +#define SIS_IOCTL_AGP_ALLOC DRM_IOWR( 0x54, drm_sis_mem_t) +#define SIS_IOCTL_AGP_FREE DRM_IOW( 0x55, drm_sis_mem_t) +#define SIS_IOCTL_FLIP DRM_IOW( 0x48, drm_sis_flip_t) +#define SIS_IOCTL_FLIP_INIT DRM_IO( 0x49) +#define SIS_IOCTL_FLIP_FINAL DRM_IO( 0x50) + #endif diff --git a/shared/drm.h b/shared/drm.h index b182f2c99..57032d6e2 100644 --- a/shared/drm.h +++ b/shared/drm.h @@ -82,6 +82,7 @@ typedef struct drm_clip_rect { #include "mga_drm.h" #include "i810_drm.h" #include "r128_drm.h" +#include "sis_drm.h" typedef struct drm_version { int version_major; /* Major version */ @@ -369,4 +370,14 @@ typedef struct drm_agp_info { #define DRM_IOCTL_R128_PACKET DRM_IOW( 0x44, drm_r128_packet_t) #define DRM_IOCTL_R128_VERTEX DRM_IOW( 0x45, drm_r128_vertex_t) +/* SiS specific ioctls */ +#define SIS_IOCTL_FB_ALLOC DRM_IOWR( 0x44, drm_sis_mem_t) +#define SIS_IOCTL_FB_FREE DRM_IOW( 0x45, drm_sis_mem_t) +#define SIS_IOCTL_AGP_INIT DRM_IOWR( 0x53, drm_sis_agp_t) +#define SIS_IOCTL_AGP_ALLOC DRM_IOWR( 0x54, drm_sis_mem_t) +#define SIS_IOCTL_AGP_FREE DRM_IOW( 0x55, drm_sis_mem_t) +#define SIS_IOCTL_FLIP DRM_IOW( 0x48, drm_sis_flip_t) +#define SIS_IOCTL_FLIP_INIT DRM_IO( 0x49) +#define SIS_IOCTL_FLIP_FINAL DRM_IO( 0x50) + #endif |