diff options
Diffstat (limited to 'sys/dev/drm/tdfx_drv.c')
-rw-r--r-- | sys/dev/drm/tdfx_drv.c | 61 |
1 files changed, 5 insertions, 56 deletions
diff --git a/sys/dev/drm/tdfx_drv.c b/sys/dev/drm/tdfx_drv.c index 359cfc2..296777e 100644 --- a/sys/dev/drm/tdfx_drv.c +++ b/sys/dev/drm/tdfx_drv.c @@ -32,16 +32,6 @@ * $FreeBSD$ */ -#ifdef __linux__ -#include <linux/config.h> -#endif /* __linux__ */ - -#ifdef __FreeBSD__ -#include <sys/types.h> -#include <sys/bus.h> -#include <pci/pcivar.h> -#endif /* __FreeBSD__ */ - #include "dev/drm/tdfx.h" #include "dev/drm/drmP.h" @@ -74,10 +64,8 @@ #define PCI_DEVICE_ID_3DFX_BANSHEE 0x0003 #endif -#ifdef __FreeBSD__ -/* List acquired from xc/xc/programs/Xserver/hw/xfree86/common/xf86PciInfo.h - * Please report to eanholt@gladstone.uoregon.edu if your chip isn't - * represented in the list or if the information is incorrect. +/* List acquired from http://www.yourvote.com/pci/pcihdr.h and xc/xc/programs/Xserver/hw/xfree86/common/xf86PciInfo.h + * Please report to anholt@teleport.com inaccuracies or if a chip you have works that is marked unsupported here. */ drm_chipinfo_t DRM(devicelist)[] = { {0x121a, 0x0003, 1, "3dfx Voodoo Banshee"}, @@ -87,22 +75,7 @@ drm_chipinfo_t DRM(devicelist)[] = { {0x121a, 0x0009, 1, "3dfx Voodoo5"}, {0, 0, 0, NULL} }; -#endif /* __FreeBSD__ */ - -#ifdef __linux__ -/* For now, we'll only support multihead on Linux */ -/* Uncomment this, and fixup drm_count_cards */ -static drm_pci_list_t DRM(idlist)[] = { - { PCI_VENDOR_ID_3DFX, PCI_DEVICE_ID_3DFX_BANSHEE }, - { PCI_VENDOR_ID_3DFX, PCI_DEVICE_ID_3DFX_VOODOO3_2000 }, - { PCI_VENDOR_ID_3DFX, PCI_DEVICE_ID_3DFX_VOODOO3_3000 }, - { PCI_VENDOR_ID_3DFX, PCI_DEVICE_ID_3DFX_VOODOO4 }, - { PCI_VENDOR_ID_3DFX, PCI_DEVICE_ID_3DFX_VOODOO5 }, - { 0, 0 } -}; -#define DRIVER_CARD_LIST DRM(idlist) -#endif /* __linux__ */ #include "dev/drm/drm_auth.h" #include "dev/drm/drm_bufs.h" @@ -111,41 +84,17 @@ static drm_pci_list_t DRM(idlist)[] = { #include "dev/drm/drm_drawable.h" #include "dev/drm/drm_drv.h" -#ifdef __linux__ -#ifndef MODULE -/* DRM(options) is called by the kernel to parse command-line options - * passed via the boot-loader (e.g., LILO). It calls the insmod option - * routine, drm_parse_drm. - */ - -/* JH- We have to hand expand the string ourselves because of the cpp. If - * anyone can think of a way that we can fit into the __setup macro without - * changing it, then please send the solution my way. - */ -static int __init tdfx_options( char *str ) -{ - DRM(parse_options)( str ); - return 1; -} - -__setup( DRIVER_NAME "=", tdfx_options ); -#endif -#endif /* __linux__ */ #include "dev/drm/drm_fops.h" #include "dev/drm/drm_init.h" #include "dev/drm/drm_ioctl.h" #include "dev/drm/drm_lock.h" #include "dev/drm/drm_memory.h" -#ifdef __linux__ -#include "dev/drm/drm_proc.h" -#endif /* __linux__ */ #include "dev/drm/drm_vm.h" -#ifdef __linux__ -#include "dev/drm/drm_stub.h" -#endif /* __linux__ */ -#ifdef __FreeBSD__ #include "dev/drm/drm_sysctl.h" +#ifdef __FreeBSD__ DRIVER_MODULE(tdfx, pci, tdfx_driver, tdfx_devclass, 0, 0); +#elif defined(__NetBSD__) +CFDRIVER_DECL(tdfx, DV_TTY, NULL); #endif /* __FreeBSD__ */ |