Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bf26ad72a60c0009a99179b449a43daa6bf4b4f6
Commit:     bf26ad72a60c0009a99179b449a43daa6bf4b4f6
Parent:     dc0e6e0544f1cb2af44e5d7a7e68acda05dec6fa
Author:     Antonino A. Daplas <[EMAIL PROTECTED]>
AuthorDate: Tue May 8 00:39:09 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue May 8 11:15:30 2007 -0700

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/video/fbmem.c |    6 ++++++
 include/linux/fb.h    |    4 ++++
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 7b72841..c4ce3e4 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);
 
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 70d154a..619ba1e 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -558,6 +558,10 @@ struct fb_pixmap {
        u32 scan_align;         /* alignment per scanline               */
        u32 access_align;       /* alignment per read/write (bits)      */
        u32 flags;              /* see FB_PIXMAP_*                      */
+       u32 blit_x;             /* supported bit block dimensions (1-32)*/
+       u32 blit_y;             /* Format: blit_x = 1 << (width - 1)    */
+                               /*         blit_y = 1 << (height - 1)   */
+                               /* if 0, will be set to 0xffffffff (all)*/
        /* access methods */
        void (*writeio)(struct fb_info *info, void __iomem *dst, void *src, 
unsigned int size);
        void (*readio) (struct fb_info *info, void *dst, void __iomem *src, 
unsigned int size);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to