fbdev: Add c2p support for Atari interleaved bitplanes
PATCH 1/1 fbdev: Add c2p support for Atari interleaved bitplanes
Add c2p (Chunky-to-Planar) support for Atari interleaved bitplanes. This fixes the garbled penguin logo.
Signed-off-by Geert Uytterhoeven <[email protected]>
---
TODO:
- Extract common code
- Separate c2p_planar() and c2p_iplan2()
- Optimize? (for bpp < 8, we can skip steps that just swap zeroes)
drivers/video/amifb.c | 6 - drivers/video/atafb.c | 15 --- drivers/video/c2p.c | 247 +++++++++++++++++++++++++++++++++++++++++--------- drivers/video/c2p.h | 11 +- 4 files changed, 218 insertions(+), 61 deletions(-)
drivers/video/amifb.c +3 -3
@@ -2159,9 +2159,9 @@ static void amifb_imageblit(struct fb_in src += pitch; } }else { -c2p (info->screen_base, image->data, dx, dy, width, height, - par->next_line, par->next_plane, image->width, - info->var.bits_per_pixel); +c2p_planar (info->screen_base, image->data, dx, dy, width, + height, par->next_line, par->next_plane, + image->width, info->var.bits_per_pixel); } }
drivers/video/atafb.c +3 -12
@@ -122,7 +122,6 @@ static struct atafb_par {void *screen_base;int yres_virtual;u_long next_line; -u_long next_plane; #if defined ATAFB_TT || defined ATAFB_STE union { struct {
@@ -1396,14 +1395,7 @@ set_screen_base: par->screen_base = screen_base + var->yoffset * linelen; par->hw.falcon.xoffset =0 ; -// FIXME!!! sort of works, no crash -//par->next_line = linelen; -//par->next_plane = yres_virtual * linelen; par->next_line = linelen; - par->next_plane =2 ; -// crashes -//par->next_plane = linelen; -//par->next_line = yres_virtual * linelen; return 0 ; }
@@ -2702,10 +2694,9 @@ printk("fix->line_length = %u, cfb_image src += pitch; } }else { -// only used for logo; broken -c2p (info->screen_base, image->data, dx, dy, width, height, - par->next_line, par->next_plane, image->width, - info->var.bits_per_pixel); +c2p_iplan2 (info->screen_base, image->data, dx, dy, width, + height, par->next_line, image->width, + info->var.bits_per_pixel); } }
drivers/video/c2p.c +205 -42
367 lines not on this page · raw message
drivers/video/c2p.h +7 -4
@@ -1,7 +1,7 @@/* * Fast C2P (Chunky-to-Planar) Conversion * -* Copyright (C) 2003 Geert Uytterhoeven +* Copyright (C) 2003-2008 Geert Uytterhoeven * * This file is subject to the terms and conditions of the GNU General Public * License. See the file COPYING in the main directory of this archive
@@ -10,7 +10,10 @@#include <linux/types.h> -extern void c2p (u8 *dst,const u8 *src,u32 dx,u32 dy,u32 width,u32 height, -u32 dst_nextline,u32 dst_nextplane,u32 src_nextline, -u32 bpp); +extern void c2p_planar (void *dst,const void *src,u32 dx,u32 dy,u32 width, +u32 height,u32 dst_nextline,u32 dst_nextplane, +u32 src_nextline,u32 bpp); +extern void c2p_iplan2 (void *dst,const void *src,u32 dx,u32 dy,u32 width, +u32 height,u32 dst_nextline,u32 src_nextline, +u32 bpp);
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds