[Mplayer-cvslog] CVS: main/drivers mga_vid.c,1.50,1.51
Attila Kinali CVS
attila at mplayerhq.hu
Sun Mar 2 22:21:59 CET 2003
Update of /cvsroot/mplayer/main/drivers
In directory mail:/var/tmp.root/cvs-serv17148
Modified Files:
mga_vid.c
Log Message:
workaround wrong detected memory sizes on G400 cards.
patch by ilmari at ping.uio.no (Dagfinn Ilmari Mannsåker)
Index: mga_vid.c
===================================================================
RCS file: /cvsroot/mplayer/main/drivers/mga_vid.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- mga_vid.c 17 Feb 2003 06:46:31 -0000 1.50
+++ mga_vid.c 2 Mar 2003 21:21:56 -0000 1.51
@@ -88,6 +88,18 @@
#define PCI_DEVICE_ID_MATROX_G550 0x2527
#endif
+#ifndef PCI_SUBSYSTEM_ID_MATROX_G400_DH_16MB
+#define PCI_SUBSYSTEM_ID_MATROX_G400_DH_16MB 0x2159
+#endif
+
+#ifndef PCI_SUBSYSTEM_ID_MATROX_G400_16MB_SGRAM
+#define PCI_SUBSYSTEM_ID_MATROX_G400_16MB_SGRAM 0x19d8
+#endif
+
+#ifndef PCI_SUBSYSTEM_ID_MATROX_G400_16MB_SDRAM
+#define PCI_SUBSYSTEM_ID_MATROX_G400_16MB_SDRAM 0x0328
+#endif
+
MODULE_AUTHOR("Aaron Holtzman <aholtzma at engr.uvic.ca>");
#ifdef MODULE_LICENSE
MODULE_LICENSE("GPL");
@@ -1365,6 +1377,15 @@
default:
mga_ram_size = 16;
printk(KERN_INFO "mga_vid: Couldn't detect RAMSIZE, assuming 16MB!");
+ }
+ /* Check for buggy 16MB cards reporting 32 MB */
+ if(mga_ram_size != 16 &&
+ (pci_dev->subsystem_device == PCI_SUBSYSTEM_ID_MATROX_G400_16MB_SDRAM ||
+ pci_dev->subsystem_device == PCI_SUBSYSTEM_ID_MATROX_G400_16MB_SGRAM ||
+ pci_dev->subsystem_device == PCI_SUBSYSTEM_ID_MATROX_G400_DH_16MB))
+ {
+ printk(KERN_INFO "mga_vid: Detected 16MB card reporting %d MB RAMSIZE, overriding\n", mga_ram_size);
+ mga_ram_size = 16;
}
}else{
switch((card_option>>10)&0x17){
More information about the MPlayer-cvslog
mailing list