Skip to contentSkip to conversation

Patch for radeon framebuffer

PATCH Hanno Böck 1 participant 1 message Mar 15, 2003

lore
Share & tools
lore
#0 lore raw

The patch below has been around for ages now.
It is needed on some radeon mobility cards, because they report 0 for their video-ram-size.
Without the patch, the radeonfb will not work.

Can you include this in the next kernel release?

radeonfb.c renamed from radeonfb.c.orig +8 -0
@@ -877,6 +877,14 @@
 	/* 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;
+	  }
+
 	/* ram type */
 	tmp = INREG(MEM_SDRAM_MODE_REG);
 	switch ((MEM_CFG_TYPE & tmp) >> 30) {