mirror of https://github.com/mpv-player/mpv
workaround wrong detected memory sizes on G400 cards.
patch by ilmari@ping.uio.no (Dagfinn Ilmari Mannsåker) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9519 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
6514fbb076
commit
97f08af457
|
@ -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@engr.uvic.ca>");
|
||||
#ifdef MODULE_LICENSE
|
||||
MODULE_LICENSE("GPL");
|
||||
|
@ -1366,6 +1378,15 @@ static int mga_vid_find_card(void)
|
|||
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){
|
||||
// case 0x10:
|
||||
|
|
Loading…
Reference in New Issue