Commit 306c869c authored by Adrian McMenamin's avatar Adrian McMenamin Committed by Linus Torvalds

pvr2fb: Consolidated cleanup of pvr2fb.c

- better handling of the pvr2 registers based on more up to date information.

Testing shows that it seems to work pretty well at 16bpp, 24bpp and 32bpp -
including proper rendering of the boot logo at all levels (previously this was
a bit broken even at 16bpp) and giving white against black text.  Really
detailed testing (eg with X11) requires support for the maple bus - which
isn't (currently - next project assuming this is okay) available, but I have
no reason to think this is broken.

Signed-off by: Adrian McMenamin <adrian@mcmen.demon.co.uk>
Acked-by: default avatarPaul Mundt <lethal@linux-sh.org>
Signed-off-by: default avatarAntonino Daplas <adaplas@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 9cd1c674
...@@ -94,6 +94,7 @@ ...@@ -94,6 +94,7 @@
#define DISP_DIWCONF (DISP_BASE + 0xe8) #define DISP_DIWCONF (DISP_BASE + 0xe8)
#define DISP_DIWHSTRT (DISP_BASE + 0xec) #define DISP_DIWHSTRT (DISP_BASE + 0xec)
#define DISP_DIWVSTRT (DISP_BASE + 0xf0) #define DISP_DIWVSTRT (DISP_BASE + 0xf0)
#define DISP_PIXDEPTH (DISP_BASE + 0x108)
/* Pixel clocks, one for TV output, doubled for VGA output */ /* Pixel clocks, one for TV output, doubled for VGA output */
#define TV_CLK 74239 #define TV_CLK 74239
...@@ -600,6 +601,7 @@ static void pvr2_init_display(struct fb_info *info) ...@@ -600,6 +601,7 @@ static void pvr2_init_display(struct fb_info *info)
/* bits per pixel */ /* bits per pixel */
fb_writel(fb_readl(DISP_DIWMODE) | (--bytesperpixel << 2), DISP_DIWMODE); fb_writel(fb_readl(DISP_DIWMODE) | (--bytesperpixel << 2), DISP_DIWMODE);
fb_writel(bytesperpixel << 2, DISP_PIXDEPTH);
/* video enable, color sync, interlace, /* video enable, color sync, interlace,
* hsync and vsync polarity (currently unused) */ * hsync and vsync polarity (currently unused) */
...@@ -808,6 +810,8 @@ static int __devinit pvr2fb_common_init(void) ...@@ -808,6 +810,8 @@ static int __devinit pvr2fb_common_init(void)
if (register_framebuffer(fb_info) < 0) if (register_framebuffer(fb_info) < 0)
goto out_err; goto out_err;
/*Must write PIXDEPTH to register before anything is displayed - so force init */
pvr2_init_display(fb_info);
modememused = get_line_length(fb_info->var.xres_virtual, modememused = get_line_length(fb_info->var.xres_virtual,
fb_info->var.bits_per_pixel); fb_info->var.bits_per_pixel);
......
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