diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2007-05-08 03:40:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 14:15:33 -0400 |
commit | 34ed25f50b347c7e1ff78f9308e025ddd57c2f20 (patch) | |
tree | f6416c654f112c48063ed8071882f50088be3696 /drivers/video | |
parent | 9a31f0f7679aeaf79c613feaa3f4170741ccb218 (diff) |
s3fb: updates
Move s3fb_get_tilemax to svgalib.c as svga_get_tilemax, because it reports
limitation of other code from svgalib (svga_settile, svga_tilecopy, ...)
Limit font width to 8 pixels in 4 bpp mode.
Signed-off-by: Ondrej Zajicek <santiago@crfreenet.org>
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/video')
-rw-r--r-- | drivers/video/s3fb.c | 15 | ||||
-rw-r--r-- | drivers/video/svgalib.c | 6 |
2 files changed, 12 insertions, 9 deletions
diff --git a/drivers/video/s3fb.c b/drivers/video/s3fb.c index 4d0e204dd8ad..756fafb41d78 100644 --- a/drivers/video/s3fb.c +++ b/drivers/video/s3fb.c | |||
@@ -183,18 +183,13 @@ static void s3fb_settile_fast(struct fb_info *info, struct fb_tilemap *map) | |||
183 | } | 183 | } |
184 | } | 184 | } |
185 | 185 | ||
186 | static int s3fb_get_tilemax(struct fb_info *info) | ||
187 | { | ||
188 | return 256; | ||
189 | } | ||
190 | |||
191 | static struct fb_tile_ops s3fb_tile_ops = { | 186 | static struct fb_tile_ops s3fb_tile_ops = { |
192 | .fb_settile = svga_settile, | 187 | .fb_settile = svga_settile, |
193 | .fb_tilecopy = svga_tilecopy, | 188 | .fb_tilecopy = svga_tilecopy, |
194 | .fb_tilefill = svga_tilefill, | 189 | .fb_tilefill = svga_tilefill, |
195 | .fb_tileblit = svga_tileblit, | 190 | .fb_tileblit = svga_tileblit, |
196 | .fb_tilecursor = svga_tilecursor, | 191 | .fb_tilecursor = svga_tilecursor, |
197 | .fb_get_tilemax = s3fb_get_tilemax, | 192 | .fb_get_tilemax = svga_get_tilemax, |
198 | }; | 193 | }; |
199 | 194 | ||
200 | static struct fb_tile_ops s3fb_fast_tile_ops = { | 195 | static struct fb_tile_ops s3fb_fast_tile_ops = { |
@@ -203,7 +198,7 @@ static struct fb_tile_ops s3fb_fast_tile_ops = { | |||
203 | .fb_tilefill = svga_tilefill, | 198 | .fb_tilefill = svga_tilefill, |
204 | .fb_tileblit = svga_tileblit, | 199 | .fb_tileblit = svga_tileblit, |
205 | .fb_tilecursor = svga_tilecursor, | 200 | .fb_tilecursor = svga_tilecursor, |
206 | .fb_get_tilemax = s3fb_get_tilemax, | 201 | .fb_get_tilemax = svga_get_tilemax, |
207 | }; | 202 | }; |
208 | 203 | ||
209 | 204 | ||
@@ -459,9 +454,10 @@ static int s3fb_set_par(struct fb_info *info) | |||
459 | info->flags &= ~FBINFO_MISC_TILEBLITTING; | 454 | info->flags &= ~FBINFO_MISC_TILEBLITTING; |
460 | info->tileops = NULL; | 455 | info->tileops = NULL; |
461 | 456 | ||
462 | /* supports blit rectangles of any dimension */ | 457 | /* in 4bpp supports 8p wide tiles only, any tiles otherwise */ |
463 | info->pixmap.blit_x = ~(u32)0; | 458 | info->pixmap.blit_x = (bpp == 4) ? (1 << (8 - 1)) : (~(u32)0); |
464 | info->pixmap.blit_y = ~(u32)0; | 459 | info->pixmap.blit_y = ~(u32)0; |
460 | |||
465 | offset_value = (info->var.xres_virtual * bpp) / 64; | 461 | offset_value = (info->var.xres_virtual * bpp) / 64; |
466 | screen_size = info->var.yres_virtual * info->fix.line_length; | 462 | screen_size = info->var.yres_virtual * info->fix.line_length; |
467 | } else { | 463 | } else { |
@@ -470,6 +466,7 @@ static int s3fb_set_par(struct fb_info *info) | |||
470 | 466 | ||
471 | info->flags |= FBINFO_MISC_TILEBLITTING; | 467 | info->flags |= FBINFO_MISC_TILEBLITTING; |
472 | info->tileops = fasttext ? &s3fb_fast_tile_ops : &s3fb_tile_ops; | 468 | info->tileops = fasttext ? &s3fb_fast_tile_ops : &s3fb_tile_ops; |
469 | |||
473 | /* supports 8x16 tiles only */ | 470 | /* supports 8x16 tiles only */ |
474 | info->pixmap.blit_x = 1 << (8 - 1); | 471 | info->pixmap.blit_x = 1 << (8 - 1); |
475 | info->pixmap.blit_y = 1 << (16 - 1); | 472 | info->pixmap.blit_y = 1 << (16 - 1); |
diff --git a/drivers/video/svgalib.c b/drivers/video/svgalib.c index 7fddc4a9b99b..079cdc911e48 100644 --- a/drivers/video/svgalib.c +++ b/drivers/video/svgalib.c | |||
@@ -342,6 +342,11 @@ void svga_tilecursor(struct fb_info *info, struct fb_tilecursor *cursor) | |||
342 | vga_wcrt(NULL, 0x0A, cs); /* set cursor start and enable it */ | 342 | vga_wcrt(NULL, 0x0A, cs); /* set cursor start and enable it */ |
343 | } | 343 | } |
344 | 344 | ||
345 | int svga_get_tilemax(struct fb_info *info) | ||
346 | { | ||
347 | return 256; | ||
348 | } | ||
349 | |||
345 | 350 | ||
346 | /* ------------------------------------------------------------------------- */ | 351 | /* ------------------------------------------------------------------------- */ |
347 | 352 | ||
@@ -623,6 +628,7 @@ EXPORT_SYMBOL(svga_tilecopy); | |||
623 | EXPORT_SYMBOL(svga_tilefill); | 628 | EXPORT_SYMBOL(svga_tilefill); |
624 | EXPORT_SYMBOL(svga_tileblit); | 629 | EXPORT_SYMBOL(svga_tileblit); |
625 | EXPORT_SYMBOL(svga_tilecursor); | 630 | EXPORT_SYMBOL(svga_tilecursor); |
631 | EXPORT_SYMBOL(svga_get_tilemax); | ||
626 | 632 | ||
627 | EXPORT_SYMBOL(svga_compute_pll); | 633 | EXPORT_SYMBOL(svga_compute_pll); |
628 | EXPORT_SYMBOL(svga_check_timings); | 634 | EXPORT_SYMBOL(svga_check_timings); |