xf86-video-nv: src/Makefile.am src/nv_include.h src/nv_video.c src/pci_ids.h src/riva_include.h

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jul 26 02:07:04 UTC 2022


 src/Makefile.am    |    1 
 src/nv_include.h   |    4 +-
 src/nv_video.c     |    2 -
 src/pci_ids.h      |   77 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 src/riva_include.h |    2 -
 5 files changed, 82 insertions(+), 4 deletions(-)

New commits:
commit b9f256b16f74b898d311c0ca310afc75456b73c9
Author: Yusuf <yusisamerican at gmail.com>
Date:   Fri Jun 24 18:46:06 2022 -0500

    Replace xf86PciInfo.h with our own pci ids
    
    Signed-off-by: YusufKhan-improves-things's avatarYusuf Khan <yusisamerican at gmail.com>
    ---
    v2: Add header to Makefile
    
    v3: commit v2

diff --git a/src/Makefile.am b/src/Makefile.am
index 0143af7..456481c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -32,6 +32,7 @@ nv_drv_la_SOURCES = $(nv_sources) $(riva_sources) $(g80_sources)
 
 nv_sources = \
          compat-api.h \
+         pci_ids.h \
          nv_const.h \
          nv_cursor.c \
          nv_dac.c \
diff --git a/src/nv_include.h b/src/nv_include.h
index 72c74d5..a51ef96 100644
--- a/src/nv_include.h
+++ b/src/nv_include.h
@@ -15,8 +15,8 @@
 #endif
 #include "compiler.h"
 
-/* Drivers for PCI hardware need this */
-#include "xf86PciInfo.h"
+/* PCI IDS */
+#include "pci_ids.h"
 
 /* Drivers that need to access the PCI config space directly need this */
 #include "xf86Pci.h"
diff --git a/src/nv_video.c b/src/nv_video.c
index 0988b0e..6600aa7 100644
--- a/src/nv_video.c
+++ b/src/nv_video.c
@@ -5,7 +5,7 @@
 #include "xf86.h"
 #include "xf86_OSproc.h"
 #include "compiler.h"
-#include "xf86PciInfo.h"
+#include "pci_ids.h"
 #include "xf86Pci.h"
 #include "xf86fbman.h"
 #include "regionstr.h"
diff --git a/src/pci_ids.h b/src/pci_ids.h
new file mode 100644
index 0000000..ab1c707
--- /dev/null
+++ b/src/pci_ids.h
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 1995-2003 by The XFree86 Project, Inc.
+ *
+ * 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 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
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) 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.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+
+/* VENDOR */
+#define PCI_VENDOR_NVIDIA               0x10DE
+#define PCI_VENDOR_NVIDIA_SGS           0x12D2
+
+/* DEVICE */
+#define PCI_CHIP_NV1                    0x0008
+#define PCI_CHIP_DAC64                  0x0009
+#define PCI_CHIP_TNT                    0x0020
+#define PCI_CHIP_TNT2                   0x0028
+#define PCI_CHIP_UTNT2                  0x0029
+#define PCI_CHIP_VTNT2                  0x002C
+#define PCI_CHIP_UVTNT2                 0x002D
+#define PCI_CHIP_ITNT2                  0x00A0
+#define PCI_CHIP_GEFORCE_256            0x0100
+#define PCI_CHIP_GEFORCE_DDR            0x0101
+#define PCI_CHIP_QUADRO                 0x0103
+#define PCI_CHIP_GEFORCE2_MX            0x0110
+#define PCI_CHIP_GEFORCE2_MX_100        0x0111
+#define PCI_CHIP_GEFORCE2_GO            0x0112
+#define PCI_CHIP_QUADRO2_MXR            0x0113
+#define PCI_CHIP_GEFORCE2_GTS           0x0150
+#define PCI_CHIP_GEFORCE2_TI            0x0151
+#define PCI_CHIP_GEFORCE2_ULTRA         0x0152
+#define PCI_CHIP_QUADRO2_PRO            0x0153
+#define PCI_CHIP_GEFORCE4_MX_460        0x0170
+#define PCI_CHIP_GEFORCE4_MX_440        0x0171
+#define PCI_CHIP_GEFORCE4_MX_420        0x0172
+#define PCI_CHIP_GEFORCE4_440_GO        0x0174
+#define PCI_CHIP_GEFORCE4_420_GO        0x0175
+#define PCI_CHIP_GEFORCE4_420_GO_M32    0x0176
+#define PCI_CHIP_QUADRO4_500XGL         0x0178
+#define PCI_CHIP_GEFORCE4_440_GO_M64    0x0179
+#define PCI_CHIP_QUADRO4_200            0x017A
+#define PCI_CHIP_QUADRO4_550XGL         0x017B
+#define PCI_CHIP_QUADRO4_500_GOGL       0x017C
+#define PCI_CHIP_IGEFORCE2              0x01A0
+#define PCI_CHIP_GEFORCE3               0x0200
+#define PCI_CHIP_GEFORCE3_TI_200        0x0201
+#define PCI_CHIP_GEFORCE3_TI_500        0x0202
+#define PCI_CHIP_QUADRO_DCC             0x0203
+#define PCI_CHIP_GEFORCE4_TI_4600       0x0250
+#define PCI_CHIP_GEFORCE4_TI_4400       0x0251
+#define PCI_CHIP_GEFORCE4_TI_4200       0x0253
+#define PCI_CHIP_QUADRO4_900XGL         0x0258
+#define PCI_CHIP_QUADRO4_750XGL         0x0259
+#define PCI_CHIP_QUADRO4_700XGL         0x025B
+
+/* NVIDIA & SGS */
+#define PCI_CHIP_RIVA128                0x0018
diff --git a/src/riva_include.h b/src/riva_include.h
index c7aeef7..2ea1180 100644
--- a/src/riva_include.h
+++ b/src/riva_include.h
@@ -14,7 +14,7 @@
 #include "compiler.h"
 
 /* Drivers for PCI hardware need this */
-#include "xf86PciInfo.h"
+#include "pci_ids.h"
 
 /* Drivers that need to access the PCI config space directly need this */
 #include "xf86Pci.h"


More information about the xorg-commit mailing list