aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/fbmem.c
diff options
context:
space:
mode:
authorJames Simmons <jsimmons@pentafluge.infradead.org>2005-06-21 20:16:58 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-21 22:07:39 -0400
commitf5a9951c94e7a285a3d00648e3d790a7f016bd11 (patch)
tree47815b54fef9bae70f26053cacdd489ff338d152 /drivers/video/fbmem.c
parent5a3b5899f190a365eed806302f4b58a493233f96 (diff)
[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/video/fbmem.c')
-rw-r--r--drivers/video/fbmem.c57
1 files changed, 5 insertions, 52 deletions
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 8cef020d1801..78907a873493 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)
76EXPORT_SYMBOL(fb_get_color_depth); 76EXPORT_SYMBOL(fb_get_color_depth);
77 77
78/* 78/*
79 * Drawing helpers. 79 * Data padding functions.
80 */ 80 */
81void fb_iomove_buf_aligned(struct fb_info *info, struct fb_pixmap *buf,
82 u8 *dst, u32 d_pitch, u8 *src, u32 s_pitch,
83 u32 height)
84{
85 int i;
86
87 for (i = height; i--; ) {
88 buf->outbuf(info, dst, src, s_pitch);
89 src += s_pitch;
90 dst += d_pitch;
91 }
92}
93
94void fb_sysmove_buf_aligned(struct fb_info *info, struct fb_pixmap *buf, 81void fb_sysmove_buf_aligned(struct fb_info *info, struct fb_pixmap *buf,
95 u8 *dst, u32 d_pitch, u8 *src, u32 s_pitch, 82 u8 *dst, u32 d_pitch, u8 *src, u32 s_pitch,
96 u32 height) 83 u32 height)
97{ 84{
98 int i, j; 85 int i;
99 86
100 for (i = height; i--; ) { 87 for (i = height; i--; ) {
101 for (j = 0; j < s_pitch; j++) 88 memcpy(dst, src, s_pitch);
102 dst[j] = src[j];
103 src += s_pitch; 89 src += s_pitch;
104 dst += d_pitch; 90 dst += d_pitch;
105 } 91 }
106} 92}
107 93EXPORT_SYMBOL(fb_sysmove_buf_aligned);
108void fb_iomove_buf_unaligned(struct fb_info *info, struct fb_pixmap *buf,
109 u8 *dst, u32 d_pitch, u8 *src, u32 idx,
110 u32 height, u32 shift_high, u32 shift_low,
111 u32 mod)
112{
113 u8 mask = (u8) (0xfff << shift_high), tmp;
114 int i, j;
115
116 for (i = height; i--; ) {
117 for (j = 0; j < idx; j++) {
118 tmp = buf->inbuf(info, dst+j);
119 tmp &= mask;
120 tmp |= *src >> shift_low;
121 buf->outbuf(info, dst+j, &tmp, 1);
122 tmp = *src << shift_high;
123 buf->outbuf(info, dst+j+1, &tmp, 1);
124 src++;
125 }
126 tmp = buf->inbuf(info, dst+idx);
127 tmp &= mask;
128 tmp |= *src >> shift_low;
129 buf->outbuf(info, dst+idx, &tmp, 1);
130 if (shift_high < mod) {
131 tmp = *src << shift_high;
132 buf->outbuf(info, dst+idx+1, &tmp, 1);
133 }
134 src++;
135 dst += d_pitch;
136 }
137}
138 94
139void fb_sysmove_buf_unaligned(struct fb_info *info, struct fb_pixmap *buf, 95void fb_sysmove_buf_unaligned(struct fb_info *info, struct fb_pixmap *buf,
140 u8 *dst, u32 d_pitch, u8 *src, u32 idx, 96 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,
166 dst += d_pitch; 122 dst += d_pitch;
167 } 123 }
168} 124}
125EXPORT_SYMBOL(fb_sysmove_buf_unaligned);
169 126
170/* 127/*
171 * we need to lock this section since fb_cursor 128 * we need to lock this section since fb_cursor
@@ -1357,10 +1314,6 @@ EXPORT_SYMBOL(fb_set_var);
1357EXPORT_SYMBOL(fb_blank); 1314EXPORT_SYMBOL(fb_blank);
1358EXPORT_SYMBOL(fb_pan_display); 1315EXPORT_SYMBOL(fb_pan_display);
1359EXPORT_SYMBOL(fb_get_buffer_offset); 1316EXPORT_SYMBOL(fb_get_buffer_offset);
1360EXPORT_SYMBOL(fb_iomove_buf_unaligned);
1361EXPORT_SYMBOL(fb_iomove_buf_aligned);
1362EXPORT_SYMBOL(fb_sysmove_buf_unaligned);
1363EXPORT_SYMBOL(fb_sysmove_buf_aligned);
1364EXPORT_SYMBOL(fb_set_suspend); 1317EXPORT_SYMBOL(fb_set_suspend);
1365EXPORT_SYMBOL(fb_register_client); 1318EXPORT_SYMBOL(fb_register_client);
1366EXPORT_SYMBOL(fb_unregister_client); 1319EXPORT_SYMBOL(fb_unregister_client);