diff options
Diffstat (limited to 'linux')
-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 |
7 files changed, 26 insertions, 9 deletions
diff --git a/linux/Makefile.linux b/linux/Makefile.linux index b76cbeaf..adf19005 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 b182f2c9..57032d6e 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 6be90c51..46e08e05 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 05d941b4..00c0ea7f 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 77519a56..4b4fbe90 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 63b98c72..da2f676d 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 e6e8ed7d..9a8f83ea 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) { |