]> git.hungrycats.org Git - linux/commitdiff
[PATCH] radeonfb fix (non-8bpp clear doesn't use palette)
authorAndrew Morton <akpm@osdl.org>
Tue, 1 Jun 2004 01:46:58 +0000 (18:46 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 1 Jun 2004 01:46:58 +0000 (18:46 -0700)
From: Jurriaan <thunder7@xs4all.nl>

I've used this patch since 2.6.5, and other users have confirmed it
solves their problems.

Basically, when not in 8bpp mode, radeonfb should use the palette when
clearing a region on screen.  This is how it's done in 2.4 and xfree, also.

Signed-off-by: Jurriaan Kalkman <thunder7@xs4all.nl>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/video/aty/radeon_accel.c

index c87a43f7be7e7b5f6fc9d774cb9bb54f4096021c..82614b4b4305775fcfefc513465d089f7fa6eba9 100644 (file)
@@ -13,7 +13,10 @@ static void radeonfb_prim_fillrect(struct radeonfb_info *rinfo,
                rinfo->dp_gui_master_cntl  /* contains, like GMC_DST_32BPP */
                 | GMC_BRUSH_SOLID_COLOR
                 | ROP3_P);
-       OUTREG(DP_BRUSH_FRGD_CLR, region->color);
+       if (radeon_get_dstbpp(rinfo->depth) != DST_8BPP)
+               OUTREG(DP_BRUSH_FRGD_CLR, rinfo->pseudo_palette[region->color]);
+       else
+               OUTREG(DP_BRUSH_FRGD_CLR, region->color);
        OUTREG(DP_WRITE_MSK, 0xffffffff);
        OUTREG(DP_CNTL, (DST_X_LEFT_TO_RIGHT | DST_Y_TOP_TO_BOTTOM));