From 9b2b2337b3caa006fa95eecb966b8a68eed83b90 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 24 Apr 2003 00:46:03 +0000 Subject: Move one definition to drm_drv.h and remove the rest of drm_init.h which was all unused. --- bsd-core/drmP.h | 2 -- bsd-core/drm_drv.c | 6 +++++ bsd-core/drm_fops.c | 2 -- bsd-core/mga_drv.c | 9 +++++--- bsd-core/r128_drv.c | 10 +++++---- bsd-core/radeon_drv.c | 62 ++++++++++++++++++++++++++++----------------------- bsd-core/tdfx_drv.c | 8 +++---- 7 files changed, 56 insertions(+), 43 deletions(-) (limited to 'bsd-core') diff --git a/bsd-core/drmP.h b/bsd-core/drmP.h index 59994b64..69726f68 100644 --- a/bsd-core/drmP.h +++ b/bsd-core/drmP.h @@ -470,8 +470,6 @@ struct drm_device { }; extern int DRM(flags); -extern void DRM(parse_options)( char *s ); -extern int DRM(cpu_valid)( void ); /* Authentication (drm_auth.h) */ extern int DRM(add_magic)(drm_device_t *dev, drm_file_t *priv, diff --git a/bsd-core/drm_drv.c b/bsd-core/drm_drv.c index 4fd47b7d..e2c32dab 100644 --- a/bsd-core/drm_drv.c +++ b/bsd-core/drm_drv.c @@ -127,6 +127,12 @@ #define DRIVER_NUM_CARDS 1 #endif +#if 1 && DRM_DEBUG_CODE +int DRM(flags) = DRM_FLAG_DEBUG; +#else +int DRM(flags) = 0; +#endif + static int DRM(init)(device_t nbdev); static void DRM(cleanup)(device_t nbdev); diff --git a/bsd-core/drm_fops.c b/bsd-core/drm_fops.c index b0c18fa3..1dcc55e0 100644 --- a/bsd-core/drm_fops.c +++ b/bsd-core/drm_fops.c @@ -62,8 +62,6 @@ int DRM(open_helper)(dev_t kdev, int flags, int fmt, DRM_STRUCTPROC *p, if (flags & O_EXCL) return EBUSY; /* No exclusive opens */ dev->flags = flags; - if (!DRM(cpu_valid)()) - return DRM_ERR(EINVAL); DRM_DEBUG("pid = %d, minor = %d\n", DRM_CURRENTPID, m); diff --git a/bsd-core/mga_drv.c b/bsd-core/mga_drv.c index 8b69b41b..324c9129 100644 --- a/bsd-core/mga_drv.c +++ b/bsd-core/mga_drv.c @@ -27,10 +27,10 @@ * Authors: * Rickard E. (Rik) Faith * Gareth Hughes + * + * $FreeBSD: src/sys/dev/drm/mga_drv.c,v 1.4 2003/03/09 02:08:28 anholt Exp $ */ -#include - #include "mga.h" #include "drmP.h" #include "drm.h" @@ -56,11 +56,14 @@ drm_chipinfo_t DRM(devicelist)[] = { #include "drm_drawable.h" #include "drm_drv.h" #include "drm_fops.h" -#include "drm_init.h" #include "drm_ioctl.h" #include "drm_lock.h" #include "drm_memory.h" #include "drm_vm.h" #include "drm_sysctl.h" +#ifdef __FreeBSD__ DRIVER_MODULE(mga, pci, mga_driver, mga_devclass, 0, 0); +#elif defined(__NetBSD__) +CFDRIVER_DECL(mga, DV_TTY, NULL); +#endif diff --git a/bsd-core/r128_drv.c b/bsd-core/r128_drv.c index 1a8046fb..031310c3 100644 --- a/bsd-core/r128_drv.c +++ b/bsd-core/r128_drv.c @@ -27,11 +27,10 @@ * Authors: * Rickard E. (Rik) Faith * Gareth Hughes + * + * $FreeBSD: src/sys/dev/drm/r128_drv.c,v 1.4 2003/03/09 02:08:28 anholt Exp $ */ - -#include - #include "r128.h" #include "drmP.h" #include "drm.h" @@ -73,7 +72,6 @@ drm_chipinfo_t DRM(devicelist)[] = { #include "drm_drawable.h" #include "drm_drv.h" #include "drm_fops.h" -#include "drm_init.h" #include "drm_ioctl.h" #include "drm_lock.h" #include "drm_memory.h" @@ -83,4 +81,8 @@ drm_chipinfo_t DRM(devicelist)[] = { #include "drm_scatter.h" #endif +#ifdef __FreeBSD__ DRIVER_MODULE(r128, pci, r128_driver, r128_devclass, 0, 0); +#elif defined(__NetBSD__) +CFDRIVER_DECL(r128, DV_TTY, NULL); +#endif /* __FreeBSD__ */ diff --git a/bsd-core/radeon_drv.c b/bsd-core/radeon_drv.c index a253b9cb..607dff21 100644 --- a/bsd-core/radeon_drv.c +++ b/bsd-core/radeon_drv.c @@ -25,10 +25,10 @@ * * Authors: * Gareth Hughes + * + * $FreeBSD: src/sys/dev/drm/radeon_drv.c,v 1.5 2003/03/11 01:38:17 anholt Exp $ */ -#include - #include "radeon.h" #include "drmP.h" #include "drm.h" @@ -39,38 +39,41 @@ #endif drm_chipinfo_t DRM(devicelist)[] = { - {0x1002, 0x4242, 1, "ATI Radeon BB AIW 8500DV (AGP)"}, - {0x1002, 0x4336, 1, "ATI Radeon Mobility"}, - {0x1002, 0x4964, 1, "ATI Radeon Id 9000"}, - {0x1002, 0x4965, 1, "ATI Radeon Ie 9000"}, - {0x1002, 0x4966, 1, "ATI Radeon If 9000"}, - {0x1002, 0x4967, 1, "ATI Radeon Ig 9000"}, - {0x1002, 0x496e, 1, "ATI Radeon Ig 9000"}, - {0x1002, 0x4C57, 1, "ATI Radeon LW Mobility 7 (AGP)"}, - {0x1002, 0x4C58, 1, "ATI Radeon LX Mobility 7 (AGP)"}, - {0x1002, 0x4C59, 1, "ATI Radeon LY Mobility 6 (AGP)"}, - {0x1002, 0x4C5A, 1, "ATI Radeon LZ Mobility 6 (AGP)"}, - {0x1002, 0x4C64, 1, "ATI Radeon Ld Mobility 9000 (AGP)"}, - {0x1002, 0x4C65, 1, "ATI Radeon Le Mobility 9000 (AGP)"}, - {0x1002, 0x4C66, 1, "ATI Radeon Lf Mobility 9000 (AGP)"}, - {0x1002, 0x4C67, 1, "ATI Radeon Lg Mobility 9000 (AGP)"}, - {0x1002, 0x5144, 1, "ATI Radeon QD R100 (AGP)"}, - {0x1002, 0x5145, 1, "ATI Radeon QE R100 (AGP)"}, - {0x1002, 0x5146, 1, "ATI Radeon QF R100 (AGP)"}, - {0x1002, 0x5147, 1, "ATI Radeon QG R100 (AGP)"}, - {0x1002, 0x5148, 1, "ATI Radeon QH FireGL 8x00 (AGP)"}, + {0x1002, 0x4242, 1, "ATI Radeon BB R200 AIW 8500DV"}, + {0x1002, 0x4336, 1, "ATI Radeon Mobility U1"}, + {0x1002, 0x4964, 1, "ATI Radeon Id R250 9000"}, + {0x1002, 0x4965, 1, "ATI Radeon Ie R250 9000"}, + {0x1002, 0x4966, 1, "ATI Radeon If R250 9000"}, + {0x1002, 0x4967, 1, "ATI Radeon Ig R250 9000"}, + {0x1002, 0x4C57, 1, "ATI Radeon LW Mobility 7500 M7"}, + {0x1002, 0x4C58, 1, "ATI Radeon LX RV200 Mobility FireGL 7800 M7"}, + {0x1002, 0x4C59, 1, "ATI Radeon LY Mobility M6"}, + {0x1002, 0x4C5A, 1, "ATI Radeon LZ Mobility M6"}, + {0x1002, 0x4C64, 1, "ATI Radeon Ld R250 Mobility 9000 M9"}, + {0x1002, 0x4C65, 1, "ATI Radeon Le R250 Mobility 9000 M9"}, + {0x1002, 0x4C66, 1, "ATI Radeon Lf R250 Mobility 9000 M9"}, + {0x1002, 0x4C67, 1, "ATI Radeon Lg R250 Mobility 9000 M9"}, + {0x1002, 0x5144, 1, "ATI Radeon QD R100"}, + {0x1002, 0x5145, 1, "ATI Radeon QE R100"}, + {0x1002, 0x5146, 1, "ATI Radeon QF R100"}, + {0x1002, 0x5147, 1, "ATI Radeon QG R100"}, + {0x1002, 0x5148, 1, "ATI Radeon QH FireGL 8x00"}, {0x1002, 0x5149, 1, "ATI Radeon QI R200"}, {0x1002, 0x514A, 1, "ATI Radeon QJ R200"}, {0x1002, 0x514B, 1, "ATI Radeon QK R200"}, - {0x1002, 0x514C, 1, "ATI Radeon QL 8500 (AGP)"}, - {0x1002, 0x5157, 1, "ATI Radeon QW 7500 (AGP)"}, - {0x1002, 0x5158, 1, "ATI Radeon QX 7500 (AGP)"}, - {0x1002, 0x5159, 1, "ATI Radeon QY VE (AGP)"}, - {0x1002, 0x515A, 1, "ATI Radeon QZ VE (AGP)"}, + {0x1002, 0x514C, 1, "ATI Radeon QL R200 8500 LE"}, + {0x1002, 0x514D, 1, "ATI Radeon QM R200 9100"}, + {0x1002, 0x514E, 1, "ATI Radeon QN R200 8500 LE"}, + {0x1002, 0x514F, 1, "ATI Radeon QO R200 8500 LE"}, + {0x1002, 0x5157, 1, "ATI Radeon QW RV200 7500"}, + {0x1002, 0x5158, 1, "ATI Radeon QX RV200 7500"}, + {0x1002, 0x5159, 1, "ATI Radeon QY RV100 VE"}, + {0x1002, 0x515A, 1, "ATI Radeon QZ RV100 VE"}, {0x1002, 0x5168, 1, "ATI Radeon Qh R200"}, {0x1002, 0x5169, 1, "ATI Radeon Qi R200"}, {0x1002, 0x516A, 1, "ATI Radeon Qj R200"}, {0x1002, 0x516B, 1, "ATI Radeon Qk R200"}, + {0x1002, 0x516C, 1, "ATI Radeon Ql R200"}, {0, 0, 0, NULL} }; @@ -82,7 +85,6 @@ drm_chipinfo_t DRM(devicelist)[] = { #include "drm_drawable.h" #include "drm_drv.h" #include "drm_fops.h" -#include "drm_init.h" #include "drm_ioctl.h" #include "drm_lock.h" #include "drm_memory.h" @@ -92,4 +94,8 @@ drm_chipinfo_t DRM(devicelist)[] = { #include "drm_scatter.h" #endif +#ifdef __FreeBSD__ DRIVER_MODULE(DRIVER_NAME, pci, DRM(driver), DRM(devclass), 0, 0); +#elif defined(__NetBSD__) +CFDRIVER_DECL(radeon, DV_TTY, NULL); +#endif /* __FreeBSD__ */ diff --git a/bsd-core/tdfx_drv.c b/bsd-core/tdfx_drv.c index 8bc8c57d..967941ac 100644 --- a/bsd-core/tdfx_drv.c +++ b/bsd-core/tdfx_drv.c @@ -28,11 +28,10 @@ * Rickard E. (Rik) Faith * Daryll Strauss * Gareth Hughes + * + * $FreeBSD: src/sys/dev/drm/tdfx_drv.c,v 1.3 2003/03/09 02:08:28 anholt Exp $ */ - -#include - #include "tdfx.h" #include "drmP.h" @@ -87,7 +86,6 @@ drm_chipinfo_t DRM(devicelist)[] = { #include "drm_fops.h" -#include "drm_init.h" #include "drm_ioctl.h" #include "drm_lock.h" #include "drm_memory.h" @@ -96,4 +94,6 @@ drm_chipinfo_t DRM(devicelist)[] = { #ifdef __FreeBSD__ DRIVER_MODULE(tdfx, pci, tdfx_driver, tdfx_devclass, 0, 0); +#elif defined(__NetBSD__) +CFDRIVER_DECL(tdfx, DV_TTY, NULL); #endif /* __FreeBSD__ */ -- cgit v1.2.3