Index: modules/Makefile =================================================================== RCS file: /home/ncvs/src/sys/modules/Makefile,v retrieving revision 1.110.2.69 diff -u -r1.110.2.69 Makefile --- modules/Makefile 15 Apr 2003 18:15:08 -0000 1.110.2.69 +++ modules/Makefile 25 Apr 2003 00:24:54 -0000 @@ -137,6 +137,7 @@ SUBDIR+=aac \ asr \ ciss \ + drm \ mly \ vesa Index: i386/conf/LINT =================================================================== RCS file: /home/ncvs/src/sys/i386/conf/Attic/LINT,v retrieving revision 1.749.2.142 diff -u -r1.749.2.142 LINT --- i386/conf/LINT 15 Apr 2003 18:15:07 -0000 1.749.2.142 +++ i386/conf/LINT 25 Apr 2003 02:59:21 -0000 @@ -2735,6 +2735,23 @@ device hifn # Hifn 7951, 7781, etc. device ubsec # Broadcom 5501, 5601, 58xx +# DRM options: +# mgadrm: AGP Matrox G200, G400, G450, G550 +# tdfxdrm: 3dfx Voodoo 3/4/5 and Banshee +# r128drm: ATI Rage 128 +# radeondrm: ATI Radeon up to 9000/9100 +# DRM_DEBUG: include debug printfs, very slow +# +# mga requires AGP in the kernel, and it is recommended +# for AGP r128 and radeon cards. + +device mgadrm +device "r128drm" +device radeondrm +device tdfxdrm + +options DRM_DEBUG + # # Embedded system options: # Index: conf/files =================================================================== RCS file: /home/ncvs/src/sys/conf/files,v retrieving revision 1.340.2.134 diff -u -r1.340.2.134 files --- conf/files 15 Apr 2003 18:15:07 -0000 1.340.2.134 +++ conf/files 25 Apr 2003 00:24:15 -0000 @@ -1408,4 +1408,19 @@ opencrypto/xform.c optional crypto dev/ubsec/ubsec.c optional ubsec dev/hifn/hifn7751.c optional hifn +dev/drm/mga_dma.c optional mgadrm +dev/drm/mga_drv.c optional mgadrm +dev/drm/mga_irq.c optional mgadrm +dev/drm/mga_state.c optional mgadrm +dev/drm/mga_warp.c optional mgadrm +dev/drm/r128_cce.c optional r128drm +dev/drm/r128_drv.c optional r128drm +dev/drm/r128_irq.c optional r128drm +dev/drm/r128_state.c optional r128drm +dev/drm/radeon_cp.c optional radeondrm +dev/drm/radeon_drv.c optional radeondrm +dev/drm/radeon_irq.c optional radeondrm +dev/drm/radeon_mem.c optional radeondrm +dev/drm/radeon_state.c optional radeondrm +dev/drm/tdfx_drv.c optional tdfxdrm Index: conf/options =================================================================== RCS file: /home/ncvs/src/sys/conf/options,v retrieving revision 1.191.2.51 diff -u -r1.191.2.51 options --- conf/options 15 Apr 2003 06:33:06 -0000 1.191.2.51 +++ conf/options 25 Apr 2003 02:58:49 -0000 @@ -330,6 +330,9 @@ NETGRAPH_UI opt_netgraph.h NETGRAPH_VJC opt_netgraph.h +# DRM options +DRM_DEBUG opt_drm.h + # ATM (HARP version) ATM_CORE opt_atm.h ATM_IP opt_atm.h Index: compat/linux/linux_ioctl.c =================================================================== RCS file: /home/ncvs/src/sys/compat/linux/linux_ioctl.c,v retrieving revision 1.55.2.10 diff -u -r1.55.2.10 linux_ioctl.c --- compat/linux/linux_ioctl.c 11 Feb 2002 04:48:51 -0000 1.55.2.10 +++ compat/linux/linux_ioctl.c 25 Apr 2003 04:03:20 -0000 @@ -66,6 +66,7 @@ static linux_ioctl_function_t linux_ioctl_sound; static linux_ioctl_function_t linux_ioctl_termio; static linux_ioctl_function_t linux_ioctl_private; +static linux_ioctl_function_t linux_ioctl_drm; static linux_ioctl_function_t linux_ioctl_special; static struct linux_ioctl_handler cdrom_handler = @@ -82,6 +83,8 @@ { linux_ioctl_termio, LINUX_IOCTL_TERMIO_MIN, LINUX_IOCTL_TERMIO_MAX }; static struct linux_ioctl_handler private_handler = { linux_ioctl_private, LINUX_IOCTL_PRIVATE_MIN, LINUX_IOCTL_PRIVATE_MAX }; +static struct linux_ioctl_handler drm_handler = +{ linux_ioctl_drm, LINUX_IOCTL_DRM_MIN, LINUX_IOCTL_DRM_MAX }; DATA_SET(linux_ioctl_handler_set, cdrom_handler); DATA_SET(linux_ioctl_handler_set, console_handler); @@ -90,6 +93,7 @@ DATA_SET(linux_ioctl_handler_set, sound_handler); DATA_SET(linux_ioctl_handler_set, termio_handler); DATA_SET(linux_ioctl_handler_set, private_handler); +DATA_SET(linux_ioctl_handler_set, drm_handler); struct handler_element { @@ -1787,6 +1791,16 @@ if (type == DTYPE_SOCKET) return (linux_ioctl_socket(p, args)); return (ENOIOCTL); +} + +/* + * DRM ioctl handler (sys/dev/drm) + */ +static int +linux_ioctl_drm(struct proc *p, struct linux_ioctl_args *args) +{ + args->cmd = SETDIR(args->cmd); + return ioctl(p, (struct ioctl_args *)args); } /* Index: compat/linux/linux_ioctl.h =================================================================== RCS file: /home/ncvs/src/sys/compat/linux/linux_ioctl.h,v retrieving revision 1.4.2.3 diff -u -r1.4.2.3 linux_ioctl.h --- compat/linux/linux_ioctl.h 22 Nov 2001 12:36:33 -0000 1.4.2.3 +++ compat/linux/linux_ioctl.h 25 Apr 2003 03:33:15 -0000 @@ -624,6 +624,9 @@ #define LINUX_ASYNC_CALLOUT_NOHUP 0x0400 #define LINUX_ASYNC_FLAGS 0x0FFF +#define LINUX_IOCTL_DRM_MIN 0x6400 +#define LINUX_IOCTL_DRM_MAX 0x64ff + /* * This doesn't really belong here, but I can't think of a better * place to put it.