This small patch adds support for Matrox G100 (pci/agp), G200 (pci/agp),
G400 and Millennium II agp cards to SVGATextMode-1.9. I've tested it
only on a G200 agp, and it seems to work. Don't hold me responsible in
any way if you manage to blow up your monitor.
Since the author of SVGATextMode has stressed that he won't develop it
further, I'm not sure he will do something with my contribution. I
cannot blame him, but I won't keep it to myself either.
Good luck with this! if (!pcr) return(FALSE); - if ((pcr->_device != PCI_CHIP_MGA2064) && (pcr->_device != PCI_CHIP_MGA1064) && (pcr->_device != PCI_CHIP_MGA2164))
if ( ( (pcr->_device == PCI_CHIP_MGA1064) && /* Chips & Tech */ =========================================================================== --
===========================================================================
diff -u -r SVGATextMode-1.9-src/XFREE/mga_clock.c SVGATextMode-1.9-src-matrox/XFREE/mga_clock.c
--- SVGATextMode-1.9-src/XFREE/mga_clock.c Wed Nov 26 16:53:09 1997
{
if ((pcr->_device == PCI_CHIP_MGA2064)
|| (pcr->_device == PCI_CHIP_MGA1064)
- || (pcr->_device == PCI_CHIP_MGA2164))
+ || (pcr->_device == PCI_CHIP_MGA2164)
+ || (pcr->_device == PCI_CHIP_MGA2164_AGP)
+ || (pcr->_device == PCI_CHIP_MGAG200_PCI)
+ || (pcr->_device == PCI_CHIP_MGAG200)
+ || (pcr->_device == PCI_CHIP_MGAG100_PCI)
+ || (pcr->_device == PCI_CHIP_MGAG100)
+ || (pcr->_device == PCI_CHIP_MGAG400))
break;
}
+ if ((pcr->_device != PCI_CHIP_MGA2064) &&
+ (pcr->_device != PCI_CHIP_MGA1064) &&
+ (pcr->_device != PCI_CHIP_MGA2164) &&
+ (pcr->_device != PCI_CHIP_MGA2164_AGP) &&
+ (pcr->_device != PCI_CHIP_MGAG200_PCI) &&
+ (pcr->_device != PCI_CHIP_MGAG200) &&
+ (pcr->_device != PCI_CHIP_MGAG100_PCI) &&
+ (pcr->_device != PCI_CHIP_MGAG100) &&
+ (pcr->_device != PCI_CHIP_MGAG400))
return(FALSE);
}
PDEBUG(("MGAbase0: %x ; MGAbase1: %x ; MGAbase2: %x\n",
pcr->_base0, pcr->_base1, pcr->_base2));
+ /* please note that we need to mask the memory-base with 0xffffc000 according */
+ /* to the sources in xfree86-3.3.5 (my G200-agp suggests MGABase0 f4000008) */
*/
/* PDEBUG(("MGA: swapping mem address bytes to %08lx\n", pcr->_base1));*/
base = (uchar *)mmap(0, 0x4000, PROT_READ|PROT_WRITE,
- MAP_SHARED, devmem, (off_t)(pcr->_base1));
+ MAP_SHARED, devmem, (off_t)(pcr->_base1 & 0xffffc000));
}
else
{
base = (uchar *)mmap(0, 0x4000, PROT_READ|PROT_WRITE,
- MAP_SHARED, devmem, (off_t)(pcr->_base0));
+ MAP_SHARED, devmem, (off_t)(pcr->_base0 & 0xffffc000));
}
close(devmem);
if ((long)base == -1) {
diff -u -r SVGATextMode-1.9-src/XFREE/vgaPCI.h SVGATextMode-1.9-src-matrox/XFREE/vgaPCI.h
--- SVGATextMode-1.9-src/XFREE/vgaPCI.h Wed Nov 26 16:52:14 1997
#define PCI_CHIP_MGA2064 0x0519
#define PCI_CHIP_MGA1064 0x051A
#define PCI_CHIP_MGA2164 0x051B
+#define PCI_CHIP_MGA2164_AGP 0x051f
+#define PCI_CHIP_MGAG200_PCI 0x0520
+#define PCI_CHIP_MGAG200 0x0521
+#define PCI_CHIP_MGAG100_PCI 0x1000
+#define PCI_CHIP_MGAG100 0x1001
+#define PCI_CHIP_MGAG400 0x0525
{PCI_CHIP_MGA2064, "MGA 2064W"},
{PCI_CHIP_MGA2164, "MGA 2164W"},
{PCI_CHIP_MGA1064, "MGA 1064SG"},
- {0x0000, NULL}}},
+ {PCI_CHIP_MGA2164_AGP, "MGA 2164W AGP"},
+ {PCI_CHIP_MGAG200_PCI, "MGA G200 PCI"},
+ {PCI_CHIP_MGAG200, "MGA G200"},
+ {PCI_CHIP_MGAG100_PCI, "MGA G100 PCI"},
+ {PCI_CHIP_MGAG100, "MGA G100"},
+ {PCI_CHIP_MGAG400, "MGA G400"},
+ {0x0000, NULL}}},
{PCI_VENDOR_CHIPSTECH, "C&T", {
{PCI_CHIP_65545, "65545"},
{PCI_CHIP_65548, "65548"},
Greetings,
Jurriaan
Mine alone is the country of my soul
Marc Chagall