11 #include <linux/module.h>
12 #include <linux/slab.h>
13 #include <linux/string.h>
17 #include <asm/types.h>
33 offset = offset *
width;
35 for (i = 0; i < cellsize; i++) {
49 int sx,
int dy,
int dx,
int height,
int width)
61 area.width = width * vc->
vc_font.width;
63 info->fbops->fb_copyarea(
info, &area);
99 ud_update_attr(buf, src, attr, vc);
104 __fb_pad_aligned_buffer(dst, d_pitch, src, idx,
113 info->
fbops->fb_imageblit(info, image);
116 static inline void ud_putcs_unaligned(
struct vc_data *vc,
119 u32 s_pitch,
u32 cellsize,
134 ud_update_attr(buf, src, attr, vc);
139 image->
height, shift_high,
142 dst += (shift_low >= 8) ? s_pitch : s_pitch - 1;
144 shift_high = 8 - shift_low;
147 info->
fbops->fb_imageblit(info, image);
152 const unsigned short *s,
int count,
int yy,
int xx,
160 u32 scan_align = info->
pixmap.scan_align - 1;
161 u32 buf_align = info->
pixmap.buf_align - 1;
193 pitch = ((image.
width + 7) >> 3) + scan_align;
194 pitch &= ~scan_align;
195 size = pitch * image.
height + buf_align;
201 ud_putcs_aligned(vc, info, s, attribute, cnt, pitch,
202 width, cellsize, &image, buf, dst);
204 ud_putcs_unaligned(vc, info, s, attribute, cnt, pitch,
205 width, cellsize, &image,
222 static void ud_clear_margins(
struct vc_data *vc,
struct fb_info *info,
225 unsigned int cw = vc->
vc_font.width;
226 unsigned int ch = vc->
vc_font.height;
228 unsigned int bh = info->
var.yres - (vc->
vc_rows*ch);
235 if (rw && !bottom_only) {
253 int softback_lines,
int fg,
int bg)
259 int y = real_y(ops->
p, vc->
vc_y);
271 if (softback_lines) {
272 if (y + softback_lines >= vc->
vc_rows) {
281 attribute = get_attribute(info,
c);
298 ud_update_attr(dst, src, attribute, vc);
340 int cur_height,
size,
i = 0;
357 cur_height = (vc->
vc_font.height < 10) ? 1 : 2;
360 cur_height = vc->
vc_font.height/3;
363 cur_height = vc->
vc_font.height >> 1;
366 cur_height = (vc->
vc_font.height << 1)/3;
370 cur_height = vc->
vc_font.height;
374 size = cur_height *
w;
379 size = (vc->
vc_font.height - cur_height) * w;
410 if (info->
fbops->fb_cursor)
419 static int ud_update_start(
struct fb_info *info)
422 int xoffset, yoffset;
427 xoffset = vxres - info->
var.xres - ops->
var.xoffset;
428 yoffset = vyres - info->
var.yres - ops->
var.yoffset;
431 ops->
var.xoffset = xoffset;
432 ops->
var.yoffset = yoffset;
434 ops->
var.xoffset = info->
var.xoffset;
435 ops->
var.yoffset = info->
var.yoffset;
436 ops->
var.vmode = info->
var.vmode;
442 ops->
bmove = ud_bmove;
443 ops->
clear = ud_clear;
444 ops->
putcs = ud_putcs;