From: Antonino A. Daplas Date: Tue, 8 May 2007 07:39:14 +0000 (-0700) Subject: s3fb: limit 8x16 rectangles when tileblitting is enabled X-Git-Tag: firefly_0821_release~29547 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8db51668f5ef6ae31ed4e4f0c6e2976a190dfa11;p=firefly-linux-kernel-4.4.55.git s3fb: limit 8x16 rectangles when tileblitting is enabled 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 51c4b25dad25..863c5983ee60 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -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. diff --git a/drivers/video/s3fb.c b/drivers/video/s3fb.c index f3470bb7d549..53f1eb9638ae 100644 --- a/drivers/video/s3fb.c +++ b/drivers/video/s3fb.c @@ -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 { @@ -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;