From: Antonino A. Daplas Date: Tue, 8 May 2007 07:39:39 +0000 (-0700) Subject: s3fb: implement fb_get_caps X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=56c7554938e5945b770365e326f0c3d031ca231f;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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) return 0; } +/* Get capabilities of accelerator based on the mode */ + +static void s3fb_get_caps(struct fb_info *info, struct fb_blit_caps *caps, + struct fb_var_screeninfo *var) +{ + if (var->bits_per_pixel == 0) { + /* can only support 256 8x16 bitmap */ + caps->x = 1 << (8 - 1); + caps->y = 1 << (16 - 1); + caps->len = 256; + } else { + caps->x = ~(u32)0; + caps->y = ~(u32)0; + caps->len = ~(u32)0; + } +} + /* ------------------------------------------------------------------------- */ /* Frame buffer operations */ @@ -815,6 +832,7 @@ static struct fb_ops s3fb_ops = { .fb_fillrect = s3fb_fillrect, .fb_copyarea = cfb_copyarea, .fb_imageblit = s3fb_imageblit, + .fb_get_caps = s3fb_get_caps, }; /* ------------------------------------------------------------------------- */