[PATCH] Matrox G100/G200, VIA VT82C598 recognition in /proc/pci

Matthias Andree (mandree@sx1.HRZ.Uni-Dortmund.DE)
Thu, 3 Dec 1998 04:18:21 +0100


--5mCyUwZo2JvN/JJP
Content-Type: text/plain; charset=us-ascii

Attached below you will find two patches which enable /proc/pci to
recognize:

* Matrox G100 multi-monitor and AGP devices
* Matrox G200 PCI and AGP devices
* Via Technologies VIA Apollo MVP3 VT52C598 AGP PCI-to-PCI bridge
recognition

One patch is for 2.1.130 (tested), the other for 2.0.36 (untested).
Please check carefully if drivers/pci/pci.c in 2.0.36 conforms to the
linear ascending sort order within the device list (it is performed
binary search upon). I cannot currently test against 2.0.36, since I
somehow mis-patched something and haven't yet restored the 2.0.x
sources.

I hope this patch - the patches to pci.h in particular - do(es) not
clash with #defines for recent Matrox Gx00 frame buffer accelerators.
Seem fine however.

Another, still unresolved, issue is the misdetection of the VIA Apollo
MVP3 host bridge as VP3 (VT82C597): although the documentation
available from via (598.pdf) claims the MVP3 identifies as id==0x0598,
my two chipsets (PC Chips M577, Tyan S1590B Trinity 100AT) both return
id==0x0597 rev. 4; and I have not the faintest trace of a clue why it
does so. I have contacted VIA Technologies Tech Support three days ago,
but nobody has answered yet.

If you send answers, please Cc: to my mail box. Thank you.

-- 
Matthias Andree

--5mCyUwZo2JvN/JJP Content-Type: text/plain; charset=us-ascii Content-Description: Patch against 2.1.130, detects Matrox G-100/200 cards and Via Apollo MVP3 in /proc/pci Content-Disposition: attachment; filename="matrox-via-pci-2.1.130.diff"

diff -r -u linux-2.1.130/drivers/pci/oldproc.c linux-2.1.130-ma/drivers/pci/oldproc.c --- linux-2.1.130/drivers/pci/oldproc.c Thu Dec 3 00:26:52 1998 +++ linux-2.1.130-ma/drivers/pci/oldproc.c Thu Dec 3 00:32:34 1998 @@ -139,7 +139,11 @@ DEVICE( MATROX, MATROX_MYS, "Mystique"), DEVICE( MATROX, MATROX_MIL_2, "Millennium II"), DEVICE( MATROX, MATROX_MIL_2_AGP,"Millennium II AGP"), + DEVICE( MATROX, MATROX_G200_PCI,"Matrox G200 PCI"), + DEVICE( MATROX, MATROX_G200_AGP,"Matrox G200 AGP"), DEVICE( MATROX, MATROX_MGA_IMP, "MGA Impression"), + DEVICE( MATROX, MATROX_G100_MM, "Matrox G100 multi monitor"), + DEVICE( MATROX, MATROX_G100_AGP,"Matrox G100 AGP"), DEVICE( CT, CT_65545, "65545"), DEVICE( CT, CT_65548, "65548"), DEVICE( CT, CT_65550, "65550"), @@ -325,6 +329,7 @@ DEVICE( VIA, VIA_82C586_0, "VT 82C586 Apollo ISA"), DEVICE( VIA, VIA_82C595, "VT 82C595 Apollo VP2"), DEVICE( VIA, VIA_82C597_0, "VT 82C597 Apollo VP3"), + DEVICE( VIA, VIA_82C598_0, "VT 82C598 Apollo MVP3"), DEVICE( VIA, VIA_82C926, "VT 82C926 Amazon"), DEVICE( VIA, VIA_82C416, "VT 82C416MV"), DEVICE( VIA, VIA_82C595_97, "VT 82C595 Apollo VP2/97"), @@ -332,6 +337,7 @@ DEVICE( VIA, VIA_82C586_3, "VT 82C586B Apollo ACPI"), DEVICE( VIA, VIA_86C100A, "VT 86C100A"), DEVICE( VIA, VIA_82C597_1, "VT 82C597 Apollo VP3 AGP"), + DEVICE( VIA, VIA_82C598_1, "VT 82C598 Apollo MVP3 AGP"), DEVICE( VORTEX, VORTEX_GDT60x0, "GDT 60x0"), DEVICE( VORTEX, VORTEX_GDT6000B,"GDT 6000b"), DEVICE( VORTEX, VORTEX_GDT6x10, "GDT 6110/6510"), diff -r -u linux-2.1.130/include/linux/pci.h linux-2.1.130-ma/include/linux/pci.h --- linux-2.1.130/include/linux/pci.h Thu Dec 3 00:23:05 1998 +++ linux-2.1.130-ma/include/linux/pci.h Thu Dec 3 00:32:35 1998 @@ -408,7 +408,11 @@ #define PCI_DEVICE_ID_MATROX_MYS 0x051A #define PCI_DEVICE_ID_MATROX_MIL_2 0x051b #define PCI_DEVICE_ID_MATROX_MIL_2_AGP 0x051f +#define PCI_DEVICE_ID_MATROX_G200_PCI 0x0520 +#define PCI_DEVICE_ID_MATROX_G200_AGP 0x0521 #define PCI_DEVICE_ID_MATROX_MGA_IMP 0x0d10 +#define PCI_DEVICE_ID_MATROX_G100_MM 0x1000 +#define PCI_DEVICE_ID_MATROX_G100_AGP 0x1001 #define PCI_VENDOR_ID_CT 0x102c #define PCI_DEVICE_ID_CT_65545 0x00d8 @@ -719,6 +723,7 @@ #define PCI_DEVICE_ID_VIA_82C586_0 0x0586 #define PCI_DEVICE_ID_VIA_82C595 0x0595 #define PCI_DEVICE_ID_VIA_82C597_0 0x0597 +#define PCI_DEVICE_ID_VIA_82C598_0 0x0598 #define PCI_DEVICE_ID_VIA_82C926 0x0926 #define PCI_DEVICE_ID_VIA_82C416 0x1571 #define PCI_DEVICE_ID_VIA_82C595_97 0x1595 @@ -726,6 +731,7 @@ #define PCI_DEVICE_ID_VIA_82C586_3 0x3040 #define PCI_DEVICE_ID_VIA_86C100A 0x6100 #define PCI_DEVICE_ID_VIA_82C597_1 0x8597 +#define PCI_DEVICE_ID_VIA_82C598_1 0x8598 #define PCI_VENDOR_ID_VORTEX 0x1119 #define PCI_DEVICE_ID_VORTEX_GDT60x0 0x0000

--5mCyUwZo2JvN/JJP Content-Type: text/plain; charset=us-ascii Content-Description: Patch against 2.0.36, detects Matrox G100/G200 and VIA Apollo MVP3 in /proc/pci Content-Disposition: attachment; filename="matrox-via-pci-2.0.36.diff"

Only in linux-2.0.36-ma: asm diff -d -r -u linux-2.0.36/drivers/pci/pci.c linux-2.0.36-ma/drivers/pci/pci.c --- linux-2.0.36/drivers/pci/pci.c Tue Nov 17 15:33:11 1998 +++ linux-2.0.36-ma/drivers/pci/pci.c Thu Dec 3 00:53:51 1998 @@ -146,7 +146,11 @@ DEVICE( MATROX, MATROX_MYS, "Mystique"), DEVICE( MATROX, MATROX_MIL_2, "Millennium II"), DEVICE( MATROX, MATROX_MIL_2_AGP,"Millennium II AGP"), + DEVICE( MATROX, MATROX_G200_PCI,"Matrox G200 PCI"), + DEVICE( MATROX, MATROX_G200_AGP,"Matrox G200 AGP"), DEVICE( MATROX, MATROX_MGA_IMP, "MGA Impression"), + DEVICE( MATROX, MATROX_G100_MM, "Matrox G100 multi monitor"), + DEVICE( MATROX, MATROX_G100_AGP,"Matrox G100 AGP"), DEVICE( CT, CT_65545, "65545"), DEVICE( CT, CT_65548, "65548"), DEVICE( CT, CT_65550, "65550"), @@ -329,6 +333,7 @@ DEVICE( VIA, VIA_82C586_0, "VT 82C586 Apollo ISA"), DEVICE( VIA, VIA_82C595, "VT 82C595 Apollo VP2"), DEVICE( VIA, VIA_82C597_0, "VT 82C597 Apollo VP3"), + DEVICE( VIA, VIA_82C598_0, "VT 82C598 Apollo MVP3"), DEVICE( VIA, VIA_82C926, "VT 82C926 Amazon"), DEVICE( VIA, VIA_82C416, "VT 82C416MV"), DEVICE( VIA, VIA_82C595_97, "VT 82C595 Apollo VP2/97"), @@ -336,6 +341,7 @@ DEVICE( VIA, VIA_82C586_3, "VT 82C586B Apollo ACPI"), DEVICE( VIA, VIA_86C100A, "VT 86C100A"), DEVICE( VIA, VIA_82C597_1, "VT 82C597 Apollo VP3 AGP"), + DEVICE( VIA, VIA_82C598_1, "VT 82C598 Apollo MVP3 AGP"), DEVICE( VORTEX, VORTEX_GDT60x0, "GDT 60x0"), DEVICE( VORTEX, VORTEX_GDT6000B,"GDT 6000b"), DEVICE( VORTEX, VORTEX_GDT6x10, "GDT 6110/6510"), diff -d -r -u linux-2.0.36/include/linux/pci.h linux-2.0.36-ma/include/linux/pci.h --- linux-2.0.36/include/linux/pci.h Tue Nov 17 15:33:16 1998 +++ linux-2.0.36-ma/include/linux/pci.h Thu Dec 3 00:53:51 1998 @@ -354,7 +354,11 @@ #define PCI_DEVICE_ID_MATROX_MYS 0x051A #define PCI_DEVICE_ID_MATROX_MIL_2 0x051b #define PCI_DEVICE_ID_MATROX_MIL_2_AGP 0x051f +#define PCI_DEVICE_ID_MATROX_G200_PCI 0x0520 +#define PCI_DEVICE_ID_MATROX_G200_AGP 0x0521 #define PCI_DEVICE_ID_MATROX_MGA_IMP 0x0d10 +#define PCI_DEVICE_ID_MATROX_G100_MM 0x1000 +#define PCI_DEVICE_ID_MATROX_G100_AGP 0x1001 #define PCI_VENDOR_ID_CT 0x102c #define PCI_DEVICE_ID_CT_65545 0x00d8 @@ -655,6 +659,7 @@ #define PCI_DEVICE_ID_VIA_82C586_0 0x0586 #define PCI_DEVICE_ID_VIA_82C595 0x0595 #define PCI_DEVICE_ID_VIA_82C597_0 0x0597 +#define PCI_DEVICE_ID_VIA_82C598_0 0x0598 #define PCI_DEVICE_ID_VIA_82C926 0x0926 #define PCI_DEVICE_ID_VIA_82C416 0x1571 #define PCI_DEVICE_ID_VIA_82C595_97 0x1595 @@ -662,6 +667,7 @@ #define PCI_DEVICE_ID_VIA_82C586_3 0x3040 #define PCI_DEVICE_ID_VIA_86C100A 0x6100 #define PCI_DEVICE_ID_VIA_82C597_1 0x8597 +#define PCI_DEVICE_ID_VIA_82C598_1 0x8598 #define PCI_VENDOR_ID_VORTEX 0x1119 #define PCI_DEVICE_ID_VORTEX_GDT60x0 0x0000

--5mCyUwZo2JvN/JJP--

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/