[PATCH] radeonfb: Fix panel detection on some laptops

From: Benjamin Herrenschmidt
Date: Tue Jun 22 2004 - 15:32:50 EST


Hi !

The code in radeonfb looking for the BIOS image currently uses the
BIOS ROM if any, and falls back to the RAM image if not found. This
is unfortunatly not correct for a bunch of laptops where the real
panel data are only present in the RAM image.

This works around this problem by preferring the RAM image on mobility
chipsets. This is definitely not the best workaround, we need some arch
support for linking the RAM image to the PCI ID (preferrably by having
the arch snapshot it during boot, isolating us completely from the details
of where this image is in memory). I'll see how we can get such
an improvement later.

Please apply,

Signed-off-by: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>

===== drivers/video/aty/radeon_base.c 1.20 vs edited =====
--- 1.20/drivers/video/aty/radeon_base.c 2004-06-18 11:36:48 -05:00
+++ edited/drivers/video/aty/radeon_base.c 2004-06-22 15:11:16 -05:00
@@ -2268,9 +2268,17 @@

/*
* Map the BIOS ROM if any and retreive PLL parameters from
- * either BIOS or Open Firmware
+ * the BIOS. We skip that on mobility chips as the real panel
+ * values we need aren't in the ROM but in the BIOS image in
+ * memory. This is definitely not the best meacnism though,
+ * we really need the arch code to tell us which is the "primary"
+ * video adapter to use the memory image (or better, the arch
+ * should provide us a copy of the BIOS image to shield us from
+ * archs who would store that elsewhere and/or could initialize
+ * more than one adapter during boot).
*/
- radeon_map_ROM(rinfo, pdev);
+ if (!rinfo->is_mobility)
+ radeon_map_ROM(rinfo, pdev);

/*
* On x86, the primary display on laptop may have it's BIOS
@@ -2282,6 +2290,12 @@
if (rinfo->bios_seg == NULL)
radeon_find_mem_vbios(rinfo);
#endif /* __i386__ */
+
+ /* If both above failed, try the BIOS ROM again for mobility
+ * chips
+ */
+ if (rinfo->bios_seg == NULL && rinfo->is_mobility)
+ radeon_map_ROM(rinfo, pdev);

/* Get informations about the board's PLL */
radeon_get_pllinfo(rinfo);


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/