aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAntonino A. Daplas <adaplas@gmail.com>2007-05-08 03:39:39 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 14:15:32 -0400
commit56c7554938e5945b770365e326f0c3d031ca231f (patch)
treeb26f422832971b67e1e4573cffdbe7f9e7fd9936 /drivers
parent38a3dc51852d8350b156ea909c5aa8767d71b005 (diff)
s3fb: implement fb_get_caps
Implement fb_get_caps(). This will allow the driver to tell upper layer that it can only support 256 8x16 bitmaps when in tileblitting mode (var->bits_per_pixel == 0); 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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/s3fb.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/video/s3fb.c b/drivers/video/s3fb.c
index dfa717b5b63a..4d0e204dd8ad 100644
--- a/drivers/video/s3fb.c
+++ b/drivers/video/s3fb.c
@@ -799,6 +799,23 @@ static int s3fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
799 return 0; 799 return 0;
800} 800}
801 801
802/* Get capabilities of accelerator based on the mode */
803
804static void s3fb_get_caps(struct fb_info *info, struct fb_blit_caps *caps,
805 struct fb_var_screeninfo *var)
806{
807 if (var->bits_per_pixel == 0) {
808 /* can only support 256 8x16 bitmap */
809 caps->x = 1 << (8 - 1);
810 caps->y = 1 << (16 - 1);
811 caps->len = 256;
812 } else {
813 caps->x = ~(u32)0;
814 caps->y = ~(u32)0;
815 caps->len = ~(u32)0;
816 }
817}
818
802/* ------------------------------------------------------------------------- */ 819/* ------------------------------------------------------------------------- */
803 820
804/* Frame buffer operations */ 821/* Frame buffer operations */
@@ -815,6 +832,7 @@ static struct fb_ops s3fb_ops = {
815 .fb_fillrect = s3fb_fillrect, 832 .fb_fillrect = s3fb_fillrect,
816 .fb_copyarea = cfb_copyarea, 833 .fb_copyarea = cfb_copyarea,
817 .fb_imageblit = s3fb_imageblit, 834 .fb_imageblit = s3fb_imageblit,
835 .fb_get_caps = s3fb_get_caps,
818}; 836};
819 837
820/* ------------------------------------------------------------------------- */ 838/* ------------------------------------------------------------------------- */