diff options
author | attila <attila@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-03-02 21:21:56 +0000 |
---|---|---|
committer | attila <attila@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-03-02 21:21:56 +0000 |
commit | 97f08af457fac86cda92a79f0840e4920590930e (patch) | |
tree | 5d09954ab5189382e0cd37a21d47a5a229ff8570 /drivers | |
parent | 6514fbb0767930249dfb7accdddf5989691f7953 (diff) | |
download | mpv-97f08af457fac86cda92a79f0840e4920590930e.tar.bz2 mpv-97f08af457fac86cda92a79f0840e4920590930e.tar.xz |
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
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mga_vid.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/mga_vid.c b/drivers/mga_vid.c index bdd2f4a593..e767eb8050 100644 --- a/drivers/mga_vid.c +++ b/drivers/mga_vid.c @@ -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: |