M6 bug workaround by Hanno Bock <hanno@gmx.de>

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8942 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
alex 2003-01-13 10:08:21 +00:00
parent 84fac13ad1
commit 28148c211c
1 changed files with 10 additions and 0 deletions

View File

@ -1108,6 +1108,16 @@ static int radeonfb_pci_register (struct pci_dev *pdev,
/* mem size is bits [28:0], mask off the rest */
rinfo->video_ram = tmp & CONFIG_MEMSIZE_MASK;
/* according to XFree86 4.2.0, some production M6's return
0 for 8MB */
if (rinfo->video_ram == 0 &&
(pdev->device == PCI_DEVICE_ID_RADEON_LY ||
pdev->device == PCI_DEVICE_ID_RADEON_LZ))
{
rinfo->video_ram = 8192*1024;
printk("radeonfb: workarounding buggy Radeon M6 (0 vs 8MB memory)\n");
}
/* ram type */
rinfo->MemCntl = INREG(MEM_SDRAM_MODE_REG);
switch ((MEM_CFG_TYPE & rinfo->MemCntl) >> 30) {