aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/s3fb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/s3fb.c')
-rw-r--r--drivers/video/s3fb.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/video/s3fb.c b/drivers/video/s3fb.c
index 4d0e204dd8ad..756fafb41d78 100644
--- a/drivers/video/s3fb.c
+++ b/drivers/video/s3fb.c
@@ -183,18 +183,13 @@ static void s3fb_settile_fast(struct fb_info *info, struct fb_tilemap *map)
183 } 183 }
184} 184}
185 185
186static int s3fb_get_tilemax(struct fb_info *info)
187{
188 return 256;
189}
190
191static struct fb_tile_ops s3fb_tile_ops = { 186static struct fb_tile_ops s3fb_tile_ops = {
192 .fb_settile = svga_settile, 187 .fb_settile = svga_settile,
193 .fb_tilecopy = svga_tilecopy, 188 .fb_tilecopy = svga_tilecopy,
194 .fb_tilefill = svga_tilefill, 189 .fb_tilefill = svga_tilefill,
195 .fb_tileblit = svga_tileblit, 190 .fb_tileblit = svga_tileblit,
196 .fb_tilecursor = svga_tilecursor, 191 .fb_tilecursor = svga_tilecursor,
197 .fb_get_tilemax = s3fb_get_tilemax, 192 .fb_get_tilemax = svga_get_tilemax,
198}; 193};
199 194
200static struct fb_tile_ops s3fb_fast_tile_ops = { 195static struct fb_tile_ops s3fb_fast_tile_ops = {
@@ -203,7 +198,7 @@ static struct fb_tile_ops s3fb_fast_tile_ops = {
203 .fb_tilefill = svga_tilefill, 198 .fb_tilefill = svga_tilefill,
204 .fb_tileblit = svga_tileblit, 199 .fb_tileblit = svga_tileblit,
205 .fb_tilecursor = svga_tilecursor, 200 .fb_tilecursor = svga_tilecursor,
206 .fb_get_tilemax = s3fb_get_tilemax, 201 .fb_get_tilemax = svga_get_tilemax,
207}; 202};
208 203
209 204
@@ -459,9 +454,10 @@ static int s3fb_set_par(struct fb_info *info)
459 info->flags &= ~FBINFO_MISC_TILEBLITTING; 454 info->flags &= ~FBINFO_MISC_TILEBLITTING;
460 info->tileops = NULL; 455 info->tileops = NULL;
461 456
462 /* supports blit rectangles of any dimension */ 457 /* in 4bpp supports 8p wide tiles only, any tiles otherwise */
463 info->pixmap.blit_x = ~(u32)0; 458 info->pixmap.blit_x = (bpp == 4) ? (1 << (8 - 1)) : (~(u32)0);
464 info->pixmap.blit_y = ~(u32)0; 459 info->pixmap.blit_y = ~(u32)0;
460
465 offset_value = (info->var.xres_virtual * bpp) / 64; 461 offset_value = (info->var.xres_virtual * bpp) / 64;
466 screen_size = info->var.yres_virtual * info->fix.line_length; 462 screen_size = info->var.yres_virtual * info->fix.line_length;
467 } else { 463 } else {
@@ -470,6 +466,7 @@ static int s3fb_set_par(struct fb_info *info)
470 466
471 info->flags |= FBINFO_MISC_TILEBLITTING; 467 info->flags |= FBINFO_MISC_TILEBLITTING;
472 info->tileops = fasttext ? &s3fb_fast_tile_ops : &s3fb_tile_ops; 468 info->tileops = fasttext ? &s3fb_fast_tile_ops : &s3fb_tile_ops;
469
473 /* supports 8x16 tiles only */ 470 /* supports 8x16 tiles only */
474 info->pixmap.blit_x = 1 << (8 - 1); 471 info->pixmap.blit_x = 1 << (8 - 1);
475 info->pixmap.blit_y = 1 << (16 - 1); 472 info->pixmap.blit_y = 1 << (16 - 1);