aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJames Simmons <jsimmons@pentafluge.infradead.org>2005-06-21 17:16:58 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-21 19:07:39 -0700
commitf5a9951c94e7a285a3d00648e3d790a7f016bd11 (patch)
tree47815b54fef9bae70f26053cacdd489ff338d152 /drivers
parent5a3b5899f190a365eed806302f4b58a493233f96 (diff)
downloadlinux-f5a9951c94e7a285a3d00648e3d790a7f016bd11.tar.gz
[PATCH] fbdev: iomove removal
Since no one is using the inbuf, outbuf of struct fb_pixmap I removed their use in the framebuffer console. The idea is instead move the pixmap functionality below the accelerated functions intead of on top as the way it is now. If there is no objection please apply. This is against Linus latestr GIT tree. Thank you. Signed-off-by: James Simmons <jsimmons@www.infradead.org> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/console/bitblit.c18
-rw-r--r--drivers/video/fbmem.c57
-rw-r--r--drivers/video/softcursor.c8
3 files changed, 9 insertions, 74 deletions
diff --git a/drivers/video/console/bitblit.c b/drivers/video/console/bitblit.c
index b28a4b0e395e6..4eef20790c3ea 100644
--- a/drivers/video/console/bitblit.c
+++ b/drivers/video/console/bitblit.c
@@ -107,13 +107,6 @@ static void bit_putcs(struct vc_data *vc, struct fb_info *info,
const unsigned short *s, int count, int yy, int xx,
int fg, int bg)
{
- void (*move_unaligned)(struct fb_info *info, struct fb_pixmap *buf,
- u8 *dst, u32 d_pitch, u8 *src, u32 idx,
- u32 height, u32 shift_high, u32 shift_low,
- u32 mod);
- void (*move_aligned)(struct fb_info *info, struct fb_pixmap *buf,
- u8 *dst, u32 d_pitch, u8 *src, u32 s_pitch,
- u32 height);
unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff;
unsigned int width = (vc->vc_font.width + 7) >> 3;
unsigned int cellsize = vc->vc_font.height * width;
@@ -141,13 +134,6 @@ static void bit_putcs(struct vc_data *vc, struct fb_info *info,
image.height = vc->vc_font.height;
image.depth = 1;
- if (info->pixmap.outbuf && info->pixmap.inbuf) {
- move_aligned = fb_iomove_buf_aligned;
- move_unaligned = fb_iomove_buf_unaligned;
- } else {
- move_aligned = fb_sysmove_buf_aligned;
- move_unaligned = fb_sysmove_buf_unaligned;
- }
while (count) {
if (count > maxcnt)
cnt = k = maxcnt;
@@ -171,7 +157,7 @@ static void bit_putcs(struct vc_data *vc, struct fb_info *info,
src = buf;
}
- move_unaligned(info, &info->pixmap, dst, pitch,
+ fb_sysmove_buf_unaligned(info, &info->pixmap, dst, pitch,
src, idx, image.height,
shift_high, shift_low, mod);
shift_low += mod;
@@ -189,7 +175,7 @@ static void bit_putcs(struct vc_data *vc, struct fb_info *info,
src = buf;
}
- move_aligned(info, &info->pixmap, dst, pitch,
+ fb_sysmove_buf_aligned(info, &info->pixmap, dst, pitch,
src, idx, image.height);
dst += width;
}
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 8cef020d1801e..78907a873493e 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -76,65 +76,21 @@ int fb_get_color_depth(struct fb_var_screeninfo *var)
EXPORT_SYMBOL(fb_get_color_depth);
/*
- * Drawing helpers.
+ * Data padding functions.
*/
-void fb_iomove_buf_aligned(struct fb_info *info, struct fb_pixmap *buf,
- u8 *dst, u32 d_pitch, u8 *src, u32 s_pitch,
- u32 height)
-{
- int i;
-
- for (i = height; i--; ) {
- buf->outbuf(info, dst, src, s_pitch);
- src += s_pitch;
- dst += d_pitch;
- }
-}
-
void fb_sysmove_buf_aligned(struct fb_info *info, struct fb_pixmap *buf,
u8 *dst, u32 d_pitch, u8 *src, u32 s_pitch,
u32 height)
{
- int i, j;
+ int i;
for (i = height; i--; ) {
- for (j = 0; j < s_pitch; j++)
- dst[j] = src[j];
+ memcpy(dst, src, s_pitch);
src += s_pitch;
dst += d_pitch;
}
}
-
-void fb_iomove_buf_unaligned(struct fb_info *info, struct fb_pixmap *buf,
- u8 *dst, u32 d_pitch, u8 *src, u32 idx,
- u32 height, u32 shift_high, u32 shift_low,
- u32 mod)
-{
- u8 mask = (u8) (0xfff << shift_high), tmp;
- int i, j;
-
- for (i = height; i--; ) {
- for (j = 0; j < idx; j++) {
- tmp = buf->inbuf(info, dst+j);
- tmp &= mask;
- tmp |= *src >> shift_low;
- buf->outbuf(info, dst+j, &tmp, 1);
- tmp = *src << shift_high;
- buf->outbuf(info, dst+j+1, &tmp, 1);
- src++;
- }
- tmp = buf->inbuf(info, dst+idx);
- tmp &= mask;
- tmp |= *src >> shift_low;
- buf->outbuf(info, dst+idx, &tmp, 1);
- if (shift_high < mod) {
- tmp = *src << shift_high;
- buf->outbuf(info, dst+idx+1, &tmp, 1);
- }
- src++;
- dst += d_pitch;
- }
-}
+EXPORT_SYMBOL(fb_sysmove_buf_aligned);
void fb_sysmove_buf_unaligned(struct fb_info *info, struct fb_pixmap *buf,
u8 *dst, u32 d_pitch, u8 *src, u32 idx,
@@ -166,6 +122,7 @@ void fb_sysmove_buf_unaligned(struct fb_info *info, struct fb_pixmap *buf,
dst += d_pitch;
}
}
+EXPORT_SYMBOL(fb_sysmove_buf_unaligned);
/*
* we need to lock this section since fb_cursor
@@ -1357,10 +1314,6 @@ EXPORT_SYMBOL(fb_set_var);
EXPORT_SYMBOL(fb_blank);
EXPORT_SYMBOL(fb_pan_display);
EXPORT_SYMBOL(fb_get_buffer_offset);
-EXPORT_SYMBOL(fb_iomove_buf_unaligned);
-EXPORT_SYMBOL(fb_iomove_buf_aligned);
-EXPORT_SYMBOL(fb_sysmove_buf_unaligned);
-EXPORT_SYMBOL(fb_sysmove_buf_aligned);
EXPORT_SYMBOL(fb_set_suspend);
EXPORT_SYMBOL(fb_register_client);
EXPORT_SYMBOL(fb_unregister_client);
diff --git a/drivers/video/softcursor.c b/drivers/video/softcursor.c
index 13a4511539a15..a6c5ca88d6b0d 100644
--- a/drivers/video/softcursor.c
+++ b/drivers/video/softcursor.c
@@ -58,12 +58,8 @@ int soft_cursor(struct fb_info *info, struct fb_cursor *cursor)
} else
memcpy(src, image->data, dsize);
- if (info->pixmap.outbuf)
- fb_iomove_buf_aligned(info, &info->pixmap, dst, d_pitch, src,
- s_pitch, image->height);
- else
- fb_sysmove_buf_aligned(info, &info->pixmap, dst, d_pitch, src,
- s_pitch, image->height);
+ fb_sysmove_buf_aligned(info, &info->pixmap, dst, d_pitch, src,
+ s_pitch, image->height);
image->data = dst;
info->fbops->fb_imageblit(info, image);