Skip to content

Commit

Permalink
s3fb: implement fb_get_caps
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Antonino A. Daplas authored and Linus Torvalds committed May 8, 2007
1 parent 38a3dc5 commit 56c7554
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions drivers/video/s3fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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,
};

/* ------------------------------------------------------------------------- */
Expand Down

0 comments on commit 56c7554

Please sign in to comment.