diff options
author | Risto Suominen <Risto.Suominen@gmail.com> | 2009-01-13 15:09:30 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-02-02 01:08:25 -0500 |
commit | 7fbb7cadd062baf299fd8b26a80ea99da0c3fe01 (patch) | |
tree | 5992150dd976a50d81fe5ba472397ab26507494c /drivers/video | |
parent | 59b608c2c33feacc8be281ec3ba9ca2a3a5cb9a7 (diff) |
fbdev/atyfb: Fix DSP config on some PowerMacs & PowerBooks
Since the complete re-write in 2.6.10, some PowerMacs (At least PowerMac 5500
and PowerMac G3 Beige rev A) with ATI Mach64 chip have suffered from unstable
columns in their framebuffer image. This seems to depend on a value (4) read
from PLL_EXT_CNTL register, which leads to incorrect DSP config parameters to
be written to the chip. This patch uses a value calculated by aty_init_pll_ct
instead, as a starting point.
There are questions as to whether this should be extended to other platforms
or maybe made dependent on specific chip types, but in the meantime, this has
been tested on various powermacs and works for them so let's commit it.
Signed-off-by: Risto Suominen <Risto.Suominen@gmail.com>
Tested-by: Michael Pettersson <mike@it.uu.se>
Cc: <stable@kernel.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/aty/mach64_ct.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/video/aty/mach64_ct.c b/drivers/video/aty/mach64_ct.c index c50c7cf26fe9..2745b8539485 100644 --- a/drivers/video/aty/mach64_ct.c +++ b/drivers/video/aty/mach64_ct.c | |||
@@ -8,6 +8,9 @@ | |||
8 | #include <asm/io.h> | 8 | #include <asm/io.h> |
9 | #include <video/mach64.h> | 9 | #include <video/mach64.h> |
10 | #include "atyfb.h" | 10 | #include "atyfb.h" |
11 | #ifdef CONFIG_PPC | ||
12 | #include <asm/machdep.h> | ||
13 | #endif | ||
11 | 14 | ||
12 | #undef DEBUG | 15 | #undef DEBUG |
13 | 16 | ||
@@ -536,6 +539,14 @@ static int __devinit aty_init_pll_ct(const struct fb_info *info, | |||
536 | pll->ct.xclk_post_div_real = postdividers[xpost_div]; | 539 | pll->ct.xclk_post_div_real = postdividers[xpost_div]; |
537 | pll->ct.mclk_fb_div = q * pll->ct.xclk_post_div_real / 8; | 540 | pll->ct.mclk_fb_div = q * pll->ct.xclk_post_div_real / 8; |
538 | 541 | ||
542 | #ifdef CONFIG_PPC | ||
543 | if (machine_is(powermac)) { | ||
544 | /* Override PLL_EXT_CNTL & 0x07. */ | ||
545 | pll->ct.xclk_post_div = xpost_div; | ||
546 | pll->ct.xclk_ref_div = 1; | ||
547 | } | ||
548 | #endif | ||
549 | |||
539 | #ifdef DEBUG | 550 | #ifdef DEBUG |
540 | pllmclk = (1000000 * pll->ct.mclk_fb_mult * pll->ct.mclk_fb_div) / | 551 | pllmclk = (1000000 * pll->ct.mclk_fb_mult * pll->ct.mclk_fb_div) / |
541 | (par->ref_clk_per * pll->ct.pll_ref_div); | 552 | (par->ref_clk_per * pll->ct.pll_ref_div); |