Commit 6340e7ba authored by Benjamin Herrenschmidt's avatar Benjamin Herrenschmidt Committed by Linus Torvalds

[PATCH] radeonfb: Fix panel detection on some laptops

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.
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ca216b8a
......@@ -2268,9 +2268,17 @@ static int radeonfb_pci_register (struct pci_dev *pdev,
/*
* 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
......@@ -2283,6 +2291,12 @@ static int radeonfb_pci_register (struct pci_dev *pdev,
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment