提交 2c86a0c2 编写于 作者: K Krzysztof Helt 提交者: Linus Torvalds

tridentfb: acceleration bug fixes

This patch fixes two problems when acceleration is enabled:

 - bit for bitblt direction is corrected
   so scrolling down works as expected on 3DImage chips

 - initialization of acceleration is done later
   this helps with initial console malfuntion (on Blade3D
   chips) well documented here:
   http://marc.info/?l=linux-fbdev-users&m=111386953124478&w=2Signed-off-by: NKrzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 49b1f4b4
...@@ -395,7 +395,7 @@ static void image_fill_rect(struct tridentfb_par *par, ...@@ -395,7 +395,7 @@ static void image_fill_rect(struct tridentfb_par *par,
static void image_copy_rect(struct tridentfb_par *par, static void image_copy_rect(struct tridentfb_par *par,
u32 x1, u32 y1, u32 x2, u32 y2, u32 w, u32 h) u32 x1, u32 y1, u32 x2, u32 y2, u32 w, u32 h)
{ {
int direction = 2; int direction = 0x4;
u32 s1 = point(x1, y1); u32 s1 = point(x1, y1);
u32 s2 = point(x1 + w - 1, y1 + h - 1); u32 s2 = point(x1 + w - 1, y1 + h - 1);
u32 d1 = point(x2, y2); u32 d1 = point(x2, y2);
...@@ -1075,10 +1075,6 @@ static int tridentfb_set_par(struct fb_info *info) ...@@ -1075,10 +1075,6 @@ static int tridentfb_set_par(struct fb_info *info)
/* enable GE for text acceleration */ /* enable GE for text acceleration */
write3X4(par, GraphEngReg, 0x80); write3X4(par, GraphEngReg, 0x80);
#ifdef CONFIG_FB_TRIDENT_ACCEL
par->init_accel(par, info->var.xres_virtual, bpp);
#endif
switch (bpp) { switch (bpp) {
case 8: case 8:
tmp = 0x00; tmp = 0x00;
...@@ -1173,6 +1169,10 @@ static int tridentfb_set_par(struct fb_info *info) ...@@ -1173,6 +1169,10 @@ static int tridentfb_set_par(struct fb_info *info)
set_number_of_lines(par, info->var.yres); set_number_of_lines(par, info->var.yres);
info->fix.line_length = info->var.xres_virtual * bpp / 8; info->fix.line_length = info->var.xres_virtual * bpp / 8;
set_lwidth(par, info->fix.line_length / 8); set_lwidth(par, info->fix.line_length / 8);
#ifdef CONFIG_FB_TRIDENT_ACCEL
par->init_accel(par, info->var.xres_virtual, bpp);
#endif
info->fix.visual = (bpp == 8) ? FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_TRUECOLOR; info->fix.visual = (bpp == 8) ? FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_TRUECOLOR;
info->cmap.len = (bpp == 8) ? 256 : 16; info->cmap.len = (bpp == 8) ? 256 : 16;
debug("exit\n"); debug("exit\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册