From 267da4a1bda783be850b7df453f336f87a203350 Mon Sep 17 00:00:00 2001 From: "Antonino A. Daplas" Date: Mon, 1 Aug 2005 23:46:44 +0800 Subject: [PATCH] --- yaml --- r: 5553 b: refs/heads/master c: 8dad46cf38c029248d1331b6a97b2999e0751cfa h: refs/heads/master i: 5551: 1d390d7957b3b78b7e3c8aedbc71be6846fc3041 v: v3 --- [refs] | 2 +- trunk/drivers/video/tridentfb.c | 26 ++++++++++++++++---------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/[refs] b/[refs] index 1d521558a443..6149ff9dc511 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6cb54819d7b1867053e2dfd8c0ca3a8dc65a7eff +refs/heads/master: 8dad46cf38c029248d1331b6a97b2999e0751cfa diff --git a/trunk/drivers/video/tridentfb.c b/trunk/drivers/video/tridentfb.c index da8004e5d03d..64aa78c5da79 100644 --- a/trunk/drivers/video/tridentfb.c +++ b/trunk/drivers/video/tridentfb.c @@ -454,13 +454,16 @@ static struct accel_switch accel_image = { static void tridentfb_fillrect(struct fb_info * info, const struct fb_fillrect *fr) { int bpp = info->var.bits_per_pixel; - int col; + int col = 0; switch (bpp) { default: - case 8: col = fr->color; + case 8: col |= fr->color; + col |= col << 8; + col |= col << 16; break; case 16: col = ((u32 *)(info->pseudo_palette))[fr->color]; + break; case 32: col = ((u32 *)(info->pseudo_palette))[fr->color]; break; @@ -882,8 +885,9 @@ static int tridentfb_set_par(struct fb_info *info) write3X4(GraphEngReg, 0x80); //enable GE for text acceleration -// if (info->var.accel_flags & FB_ACCELF_TEXT) -//FIXME acc->init_accel(info->var.xres,bpp); +#ifdef CONFIG_FB_TRIDENT_ACCEL + acc->init_accel(info->var.xres,bpp); +#endif switch (bpp) { case 8: tmp = 0x00; break; @@ -981,12 +985,14 @@ static int tridentfb_setcolreg(unsigned regno, unsigned red, unsigned green, t_outb(green>>10,0x3C9); t_outb(blue>>10,0x3C9); - } else - if (bpp == 16) /* RGB 565 */ - ((u32*)info->pseudo_palette)[regno] = (red & 0xF800) | - ((green & 0xFC00) >> 5) | ((blue & 0xF800) >> 11); - else - if (bpp == 32) /* ARGB 8888 */ + } else if (bpp == 16) { /* RGB 565 */ + u32 col; + + col = (red & 0xF800) | ((green & 0xFC00) >> 5) | + ((blue & 0xF800) >> 11); + col |= col << 16; + ((u32 *)(info->pseudo_palette))[regno] = col; + } else if (bpp == 32) /* ARGB 8888 */ ((u32*)info->pseudo_palette)[regno] = ((transp & 0xFF00) <<16) | ((red & 0xFF00) << 8) |