@@ -1041,6 +1041,47 @@ stifb_copyarea(struct fb_info *info, const struct fb_copyarea *area)
10411041 SETUP_FB (fb );
10421042}
10431043
1044+ #define ARTIST_VRAM_SIZE 0x000804
1045+ #define ARTIST_VRAM_SRC 0x000808
1046+ #define ARTIST_VRAM_SIZE_TRIGGER_WINFILL 0x000a04
1047+ #define ARTIST_VRAM_DEST_TRIGGER_BLOCKMOVE 0x000b00
1048+ #define ARTIST_SRC_BM_ACCESS 0x018008
1049+ #define ARTIST_FGCOLOR 0x018010
1050+ #define ARTIST_BGCOLOR 0x018014
1051+ #define ARTIST_BITMAP_OP 0x01801c
1052+
1053+ static void
1054+ stifb_fillrect (struct fb_info * info , const struct fb_fillrect * rect )
1055+ {
1056+ struct stifb_info * fb = container_of (info , struct stifb_info , info );
1057+
1058+ if (rect -> rop != ROP_COPY )
1059+ return cfb_fillrect (info , rect );
1060+
1061+ SETUP_HW (fb );
1062+
1063+ if (fb -> info .var .bits_per_pixel == 32 ) {
1064+ WRITE_WORD (0xBBA0A000 , fb , REG_10 );
1065+
1066+ NGLE_REALLY_SET_IMAGE_PLANEMASK (fb , 0xffffffff );
1067+ } else {
1068+ WRITE_WORD (fb -> id == S9000_ID_HCRX ? 0x13a02000 : 0x13a01000 , fb , REG_10 );
1069+
1070+ NGLE_REALLY_SET_IMAGE_PLANEMASK (fb , 0xff );
1071+ }
1072+
1073+ WRITE_WORD (0x03000300 , fb , ARTIST_BITMAP_OP );
1074+ WRITE_WORD (0x2ea01000 , fb , ARTIST_SRC_BM_ACCESS );
1075+ NGLE_QUICK_SET_DST_BM_ACCESS (fb , 0x2ea01000 );
1076+ NGLE_REALLY_SET_IMAGE_FG_COLOR (fb , rect -> color );
1077+ WRITE_WORD (0 , fb , ARTIST_BGCOLOR );
1078+
1079+ NGLE_SET_DSTXY (fb , (rect -> dx << 16 ) | (rect -> dy ));
1080+ SET_LENXY_START_RECFILL (fb , (rect -> width << 16 ) | (rect -> height ));
1081+
1082+ SETUP_FB (fb );
1083+ }
1084+
10441085static void __init
10451086stifb_init_display (struct stifb_info * fb )
10461087{
@@ -1105,7 +1146,7 @@ static const struct fb_ops stifb_ops = {
11051146 .owner = THIS_MODULE ,
11061147 .fb_setcolreg = stifb_setcolreg ,
11071148 .fb_blank = stifb_blank ,
1108- .fb_fillrect = cfb_fillrect ,
1149+ .fb_fillrect = stifb_fillrect ,
11091150 .fb_copyarea = stifb_copyarea ,
11101151 .fb_imageblit = cfb_imageblit ,
11111152};
@@ -1297,7 +1338,7 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref)
12971338 goto out_err0 ;
12981339 }
12991340 info -> screen_size = fix -> smem_len ;
1300- info -> flags = FBINFO_DEFAULT | FBINFO_HWACCEL_COPYAREA ;
1341+ info -> flags = FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT ;
13011342 info -> pseudo_palette = & fb -> pseudo_palette ;
13021343
13031344 /* This has to be done !!! */
0 commit comments