From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Andrew Morton <akpm@osdl.org>
Cc: Linus Torvalds <torvalds@osdl.org>,
Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: [PATCH] radeonfb: Fix panel detection on some laptops
Date: Tue, 22 Jun 2004 15:16:09 -0500 [thread overview]
Message-ID: <1087935369.1855.8.camel@gaston> (raw)
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@kernel.crashing.org>
===== 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);
reply other threads:[~2004-06-22 20:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1087935369.1855.8.camel@gaston \
--to=benh@kernel.crashing.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®