Skip to content

Commit

Permalink
s3fb: limit 8x16 rectangles when tileblitting is enabled
Browse files Browse the repository at this point in the history
If tileblitting is enabled (text mode), the hardware can only accept 8x16
bitmaps. Advertise this to the upper layer. And to ensure that an appropriate
font is always available, select an 8x16 font in Kconfig.

Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Antonino A. Daplas authored and Linus Torvalds committed May 8, 2007
1 parent d60d2d8 commit 8db5166
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/video/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1194,6 +1194,7 @@ config FB_S3
select FB_TILEBLITTING
select FB_SVGALIB
select VGASTATE
select FONT_8x16 if FRAMEBUFFER_CONSOLE
---help---
Driver for graphics boards with S3 Trio / S3 Virge chip.

Expand Down
6 changes: 6 additions & 0 deletions drivers/video/s3fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,9 @@ static int s3fb_set_par(struct fb_info *info)
info->flags &= ~FBINFO_MISC_TILEBLITTING;
info->tileops = NULL;

/* supports blit rectangles of any dimension */
info->pixmap.blit_x = ~(u32)0;
info->pixmap.blit_y = ~(u32)0;
offset_value = (info->var.xres_virtual * bpp) / 64;
screen_size = info->var.yres_virtual * info->fix.line_length;
} else {
Expand All @@ -457,6 +460,9 @@ static int s3fb_set_par(struct fb_info *info)

info->flags |= FBINFO_MISC_TILEBLITTING;
info->tileops = fasttext ? &s3fb_fast_tile_ops : &s3fb_tile_ops;
/* supports 8x16 tiles only */
info->pixmap.blit_x = 1 << (8 - 1);
info->pixmap.blit_y = 1 << (16 - 1);

offset_value = info->var.xres_virtual / 16;
screen_size = (info->var.xres_virtual * info->var.yres_virtual) / 64;
Expand Down

0 comments on commit 8db5166

Please sign in to comment.