changeset 8941:ca2ff7e1b66e

M6 bug workaround by Hanno Bock <hanno@gmx.de>
author alex
date Mon, 13 Jan 2003 10:08:21 +0000
parents dc963ad8dafe
children f381dbfd277e
files drivers/radeon/radeonfb.c
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/drivers/radeon/radeonfb.c	Mon Jan 13 10:07:38 2003 +0000
+++ b/drivers/radeon/radeonfb.c	Mon Jan 13 10:08:21 2003 +0000
@@ -1108,6 +1108,16 @@
 	/* 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) {