diff options
author | James Simmons <jsimmons@pentafluge.infradead.org> | 2005-06-21 20:16:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-21 22:07:39 -0400 |
commit | f5a9951c94e7a285a3d00648e3d790a7f016bd11 (patch) | |
tree | 47815b54fef9bae70f26053cacdd489ff338d152 /drivers/video | |
parent | 5a3b5899f190a365eed806302f4b58a493233f96 (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')
-rw-r--r-- | drivers/video/console/bitblit.c | 18 | ||||
-rw-r--r-- | drivers/video/fbmem.c | 57 | ||||
-rw-r--r-- | drivers/video/softcursor.c | 8 |
3 files changed, 9 insertions, 74 deletions
diff --git a/drivers/video/console/bitblit.c b/drivers/video/console/bitblit.c index b28a4b0e395e..4eef20790c3e 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, | |||
107 | const unsigned short *s, int count, int yy, int xx, | 107 | const unsigned short *s, int count, int yy, int xx, |
108 | int fg, int bg) | 108 | int fg, int bg) |
109 | { | 109 | { |
110 | void (*move_unaligned)(struct fb_info *info, struct fb_pixmap *buf, | ||
111 | u8 *dst, u32 d_pitch, u8 *src, u32 idx, | ||
112 | u32 height, u32 shift_high, u32 shift_low, | ||
113 | u32 mod); | ||
114 | void (*move_aligned)(struct fb_info *info, struct fb_pixmap *buf, | ||
115 | u8 *dst, u32 d_pitch, u8 *src, u32 s_pitch, | ||
116 | u32 height); | ||
117 | unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; | 110 | unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; |
118 | unsigned int width = (vc->vc_font.width + 7) >> 3; | 111 | unsigned int width = (vc->vc_font.width + 7) >> 3; |
119 | unsigned int cellsize = vc->vc_font.height * width; | 112 | unsigned int cellsize = vc->vc_font.height * width; |
@@ -141,13 +134,6 @@ static void bit_putcs(struct vc_data *vc, struct fb_info *info, | |||
141 | image.height = vc->vc_font.height; | 134 | image.height = vc->vc_font.height; |
142 | image.depth = 1; | 135 | image.depth = 1; |
143 | 136 | ||
144 | if (info->pixmap.outbuf && info->pixmap.inbuf) { | ||
145 | move_aligned = fb_iomove_buf_aligned; | ||
146 | move_unaligned = fb_iomove_buf_unaligned; | ||
147 | } else { | ||
148 | move_aligned = fb_sysmove_buf_aligned; | ||
149 | move_unaligned = fb_sysmove_buf_unaligned; | ||
150 | } | ||
151 | while (count) { | 137 | while (count) { |
152 | if (count > maxcnt) | 138 | if (count > maxcnt) |
153 | cnt = k = maxcnt; | 139 | cnt = k = maxcnt; |
@@ -171,7 +157,7 @@ static void bit_putcs(struct vc_data *vc, struct fb_info *info, | |||
171 | src = buf; | 157 | src = buf; |
172 | } | 158 | } |
173 | 159 | ||
174 | move_unaligned(info, &info->pixmap, dst, pitch, | 160 | fb_sysmove_buf_unaligned(info, &info->pixmap, dst, pitch, |
175 | src, idx, image.height, | 161 | src, idx, image.height, |
176 | shift_high, shift_low, mod); | 162 | shift_high, shift_low, mod); |
177 | shift_low += mod; | 163 | shift_low += mod; |
@@ -189,7 +175,7 @@ static void bit_putcs(struct vc_data *vc, struct fb_info *info, | |||
189 | src = buf; | 175 | src = buf; |
190 | } | 176 | } |
191 | 177 | ||
192 | move_aligned(info, &info->pixmap, dst, pitch, | 178 | fb_sysmove_buf_aligned(info, &info->pixmap, dst, pitch, |
193 | src, idx, image.height); | 179 | src, idx, image.height); |
194 | dst += width; | 180 | dst += width; |
195 | } | 181 | } |
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) | |||
76 | EXPORT_SYMBOL(fb_get_color_depth); | 76 | EXPORT_SYMBOL(fb_get_color_depth); |
77 | 77 | ||
78 | /* | 78 | /* |
79 | * Drawing helpers. | 79 | * Data padding functions. |
80 | */ | 80 | */ |
81 | void 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 | |||
94 | void fb_sysmove_buf_aligned(struct fb_info *info, struct fb_pixmap *buf, | 81 | void 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 | 93 | EXPORT_SYMBOL(fb_sysmove_buf_aligned); | |
108 | void 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 | ||
139 | void fb_sysmove_buf_unaligned(struct fb_info *info, struct fb_pixmap *buf, | 95 | void 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 | } |
125 | EXPORT_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); | |||
1357 | EXPORT_SYMBOL(fb_blank); | 1314 | EXPORT_SYMBOL(fb_blank); |
1358 | EXPORT_SYMBOL(fb_pan_display); | 1315 | EXPORT_SYMBOL(fb_pan_display); |
1359 | EXPORT_SYMBOL(fb_get_buffer_offset); | 1316 | EXPORT_SYMBOL(fb_get_buffer_offset); |
1360 | EXPORT_SYMBOL(fb_iomove_buf_unaligned); | ||
1361 | EXPORT_SYMBOL(fb_iomove_buf_aligned); | ||
1362 | EXPORT_SYMBOL(fb_sysmove_buf_unaligned); | ||
1363 | EXPORT_SYMBOL(fb_sysmove_buf_aligned); | ||
1364 | EXPORT_SYMBOL(fb_set_suspend); | 1317 | EXPORT_SYMBOL(fb_set_suspend); |
1365 | EXPORT_SYMBOL(fb_register_client); | 1318 | EXPORT_SYMBOL(fb_register_client); |
1366 | EXPORT_SYMBOL(fb_unregister_client); | 1319 | EXPORT_SYMBOL(fb_unregister_client); |
diff --git a/drivers/video/softcursor.c b/drivers/video/softcursor.c index 13a4511539a1..a6c5ca88d6b0 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) | |||
58 | } else | 58 | } else |
59 | memcpy(src, image->data, dsize); | 59 | memcpy(src, image->data, dsize); |
60 | 60 | ||
61 | if (info->pixmap.outbuf) | 61 | fb_sysmove_buf_aligned(info, &info->pixmap, dst, d_pitch, src, |
62 | fb_iomove_buf_aligned(info, &info->pixmap, dst, d_pitch, src, | 62 | s_pitch, image->height); |
63 | s_pitch, image->height); | ||
64 | else | ||
65 | fb_sysmove_buf_aligned(info, &info->pixmap, dst, d_pitch, src, | ||
66 | s_pitch, image->height); | ||
67 | 63 | ||
68 | image->data = dst; | 64 | image->data = dst; |
69 | info->fbops->fb_imageblit(info, image); | 65 | info->fbops->fb_imageblit(info, image); |