From bf26ad72a60c0009a99179b449a43daa6bf4b4f6 Mon Sep 17 00:00:00 2001 From: "Antonino A. Daplas" Date: Tue, 8 May 2007 00:39:09 -0700 Subject: fbdev: advertise limitation of drawing engine A few drivers are not capable of blitting rectangles of any dimension. vga16fb can only blit 8-pixel wide rectangles, while s3fb (in tileblitting mode) can only blit 8x16 rectangles. For example, loading a 12x22 font in vga16fb will result in a corrupt display. Advertise this limitation/capability in info->pixmap.blit_x and blit_y. These fields are 32-bit arrays (font max is 32x32 only), ie, if bit 7 is set, then width/height of 7+1 is supported. Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/video/fbmem.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers/video/fbmem.c') diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index 7b72841222d..c4ce3e44327 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c @@ -1321,6 +1321,12 @@ register_framebuffer(struct fb_info *fb_info) } fb_info->pixmap.offset = 0; + if (!fb_info->pixmap.blit_x) + fb_info->pixmap.blit_x = ~(u32)0; + + if (!fb_info->pixmap.blit_y) + fb_info->pixmap.blit_y = ~(u32)0; + if (!fb_info->modelist.prev || !fb_info->modelist.next) INIT_LIST_HEAD(&fb_info->modelist); -- cgit v1.2.3-70-g09d2