
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>
---

 25-akpm/drivers/video/aty/radeon_accel.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)

diff -puN drivers/video/aty/radeon_accel.c~for-radeonfb-non-8bpp-clear-doesnt-use-palette drivers/video/aty/radeon_accel.c
--- 25/drivers/video/aty/radeon_accel.c~for-radeonfb-non-8bpp-clear-doesnt-use-palette	2004-05-26 23:32:34.740875168 -0700
+++ 25-akpm/drivers/video/aty/radeon_accel.c	2004-05-26 23:32:34.743874712 -0700
@@ -13,7 +13,10 @@ static void radeonfb_prim_fillrect(struc
 		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));
 
_
