summaryrefslogtreecommitdiff
path: root/shared
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2003-10-17 03:14:39 +0000
committerEric Anholt <anholt@freebsd.org>2003-10-17 03:14:39 +0000
commitff58476011ba8fe72d65e884380d3d86710bfdd4 (patch)
treec2855a267ab001340e588ae6b32a55982312cfa0 /shared
parent355b204de0dbc01308bebc77c4c1c0a9a402cded (diff)
- Converted Linux drivers to initialize DRM instances based on PCI IDs, not
just a single instance. Moved the PCI ID lists from <card>_drv.c in BSD to <card>.h. The PCI ID lists include a driver private field, which may be used by drivers for chip family or other information. Based on work by jonsmirl. - Make tdfx_drv.c and tdfx.h match other drivers. - Fixed up linking of sis shared files. Tested with Radeon and SiS on Linux and FreeBSD, including a Linux setup with 2 SiS cards in a machine, but only one head being used (with DRI)
Diffstat (limited to 'shared')
-rw-r--r--shared/mga.h6
-rw-r--r--shared/r128.h20
-rw-r--r--shared/radeon.h37
-rw-r--r--shared/sis.h7
-rw-r--r--shared/tdfx.h60
5 files changed, 130 insertions, 0 deletions
diff --git a/shared/mga.h b/shared/mga.h
index 96179627..696a3b59 100644
--- a/shared/mga.h
+++ b/shared/mga.h
@@ -64,6 +64,12 @@
[DRM_IOCTL_NR(DRM_IOCTL_MGA_BLIT)] = { mga_dma_blit, 1, 0 }, \
[DRM_IOCTL_NR(DRM_IOCTL_MGA_GETPARAM)]= { mga_getparam, 1, 0 },
+#define DRIVER_PCI_IDS \
+ {0x102b, 0x0521, 0, "Matrox G200 (AGP)"}, \
+ {0x102b, 0x0525, 0, "Matrox G400/G450 (AGP)"}, \
+ {0x102b, 0x2527, 0, "Matrox G550 (AGP)"}, \
+ {0, 0, 0, NULL}
+
#define __HAVE_COUNTERS 3
#define __HAVE_COUNTER6 _DRM_STAT_IRQ
#define __HAVE_COUNTER7 _DRM_STAT_PRIMARY
diff --git a/shared/r128.h b/shared/r128.h
index 9c3363bd..2047e4a4 100644
--- a/shared/r128.h
+++ b/shared/r128.h
@@ -79,6 +79,26 @@
[DRM_IOCTL_NR(DRM_IOCTL_R128_INDIRECT)] = { r128_cce_indirect, 1, 1 }, \
[DRM_IOCTL_NR(DRM_IOCTL_R128_GETPARAM)] = { r128_getparam, 1, 0 },
+#define DRIVER_PCI_IDS \
+ {0x1002, 0x4c45, 0, "ATI Rage 128 Mobility LE (PCI)"}, \
+ {0x1002, 0x4c46, 0, "ATI Rage 128 Mobility LF (AGP)"}, \
+ {0x1002, 0x4d46, 0, "ATI Rage 128 Mobility MF (AGP)"}, \
+ {0x1002, 0x4d4c, 0, "ATI Rage 128 Mobility ML (AGP)"}, \
+ {0x1002, 0x5044, 0, "ATI Rage 128 Pro PD (PCI)"}, \
+ {0x1002, 0x5046, 0, "ATI Rage 128 Pro PF (AGP)"}, \
+ {0x1002, 0x5050, 0, "ATI Rage 128 Pro PP (PCI)"}, \
+ {0x1002, 0x5052, 0, "ATI Rage 128 Pro PR (PCI)"}, \
+ {0x1002, 0x5245, 0, "ATI Rage 128 RE (PCI)"}, \
+ {0x1002, 0x5246, 0, "ATI Rage 128 RF (AGP)"}, \
+ {0x1002, 0x5247, 0, "ATI Rage 128 RG (AGP)"}, \
+ {0x1002, 0x524b, 0, "ATI Rage 128 RK (PCI)"}, \
+ {0x1002, 0x524c, 0, "ATI Rage 128 RL (AGP)"}, \
+ {0x1002, 0x534d, 0, "ATI Rage 128 SM (AGP)"}, \
+ {0x1002, 0x5446, 0, "ATI Rage 128 Pro Ultra TF (AGP)"}, \
+ {0x1002, 0x544C, 0, "ATI Rage 128 Pro Ultra TL (AGP)"}, \
+ {0x1002, 0x5452, 0, "ATI Rage 128 Pro Ultra TR (AGP)"}, \
+ {0, 0, 0, NULL}
+
/* Driver customization:
*/
#define DRIVER_PRERELEASE() do { \
diff --git a/shared/radeon.h b/shared/radeon.h
index 440f96e6..e66c11f7 100644
--- a/shared/radeon.h
+++ b/shared/radeon.h
@@ -109,6 +109,43 @@
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_IRQ_EMIT)] = { radeon_irq_emit, 1, 0 }, \
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_IRQ_WAIT)] = { radeon_irq_wait, 1, 0 },
+#define DRIVER_PCI_IDS \
+ {0x1002, 0x4242, 0, "ATI Radeon BB R200 AIW 8500DV"}, \
+ {0x1002, 0x4964, 0, "ATI Radeon Id R250 9000"}, \
+ {0x1002, 0x4965, 0, "ATI Radeon Ie R250 9000"}, \
+ {0x1002, 0x4966, 0, "ATI Radeon If R250 9000"}, \
+ {0x1002, 0x4967, 0, "ATI Radeon Ig R250 9000"}, \
+ {0x1002, 0x4C57, 0, "ATI Radeon LW Mobility 7500 M7"}, \
+ {0x1002, 0x4C58, 0, "ATI Radeon LX RV200 Mobility FireGL 7800 M7"}, \
+ {0x1002, 0x4C59, 0, "ATI Radeon LY Mobility M6"}, \
+ {0x1002, 0x4C5A, 0, "ATI Radeon LZ Mobility M6"}, \
+ {0x1002, 0x4C64, 0, "ATI Radeon Ld R250 Mobility 9000 M9"}, \
+ {0x1002, 0x4C65, 0, "ATI Radeon Le R250 Mobility 9000 M9"}, \
+ {0x1002, 0x4C66, 0, "ATI Radeon Lf R250 Mobility 9000 M9"}, \
+ {0x1002, 0x4C67, 0, "ATI Radeon Lg R250 Mobility 9000 M9"}, \
+ {0x1002, 0x5144, 0, "ATI Radeon QD R100"}, \
+ {0x1002, 0x5145, 0, "ATI Radeon QE R100"}, \
+ {0x1002, 0x5146, 0, "ATI Radeon QF R100"}, \
+ {0x1002, 0x5147, 0, "ATI Radeon QG R100"}, \
+ {0x1002, 0x5148, 0, "ATI Radeon QH R200 8500"}, \
+ {0x1002, 0x5149, 0, "ATI Radeon QI R200"}, \
+ {0x1002, 0x514A, 0, "ATI Radeon QJ R200"}, \
+ {0x1002, 0x514B, 0, "ATI Radeon QK R200"}, \
+ {0x1002, 0x514C, 0, "ATI Radeon QL R200 8500 LE"}, \
+ {0x1002, 0x514D, 0, "ATI Radeon QM R200 9100"}, \
+ {0x1002, 0x514E, 0, "ATI Radeon QN R200 8500 LE"}, \
+ {0x1002, 0x514F, 0, "ATI Radeon QO R200 8500 LE"}, \
+ {0x1002, 0x5157, 0, "ATI Radeon QW RV200 7500"}, \
+ {0x1002, 0x5158, 0, "ATI Radeon QX RV200 7500"}, \
+ {0x1002, 0x5159, 0, "ATI Radeon QY RV100 7000/VE"}, \
+ {0x1002, 0x515A, 0, "ATI Radeon QZ RV100 7000/VE"}, \
+ {0x1002, 0x5168, 0, "ATI Radeon Qh R200"}, \
+ {0x1002, 0x5169, 0, "ATI Radeon Qi R200"}, \
+ {0x1002, 0x516A, 0, "ATI Radeon Qj R200"}, \
+ {0x1002, 0x516B, 0, "ATI Radeon Qk R200"}, \
+ {0x1002, 0x516C, 0, "ATI Radeon Ql R200"}, \
+ {0x1002, 0x5961, 0, "ATI Radeon RV280 9200"}, \
+ {0, 0, 0, NULL}
/* When a client dies:
diff --git a/shared/sis.h b/shared/sis.h
index 7bdc99c0..67b4c459 100644
--- a/shared/sis.h
+++ b/shared/sis.h
@@ -62,6 +62,13 @@
[DRM_IOCTL_NR(DRM_IOCTL_SIS_AGP_FREE)] = { sis_ioctl_agp_free, 1, 0 }, \
[DRM_IOCTL_NR(DRM_IOCTL_SIS_FB_INIT)] = { sis_fb_init, 1, 1 }
+#define DRIVER_PCI_IDS \
+ {0x1039, 0x0300, 0, "SiS 300"}, \
+ {0x1039, 0x5300, 0, "SiS 540"}, \
+ {0x1039, 0x6300, 0, "SiS 630"}, \
+ {0x1039, 0x7300, 0, "SiS 730"}, \
+ {0, 0, 0, NULL}
+
#define __HAVE_COUNTERS 5
/* Buffer customization:
diff --git a/shared/tdfx.h b/shared/tdfx.h
new file mode 100644
index 00000000..642b08dc
--- /dev/null
+++ b/shared/tdfx.h
@@ -0,0 +1,60 @@
+/* tdfx.h -- 3dfx DRM template customization -*- linux-c -*-
+ * Created: Wed Feb 14 12:32:32 2001 by gareth@valinux.com
+ *
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ * Gareth Hughes <gareth@valinux.com>
+ */
+
+#ifndef __TDFX_H__
+#define __TDFX_H__
+
+/* This remains constant for all DRM template files.
+ */
+#define DRM(x) tdfx_##x
+
+/* General customization:
+ */
+#define __HAVE_MTRR 1
+#define __HAVE_CTX_BITMAP 1
+
+#define DRIVER_AUTHOR "VA Linux Systems Inc."
+
+#define DRIVER_NAME "tdfx"
+#define DRIVER_DESC "3dfx Banshee/Voodoo3+"
+#define DRIVER_DATE "20010216"
+
+#define DRIVER_MAJOR 1
+#define DRIVER_MINOR 0
+#define DRIVER_PATCHLEVEL 0
+
+#define DRIVER_PCI_IDS \
+ {0x121a, 0x0003, 0, "3dfx Voodoo Banshee"}, \
+ {0x121a, 0x0004, 0, "3dfx Voodoo3 2000"}, \
+ {0x121a, 0x0005, 0, "3dfx Voodoo3 3000"}, \
+ {0x121a, 0x0007, 0, "3dfx Voodoo4"}, \
+ {0x121a, 0x0009, 0, "3dfx Voodoo5"}, \
+ {0, 0, 0, NULL}
+
+#endif