summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2004-09-23 19:37:50 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-09-23 19:37:50 -0700
commit4e1895597a22060539ff58be06705fe4bfb85040 (patch)
tree12de2fd8e2ded0e7dce56cd2fb45948f26aa08e4
parent55d7c8513c0a290c15df20569bf0889695e101bd (diff)
[PATCH] radeonfb: Fix newer PowerBook & warnings
This fixes a few warnings in radeonfb and add proper PLL divider values for Apple latest PowerBook Aliminium 17" so the display isn't "fuzzy" (the LVDS interface needs special PLL values that the driver can't calculate, on most x86, the BIOS tells us the values to use, on Apple laptops, we have to hard code them for each model). Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--drivers/video/aty/radeon_base.c2
-rw-r--r--drivers/video/aty/radeon_monitor.c18
2 files changed, 15 insertions, 5 deletions
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c
index 1cb60c1c471c..325b83b3017c 100644
--- a/drivers/video/aty/radeon_base.c
+++ b/drivers/video/aty/radeon_base.c
@@ -1868,7 +1868,7 @@ static int radeon_set_backlight_level(int level, void *data)
#undef SET_MC_FB_FROM_APERTURE
static void fixup_memory_mappings(struct radeonfb_info *rinfo)
{
- u32 save_crtc_gen_cntl, save_crtc2_gen_cntl;
+ u32 save_crtc_gen_cntl, save_crtc2_gen_cntl = 0;
u32 save_crtc_ext_cntl;
u32 aper_base, aper_size;
u32 agp_base;
diff --git a/drivers/video/aty/radeon_monitor.c b/drivers/video/aty/radeon_monitor.c
index 94ff455d09be..e6c01642cfdc 100644
--- a/drivers/video/aty/radeon_monitor.c
+++ b/drivers/video/aty/radeon_monitor.c
@@ -55,7 +55,7 @@ static int __devinit radeon_parse_montype_prop(struct device_node *dp, u8 **out_
u8 *pedid = NULL;
u8 *pmt = NULL;
u8 *tmp;
- int i, mt;
+ int i, mt = MT_NONE;
RTRACE("analyzing OF properties...\n");
pmt = (u8 *)get_property(dp, "display-type", NULL);
@@ -72,7 +72,9 @@ static int __devinit radeon_parse_montype_prop(struct device_node *dp, u8 **out_
else if (strcmp(pmt, "NONE")) {
printk(KERN_WARNING "radeonfb: Unknown OF display-type: %s\n", pmt);
return MT_NONE;
- }
+ } else
+ return MT_NONE;
+
for (i = 0; propnames[i] != NULL; ++i) {
pedid = (u8 *)get_property(dp, propnames[i], NULL);
if (pedid != NULL)
@@ -645,15 +647,23 @@ static void radeon_fixup_panel_info(struct radeonfb_info *rinfo)
rinfo->panel_info.fbk_divider = 0xad;
rinfo->panel_info.use_bios_dividers = 1;
}
+ /* Aluminium PowerBook 15" */
+ if (machine_is_compatible("PowerBook5,4")) {
+ rinfo->panel_info.ref_divider = rinfo->pll.ref_div;
+ rinfo->panel_info.post_divider = 0x2;
+ rinfo->panel_info.fbk_divider = 0x8e;
+ rinfo->panel_info.use_bios_dividers = 1;
+ }
/* Aluminium PowerBook 17" */
- if (machine_is_compatible("PowerBook5,3")) {
+ if (machine_is_compatible("PowerBook5,3") ||
+ machine_is_compatible("PowerBook5,5")) {
rinfo->panel_info.ref_divider = rinfo->pll.ref_div;
rinfo->panel_info.post_divider = 0x4;
rinfo->panel_info.fbk_divider = 0x80;
rinfo->panel_info.use_bios_dividers = 1;
}
/* iBook G4 */
- if (machine_is_compatible("PowerBook6,3") |
+ if (machine_is_compatible("PowerBook6,3") ||
machine_is_compatible("PowerBook6,5")) {
rinfo->panel_info.ref_divider = rinfo->pll.ref_div;
rinfo->panel_info.post_divider = 0x6;