From e3a677484bc3de681f7843fc03e45b0bb1391016 Mon Sep 17 00:00:00 2001 From: Mikulas Patocka Date: Wed, 2 Jun 2010 11:09:04 -0400 Subject: [PATCH] --- yaml --- r: 199641 b: refs/heads/master c: a57ee627499d116f6872a5634ea4f015da0eacd2 h: refs/heads/master i: 199639: 3986162d5a177a6bf2b6e754692bceb1fdbd025f v: v3 --- [refs] | 2 +- trunk/drivers/video/aty/mach64_accel.c | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 8cf591e87d42..b849b7c97485 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: aef4b9aaae1decc775778903922bd0075cce7a88 +refs/heads/master: a57ee627499d116f6872a5634ea4f015da0eacd2 diff --git a/trunk/drivers/video/aty/mach64_accel.c b/trunk/drivers/video/aty/mach64_accel.c index 51fcc0a2c94a..e45833ce975b 100644 --- a/trunk/drivers/video/aty/mach64_accel.c +++ b/trunk/drivers/video/aty/mach64_accel.c @@ -242,7 +242,7 @@ void atyfb_copyarea(struct fb_info *info, const struct fb_copyarea *area) void atyfb_fillrect(struct fb_info *info, const struct fb_fillrect *rect) { struct atyfb_par *par = (struct atyfb_par *) info->par; - u32 color = rect->color, dx = rect->dx, width = rect->width, rotation = 0; + u32 color, dx = rect->dx, width = rect->width, rotation = 0; if (par->asleep) return; @@ -253,8 +253,11 @@ void atyfb_fillrect(struct fb_info *info, const struct fb_fillrect *rect) return; } - color |= (rect->color << 8); - color |= (rect->color << 16); + if (info->fix.visual == FB_VISUAL_TRUECOLOR || + info->fix.visual == FB_VISUAL_DIRECTCOLOR) + color = ((u32 *)(info->pseudo_palette))[rect->color]; + else + color = rect->color; if (info->var.bits_per_pixel == 24) { /* In 24 bpp, the engine is in 8 bpp - this requires that all */