changeset 8942:f381dbfd277e

M6 bug workaround by Hanno Bock <hanno@gmx.de>
author alex
date Mon, 13 Jan 2003 10:21:22 +0000
parents ca2ff7e1b66e
children f55308c2973b
files vidix/drivers/radeon_vid.c
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/vidix/drivers/radeon_vid.c	Mon Jan 13 10:08:21 2003 +0000
+++ b/vidix/drivers/radeon_vid.c	Mon Jan 13 10:21:22 2003 +0000
@@ -1021,6 +1021,16 @@
   radeon_ram_size = INREG(CONFIG_MEMSIZE);
   /* mem size is bits [28:0], mask off the rest. Range: from 1Mb up to 512 Mb */
   radeon_ram_size &=  CONFIG_MEMSIZE_MASK;
+#ifdef RADEON
+  /* according to XFree86 4.2.0, some production M6's return 0 for 8MB */
+  if (radeon_ram_size == 0 &&
+      (def_cap.device_id == DEVICE_ATI_RADEON_MOBILITY_M6 ||
+       def_cap.device_id == DEVICE_ATI_RADEON_MOBILITY_M62))
+  {
+      printf(RADEON_MSG" Workarounding buggy Radeon Mobility M6 (0 vs. 8MB ram)\n");
+      radeon_ram_size = 8192*1024;
+  }
+#endif
   if((radeon_mem_base = map_phys_mem(pci_info.base0,radeon_ram_size))==(void *)-1) return ENOMEM;
   memset(&besr,0,sizeof(bes_registers_t));
   radeon_vid_make_default();