summaryrefslogtreecommitdiff
path: root/bsd
diff options
context:
space:
mode:
authorJens Owen <jens@tungstengraphics.com>2002-04-09 21:54:56 +0000
committerJens Owen <jens@tungstengraphics.com>2002-04-09 21:54:56 +0000
commit3903e5ac94c07cf31f0bc24eff5011ef8cc7afba (patch)
tree93515f920b8f69e9502a0a74396f10bfdd0c5a58 /bsd
parenta820c741374743065540546c92b1d5e1a2089225 (diff)
Merged drmcommand-0-0-1drmcommand-0-0-1-20020409-merge
Diffstat (limited to 'bsd')
-rw-r--r--bsd/drm.h94
-rw-r--r--bsd/gamma/gamma_dma.c2
-rw-r--r--bsd/gamma/gamma_drv.c2
-rw-r--r--bsd/gamma_drm.h10
-rw-r--r--bsd/i810/i810_dma.c5
-rw-r--r--bsd/i810/i810_drv.c2
-rw-r--r--bsd/i810_drm.h24
-rw-r--r--bsd/i830/i830_dma.c2
-rw-r--r--bsd/i830/i830_drv.c2
-rw-r--r--bsd/i830_drm.h13
-rw-r--r--bsd/mga/mga_dma.c2
-rw-r--r--bsd/mga/mga_drv.c2
-rw-r--r--bsd/mga/mga_state.c2
-rw-r--r--bsd/mga/mga_warp.c2
-rw-r--r--bsd/mga_drm.h15
-rw-r--r--bsd/r128/r128_cce.c2
-rw-r--r--bsd/r128/r128_drv.c2
-rw-r--r--bsd/r128/r128_state.c2
-rw-r--r--bsd/r128_drm.h21
-rw-r--r--bsd/radeon/radeon_cp.c4
-rw-r--r--bsd/radeon/radeon_drv.c2
-rw-r--r--bsd/radeon/radeon_state.c3
-rw-r--r--bsd/radeon_drm.h22
-rw-r--r--bsd/sis_drm.h10
24 files changed, 151 insertions, 96 deletions
diff --git a/bsd/drm.h b/bsd/drm.h
index 92fddec6a..ddb280cc0 100644
--- a/bsd/drm.h
+++ b/bsd/drm.h
@@ -93,15 +93,6 @@ typedef struct drm_tex_region {
unsigned int age;
} drm_tex_region_t;
-/* Seperate include files for the driver specific structures */
-#include "mga_drm.h"
-#include "i810_drm.h"
-#include "i830_drm.h"
-#include "r128_drm.h"
-#include "radeon_drm.h"
-#include "sis_drm.h"
-#include "gamma_drm.h"
-
typedef struct drm_version {
int version_major; /* Major version */
int version_minor; /* Minor version */
@@ -422,87 +413,8 @@ typedef struct drm_scatter_gather {
#define DRM_IOCTL_SG_ALLOC DRM_IOW( 0x38, drm_scatter_gather_t)
#define DRM_IOCTL_SG_FREE DRM_IOW( 0x39, drm_scatter_gather_t)
-/* MGA specific ioctls */
-#define DRM_IOCTL_MGA_INIT DRM_IOW( 0x40, drm_mga_init_t)
-#define DRM_IOCTL_MGA_FLUSH DRM_IOW( 0x41, drm_lock_t)
-#define DRM_IOCTL_MGA_RESET DRM_IO( 0x42)
-#define DRM_IOCTL_MGA_SWAP DRM_IO( 0x43)
-#define DRM_IOCTL_MGA_CLEAR DRM_IOW( 0x44, drm_mga_clear_t)
-#define DRM_IOCTL_MGA_VERTEX DRM_IOW( 0x45, drm_mga_vertex_t)
-#define DRM_IOCTL_MGA_INDICES DRM_IOW( 0x46, drm_mga_indices_t)
-#define DRM_IOCTL_MGA_ILOAD DRM_IOW( 0x47, drm_mga_iload_t)
-#define DRM_IOCTL_MGA_BLIT DRM_IOW( 0x48, drm_mga_blit_t)
-
-/* i810 specific ioctls */
-#define DRM_IOCTL_I810_INIT DRM_IOW( 0x40, drm_i810_init_t)
-#define DRM_IOCTL_I810_VERTEX DRM_IOW( 0x41, drm_i810_vertex_t)
-#define DRM_IOCTL_I810_CLEAR DRM_IOW( 0x42, drm_i810_clear_t)
-#define DRM_IOCTL_I810_FLUSH DRM_IO( 0x43)
-#define DRM_IOCTL_I810_GETAGE DRM_IO( 0x44)
-#define DRM_IOCTL_I810_GETBUF DRM_IOWR(0x45, drm_i810_dma_t)
-#define DRM_IOCTL_I810_SWAP DRM_IO( 0x46)
-#define DRM_IOCTL_I810_COPY DRM_IOW( 0x47, drm_i810_copy_t)
-#define DRM_IOCTL_I810_DOCOPY DRM_IO( 0x48)
-
-/* Rage 128 specific ioctls */
-#define DRM_IOCTL_R128_INIT DRM_IOW( 0x40, drm_r128_init_t)
-#define DRM_IOCTL_R128_CCE_START DRM_IO( 0x41)
-#define DRM_IOCTL_R128_CCE_STOP DRM_IOW( 0x42, drm_r128_cce_stop_t)
-#define DRM_IOCTL_R128_CCE_RESET DRM_IO( 0x43)
-#define DRM_IOCTL_R128_CCE_IDLE DRM_IO( 0x44)
-#define DRM_IOCTL_R128_RESET DRM_IO( 0x46)
-#define DRM_IOCTL_R128_SWAP DRM_IO( 0x47)
-#define DRM_IOCTL_R128_CLEAR DRM_IOW( 0x48, drm_r128_clear_t)
-#define DRM_IOCTL_R128_VERTEX DRM_IOW( 0x49, drm_r128_vertex_t)
-#define DRM_IOCTL_R128_INDICES DRM_IOW( 0x4a, drm_r128_indices_t)
-#define DRM_IOCTL_R128_BLIT DRM_IOW( 0x4b, drm_r128_blit_t)
-#define DRM_IOCTL_R128_DEPTH DRM_IOW( 0x4c, drm_r128_depth_t)
-#define DRM_IOCTL_R128_STIPPLE DRM_IOW( 0x4d, drm_r128_stipple_t)
-#define DRM_IOCTL_R128_INDIRECT DRM_IOWR(0x4f, drm_r128_indirect_t)
-#define DRM_IOCTL_R128_FULLSCREEN DRM_IOW( 0x50, drm_r128_fullscreen_t)
-#define DRM_IOCTL_R128_CLEAR2 DRM_IOW( 0x51, drm_r128_clear2_t)
-
-/* Radeon specific ioctls */
-#define DRM_IOCTL_RADEON_CP_INIT DRM_IOW( 0x40, drm_radeon_init_t)
-#define DRM_IOCTL_RADEON_CP_START DRM_IO( 0x41)
-#define DRM_IOCTL_RADEON_CP_STOP DRM_IOW( 0x42, drm_radeon_cp_stop_t)
-#define DRM_IOCTL_RADEON_CP_RESET DRM_IO( 0x43)
-#define DRM_IOCTL_RADEON_CP_IDLE DRM_IO( 0x44)
-#define DRM_IOCTL_RADEON_RESET DRM_IO( 0x45)
-#define DRM_IOCTL_RADEON_FULLSCREEN DRM_IOW( 0x46, drm_radeon_fullscreen_t)
-#define DRM_IOCTL_RADEON_SWAP DRM_IO( 0x47)
-#define DRM_IOCTL_RADEON_CLEAR DRM_IOW( 0x48, drm_radeon_clear_t)
-#define DRM_IOCTL_RADEON_VERTEX DRM_IOW( 0x49, drm_radeon_vertex_t)
-#define DRM_IOCTL_RADEON_INDICES DRM_IOW( 0x4a, drm_radeon_indices_t)
-#define DRM_IOCTL_RADEON_STIPPLE DRM_IOW( 0x4c, drm_radeon_stipple_t)
-#define DRM_IOCTL_RADEON_INDIRECT DRM_IOWR(0x4d, drm_radeon_indirect_t)
-#define DRM_IOCTL_RADEON_TEXTURE DRM_IOWR(0x4e, drm_radeon_texture_t)
-#define DRM_IOCTL_RADEON_VERTEX2 DRM_IOW( 0x4f, drm_radeon_vertex_t)
-
-/* Gamma specific ioctls */
-#define DRM_IOCTL_GAMMA_INIT DRM_IOW( 0x40, drm_gamma_init_t)
-#define DRM_IOCTL_GAMMA_COPY DRM_IOW( 0x41, drm_gamma_copy_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)
-
-/* I830 specific ioctls */
-#define DRM_IOCTL_I830_INIT DRM_IOW( 0x40, drm_i830_init_t)
-#define DRM_IOCTL_I830_VERTEX DRM_IOW( 0x41, drm_i830_vertex_t)
-#define DRM_IOCTL_I830_CLEAR DRM_IOW( 0x42, drm_i830_clear_t)
-#define DRM_IOCTL_I830_FLUSH DRM_IO ( 0x43)
-#define DRM_IOCTL_I830_GETAGE DRM_IO ( 0x44)
-#define DRM_IOCTL_I830_GETBUF DRM_IOWR(0x45, drm_i830_dma_t)
-#define DRM_IOCTL_I830_SWAP DRM_IO ( 0x46)
-#define DRM_IOCTL_I830_COPY DRM_IOW( 0x47, drm_i830_copy_t)
-#define DRM_IOCTL_I830_DOCOPY DRM_IO ( 0x48)
+/* Device specfic ioctls should only be in their respective headers
+ * The device specific ioctl range is 0x40 to 0x79. */
+#define DRM_COMMAND_BASE 0x40
#endif
diff --git a/bsd/gamma/gamma_dma.c b/bsd/gamma/gamma_dma.c
index fd0da710a..0dee8c74a 100644
--- a/bsd/gamma/gamma_dma.c
+++ b/bsd/gamma/gamma_dma.c
@@ -33,6 +33,8 @@
#include "gamma.h"
#include "drmP.h"
+#include "drm.h"
+#include "gamma_drm.h"
#include "gamma_drv.h"
diff --git a/bsd/gamma/gamma_drv.c b/bsd/gamma/gamma_drv.c
index e58d853c9..50658bbae 100644
--- a/bsd/gamma/gamma_drv.c
+++ b/bsd/gamma/gamma_drv.c
@@ -35,6 +35,8 @@
#include <opt_drm_linux.h>
#include "gamma.h"
#include "drmP.h"
+#include "drm.h"
+#include "gamma_drm.h"
#include "gamma_drv.h"
#define DRIVER_AUTHOR "VA Linux Systems Inc."
diff --git a/bsd/gamma_drm.h b/bsd/gamma_drm.h
index d06763ae9..0d58b07b5 100644
--- a/bsd/gamma_drm.h
+++ b/bsd/gamma_drm.h
@@ -48,6 +48,16 @@ typedef struct _drm_gamma_sarea {
int vertex_prim;
} drm_gamma_sarea_t;
+/* WARNING: If you change any of these defines, make sure to change the
+ * defines in the Xserver file (xf86drmGamma.h)
+ */
+
+/* Gamma specific ioctls
+ * The device specific ioctl range is 0x40 to 0x79.
+ */
+#define DRM_IOCTL_GAMMA_INIT DRM_IOW( 0x40, drm_gamma_init_t)
+#define DRM_IOCTL_GAMMA_COPY DRM_IOW( 0x41, drm_gamma_copy_t)
+
typedef struct drm_gamma_copy {
unsigned int DMAOutputAddress;
unsigned int DMAOutputCount;
diff --git a/bsd/i810/i810_dma.c b/bsd/i810/i810_dma.c
index 4558c1990..4310851a5 100644
--- a/bsd/i810/i810_dma.c
+++ b/bsd/i810/i810_dma.c
@@ -33,6 +33,8 @@
#include "i810.h"
#include "drmP.h"
+#include "drm.h"
+#include "i810_drm.h"
#include "i810_drv.h"
#define I810_BUF_FREE 2
@@ -125,7 +127,7 @@ static int i810_freelist_put(drm_device_t *dev, drm_buf_t *buf)
return 0;
}
-
+#if 0
int i810_mmap_buffers(struct file *filp, struct vm_area_struct *vma)
{
DRM_OS_DEVICE;
@@ -150,6 +152,7 @@ int i810_mmap_buffers(struct file *filp, struct vm_area_struct *vma)
vma->vm_page_prot)) DRM_OS_RETURN(EAGAIN);
return 0;
}
+#endif
static int i810_map_buffer(drm_buf_t *buf, struct file *filp)
{
diff --git a/bsd/i810/i810_drv.c b/bsd/i810/i810_drv.c
index e1c081274..e76e3a8ae 100644
--- a/bsd/i810/i810_drv.c
+++ b/bsd/i810/i810_drv.c
@@ -38,6 +38,8 @@
#include "i810.h"
#include "drmP.h"
+#include "drm.h"
+#include "i810_drm.h"
#include "i810_drv.h"
#define DRIVER_AUTHOR "VA Linux Systems Inc."
diff --git a/bsd/i810_drm.h b/bsd/i810_drm.h
index f2114dd15..990e50e2b 100644
--- a/bsd/i810_drm.h
+++ b/bsd/i810_drm.h
@@ -166,14 +166,34 @@ typedef struct _drm_i810_sarea {
} drm_i810_sarea_t;
+/* WARNING: If you change any of these defines, make sure to change the
+ * defines in the Xserver file (xf86drmMga.h)
+ */
+
+/* i810 specific ioctls
+ * The device specific ioctl range is 0x40 to 0x79.
+ */
+#define DRM_IOCTL_I810_INIT DRM_IOW( 0x40, drm_i810_init_t)
+#define DRM_IOCTL_I810_VERTEX DRM_IOW( 0x41, drm_i810_vertex_t)
+#define DRM_IOCTL_I810_CLEAR DRM_IOW( 0x42, drm_i810_clear_t)
+#define DRM_IOCTL_I810_FLUSH DRM_IO( 0x43)
+#define DRM_IOCTL_I810_GETAGE DRM_IO( 0x44)
+#define DRM_IOCTL_I810_GETBUF DRM_IOWR(0x45, drm_i810_dma_t)
+#define DRM_IOCTL_I810_SWAP DRM_IO( 0x46)
+#define DRM_IOCTL_I810_COPY DRM_IOW( 0x47, drm_i810_copy_t)
+#define DRM_IOCTL_I810_DOCOPY DRM_IO( 0x48)
+#define DRM_IOCTL_I810_OV0INFO DRM_IOR( 0x49, drm_i810_overlay_t)
+#define DRM_IOCTL_I810_FSTATUS DRM_IO ( 0x4a)
+#define DRM_IOCTL_I810_OV0FLIP DRM_IO ( 0x4b)
+#define DRM_IOCTL_I810_MC DRM_IOW( 0x4c, drm_i810_mc_t)
+#define DRM_IOCTL_I810_RSTATUS DRM_IO ( 0x4d )
+
typedef struct _drm_i810_clear {
int clear_color;
int clear_depth;
int flags;
} drm_i810_clear_t;
-
-
/* These may be placeholders if we have more cliprects than
* I810_NR_SAREA_CLIPRECTS. In that case, the client sets discard to
* false, indicating that the buffer will be dispatched again with a
diff --git a/bsd/i830/i830_dma.c b/bsd/i830/i830_dma.c
index 69b1c8a32..fbdc95230 100644
--- a/bsd/i830/i830_dma.c
+++ b/bsd/i830/i830_dma.c
@@ -34,6 +34,8 @@
#define __NO_VERSION__
#include "i830.h"
#include "drmP.h"
+#include "drm.h"
+#include "i830_drm.h"
#include "i830_drv.h"
#include <linux/interrupt.h> /* For task queue support */
diff --git a/bsd/i830/i830_drv.c b/bsd/i830/i830_drv.c
index 904f36601..ad31d1efd 100644
--- a/bsd/i830/i830_drv.c
+++ b/bsd/i830/i830_drv.c
@@ -34,6 +34,8 @@
#include <linux/config.h>
#include "i830.h"
#include "drmP.h"
+#include "drm.h"
+#include "i830_drm.h"
#include "i830_drv.h"
#define DRIVER_AUTHOR "VA Linux Systems Inc."
diff --git a/bsd/i830_drm.h b/bsd/i830_drm.h
index e4a2a257c..725ad3692 100644
--- a/bsd/i830_drm.h
+++ b/bsd/i830_drm.h
@@ -201,6 +201,19 @@ typedef struct _drm_i830_sarea {
int vertex_prim;
} drm_i830_sarea_t;
+/* I830 specific ioctls
+ * The device specific ioctl range is 0x40 to 0x79.
+ */
+#define DRM_IOCTL_I830_INIT DRM_IOW( 0x40, drm_i830_init_t)
+#define DRM_IOCTL_I830_VERTEX DRM_IOW( 0x41, drm_i830_vertex_t)
+#define DRM_IOCTL_I830_CLEAR DRM_IOW( 0x42, drm_i830_clear_t)
+#define DRM_IOCTL_I830_FLUSH DRM_IO ( 0x43)
+#define DRM_IOCTL_I830_GETAGE DRM_IO ( 0x44)
+#define DRM_IOCTL_I830_GETBUF DRM_IOWR(0x45, drm_i830_dma_t)
+#define DRM_IOCTL_I830_SWAP DRM_IO ( 0x46)
+#define DRM_IOCTL_I830_COPY DRM_IOW( 0x47, drm_i830_copy_t)
+#define DRM_IOCTL_I830_DOCOPY DRM_IO ( 0x48)
+
typedef struct _drm_i830_clear {
int clear_color;
int clear_depth;
diff --git a/bsd/mga/mga_dma.c b/bsd/mga/mga_dma.c
index 9ed5d0950..d9449c534 100644
--- a/bsd/mga/mga_dma.c
+++ b/bsd/mga/mga_dma.c
@@ -36,6 +36,8 @@
#define __NO_VERSION__
#include "mga.h"
#include "drmP.h"
+#include "drm.h"
+#include "mga_drm.h"
#include "mga_drv.h"
diff --git a/bsd/mga/mga_drv.c b/bsd/mga/mga_drv.c
index 206a77dc0..d8af22364 100644
--- a/bsd/mga/mga_drv.c
+++ b/bsd/mga/mga_drv.c
@@ -37,6 +37,8 @@
#include "mga.h"
#include "drmP.h"
+#include "drm.h"
+#include "mga_drm.h"
#include "mga_drv.h"
#define DRIVER_AUTHOR "Gareth Hughes, VA Linux Systems Inc."
diff --git a/bsd/mga/mga_state.c b/bsd/mga/mga_state.c
index b71f333dd..a0bd404a8 100644
--- a/bsd/mga/mga_state.c
+++ b/bsd/mga/mga_state.c
@@ -35,6 +35,8 @@
#define __NO_VERSION__
#include "mga.h"
#include "drmP.h"
+#include "drm.h"
+#include "mga_drm.h"
#include "mga_drv.h"
#include "drm.h"
diff --git a/bsd/mga/mga_warp.c b/bsd/mga/mga_warp.c
index 4fe4315ca..f11cd922c 100644
--- a/bsd/mga/mga_warp.c
+++ b/bsd/mga/mga_warp.c
@@ -30,6 +30,8 @@
#define __NO_VERSION__
#include "mga.h"
#include "drmP.h"
+#include "drm.h"
+#include "mga_drm.h"
#include "mga_drv.h"
#include "mga_ucode.h"
diff --git a/bsd/mga_drm.h b/bsd/mga_drm.h
index 4af2ca2e8..8f56beed6 100644
--- a/bsd/mga_drm.h
+++ b/bsd/mga_drm.h
@@ -38,6 +38,7 @@
/* WARNING: If you change any of these defines, make sure to change the
* defines in the Xserver file (mga_sarea.h)
*/
+
#ifndef __MGA_SAREA_DEFINES__
#define __MGA_SAREA_DEFINES__
@@ -225,6 +226,20 @@ typedef struct _drm_mga_sarea {
/* WARNING: If you change any of these defines, make sure to change the
* defines in the Xserver file (xf86drmMga.h)
*/
+
+/* MGA specific ioctls
+ * The device specific ioctl range is 0x40 to 0x79.
+ */
+#define DRM_IOCTL_MGA_INIT DRM_IOW( 0x40, drm_mga_init_t)
+#define DRM_IOCTL_MGA_FLUSH DRM_IOW( 0x41, drm_lock_t)
+#define DRM_IOCTL_MGA_RESET DRM_IO( 0x42)
+#define DRM_IOCTL_MGA_SWAP DRM_IO( 0x43)
+#define DRM_IOCTL_MGA_CLEAR DRM_IOW( 0x44, drm_mga_clear_t)
+#define DRM_IOCTL_MGA_VERTEX DRM_IOW( 0x45, drm_mga_vertex_t)
+#define DRM_IOCTL_MGA_INDICES DRM_IOW( 0x46, drm_mga_indices_t)
+#define DRM_IOCTL_MGA_ILOAD DRM_IOW( 0x47, drm_mga_iload_t)
+#define DRM_IOCTL_MGA_BLIT DRM_IOW( 0x48, drm_mga_blit_t)
+
typedef struct _drm_mga_warp_index {
int installed;
unsigned long phys_addr;
diff --git a/bsd/r128/r128_cce.c b/bsd/r128/r128_cce.c
index 6c4a5e65c..36cc31206 100644
--- a/bsd/r128/r128_cce.c
+++ b/bsd/r128/r128_cce.c
@@ -31,6 +31,8 @@
#define __NO_VERSION__
#include "r128.h"
#include "drmP.h"
+#include "drm.h"
+#include "r128_drm.h"
#include "r128_drv.h"
diff --git a/bsd/r128/r128_drv.c b/bsd/r128/r128_drv.c
index 51e08a28b..cf59aa0d0 100644
--- a/bsd/r128/r128_drv.c
+++ b/bsd/r128/r128_drv.c
@@ -37,6 +37,8 @@
#include "r128.h"
#include "drmP.h"
+#include "drm.h"
+#include "r128_drm.h"
#include "r128_drv.h"
#if __REALLY_HAVE_SG
#include "ati_pcigart.h"
diff --git a/bsd/r128/r128_state.c b/bsd/r128/r128_state.c
index 0fce0c55e..34500bb3f 100644
--- a/bsd/r128/r128_state.c
+++ b/bsd/r128/r128_state.c
@@ -30,6 +30,8 @@
#include "r128.h"
#include "drmP.h"
+#include "drm.h"
+#include "r128_drm.h"
#include "r128_drv.h"
#include "drm.h"
diff --git a/bsd/r128_drm.h b/bsd/r128_drm.h
index 0fc6a6cd1..a8d230088 100644
--- a/bsd/r128_drm.h
+++ b/bsd/r128_drm.h
@@ -170,6 +170,27 @@ typedef struct drm_r128_sarea {
/* WARNING: If you change any of these defines, make sure to change the
* defines in the Xserver file (xf86drmR128.h)
*/
+
+/* Rage 128 specific ioctls
+ * The device specific ioctl range is 0x40 to 0x79.
+ */
+#define DRM_IOCTL_R128_INIT DRM_IOW( 0x40, drm_r128_init_t)
+#define DRM_IOCTL_R128_CCE_START DRM_IO( 0x41)
+#define DRM_IOCTL_R128_CCE_STOP DRM_IOW( 0x42, drm_r128_cce_stop_t)
+#define DRM_IOCTL_R128_CCE_RESET DRM_IO( 0x43)
+#define DRM_IOCTL_R128_CCE_IDLE DRM_IO( 0x44)
+#define DRM_IOCTL_R128_RESET DRM_IO( 0x46)
+#define DRM_IOCTL_R128_SWAP DRM_IO( 0x47)
+#define DRM_IOCTL_R128_CLEAR DRM_IOW( 0x48, drm_r128_clear_t)
+#define DRM_IOCTL_R128_VERTEX DRM_IOW( 0x49, drm_r128_vertex_t)
+#define DRM_IOCTL_R128_INDICES DRM_IOW( 0x4a, drm_r128_indices_t)
+#define DRM_IOCTL_R128_BLIT DRM_IOW( 0x4b, drm_r128_blit_t)
+#define DRM_IOCTL_R128_DEPTH DRM_IOW( 0x4c, drm_r128_depth_t)
+#define DRM_IOCTL_R128_STIPPLE DRM_IOW( 0x4d, drm_r128_stipple_t)
+#define DRM_IOCTL_R128_INDIRECT DRM_IOWR(0x4f, drm_r128_indirect_t)
+#define DRM_IOCTL_R128_FULLSCREEN DRM_IOW( 0x50, drm_r128_fullscreen_t)
+#define DRM_IOCTL_R128_CLEAR2 DRM_IOW( 0x51, drm_r128_clear2_t)
+
typedef struct drm_r128_init {
enum {
R128_INIT_CCE = 0x01,
diff --git a/bsd/radeon/radeon_cp.c b/bsd/radeon/radeon_cp.c
index ed5128b20..9c262ae39 100644
--- a/bsd/radeon/radeon_cp.c
+++ b/bsd/radeon/radeon_cp.c
@@ -30,6 +30,8 @@
#include "radeon.h"
#include "drmP.h"
+#include "drm.h"
+#include "radeon_drm.h"
#include "radeon_drv.h"
#include <vm/vm.h>
@@ -624,7 +626,7 @@ static void radeon_cp_init_ring_buffer( drm_device_t *dev,
RADEON_WRITE( RADEON_CP_RB_RPTR_ADDR,
entry->busaddr[page_ofs]);
- DRM_DEBUG( "ring rptr: offset=0x%08x handle=0x%08lx\n",
+ DRM_DEBUG( "ring rptr: offset=0x%08x handle=0x%08x\n",
entry->busaddr[page_ofs],
entry->handle + tmp_ofs );
}
diff --git a/bsd/radeon/radeon_drv.c b/bsd/radeon/radeon_drv.c
index 61be65f7e..009f90c18 100644
--- a/bsd/radeon/radeon_drv.c
+++ b/bsd/radeon/radeon_drv.c
@@ -36,6 +36,8 @@
#include "radeon.h"
#include "drmP.h"
+#include "drm.h"
+#include "radeon_drm.h"
#include "radeon_drv.h"
#if __REALLY_HAVE_SG
#include "ati_pcigart.h"
diff --git a/bsd/radeon/radeon_state.c b/bsd/radeon/radeon_state.c
index a7e301e70..cbb9d1f6b 100644
--- a/bsd/radeon/radeon_state.c
+++ b/bsd/radeon/radeon_state.c
@@ -29,8 +29,9 @@
#include "radeon.h"
#include "drmP.h"
-#include "radeon_drv.h"
#include "drm.h"
+#include "radeon_drm.h"
+#include "radeon_drv.h"
/* ================================================================
diff --git a/bsd/radeon_drm.h b/bsd/radeon_drm.h
index 81e76b19b..6774b2bc0 100644
--- a/bsd/radeon_drm.h
+++ b/bsd/radeon_drm.h
@@ -236,7 +236,29 @@ typedef struct {
/* WARNING: If you change any of these defines, make sure to change the
* defines in the Xserver file (xf86drmRadeon.h)
+ *
+ * KW: actually it's illegal to change any of this (backwards compatibility).
+ */
+
+/* Radeon specific ioctls
+ * The device specific ioctl range is 0x40 to 0x79.
*/
+#define DRM_IOCTL_RADEON_CP_INIT DRM_IOW( 0x40, drm_radeon_init_t)
+#define DRM_IOCTL_RADEON_CP_START DRM_IO( 0x41)
+#define DRM_IOCTL_RADEON_CP_STOP DRM_IOW( 0x42, drm_radeon_cp_stop_t)
+#define DRM_IOCTL_RADEON_CP_RESET DRM_IO( 0x43)
+#define DRM_IOCTL_RADEON_CP_IDLE DRM_IO( 0x44)
+#define DRM_IOCTL_RADEON_RESET DRM_IO( 0x45)
+#define DRM_IOCTL_RADEON_FULLSCREEN DRM_IOW( 0x46, drm_radeon_fullscreen_t)
+#define DRM_IOCTL_RADEON_SWAP DRM_IO( 0x47)
+#define DRM_IOCTL_RADEON_CLEAR DRM_IOW( 0x48, drm_radeon_clear_t)
+#define DRM_IOCTL_RADEON_VERTEX DRM_IOW( 0x49, drm_radeon_vertex_t)
+#define DRM_IOCTL_RADEON_INDICES DRM_IOW( 0x4a, drm_radeon_indices_t)
+#define DRM_IOCTL_RADEON_STIPPLE DRM_IOW( 0x4c, drm_radeon_stipple_t)
+#define DRM_IOCTL_RADEON_INDIRECT DRM_IOWR(0x4d, drm_radeon_indirect_t)
+#define DRM_IOCTL_RADEON_TEXTURE DRM_IOWR(0x4e, drm_radeon_texture_t)
+#define DRM_IOCTL_RADEON_VERTEX2 DRM_IOW( 0x4f, drm_radeon_vertex_t)
+
typedef struct drm_radeon_init {
enum {
RADEON_INIT_CP = 0x01,
diff --git a/bsd/sis_drm.h b/bsd/sis_drm.h
index db11cf632..21b663501 100644
--- a/bsd/sis_drm.h
+++ b/bsd/sis_drm.h
@@ -2,6 +2,16 @@
#ifndef _sis_drm_public_h_
#define _sis_drm_public_h_
+/* 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)
+
typedef struct {
int context;
unsigned int offset;