summaryrefslogtreecommitdiffstats
path: root/sys/dev/drm/tdfx_drv.c
diff options
context:
space:
mode:
authoranholt <anholt@FreeBSD.org>2003-03-09 02:08:30 +0000
committeranholt <anholt@FreeBSD.org>2003-03-09 02:08:30 +0000
commitccdf4ef2d9288d035e56820efb0e79db6acf5ba8 (patch)
treeef9d3b03548e9f28bd5c265be746871660c0c16a /sys/dev/drm/tdfx_drv.c
parent0b60094f80a8137660b368df0b80fb0179b92d04 (diff)
downloadFreeBSD-src-ccdf4ef2d9288d035e56820efb0e79db6acf5ba8.zip
FreeBSD-src-ccdf4ef2d9288d035e56820efb0e79db6acf5ba8.tar.gz
Update the DRM to latest from DRI CVS. This is approximately the version
included in XFree86 4.3, but includes some fixes. Notable changes include Radeon 8500-9100 support, PCI Radeon/Rage 128 support, transform & lighting support for Radeons, and vblank syncing support for r128, radeon, and mga. The gamma driver was removed due to lack of any users.
Diffstat (limited to 'sys/dev/drm/tdfx_drv.c')
-rw-r--r--sys/dev/drm/tdfx_drv.c61
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__ */
OpenPOWER on IntegriCloud