11 #include <linux/module.h>
12 #include <linux/slab.h>
13 #include <linux/string.h>
17 #include <asm/types.h>
32 for (i = 0; i < vc->
vc_font.width; i++) {
33 for (j = 0; j <
width; j++) {
50 int sx,
int dy,
int dx,
int height,
int width)
61 area.height = width * vc->
vc_font.width;
63 info->fbops->fb_copyarea(
info, &area);
98 cw_update_attr(buf, src, attr, vc);
103 __fb_pad_aligned_buffer(dst, d_pitch, src, idx,
109 dst += d_pitch * vc->
vc_font.width;
112 info->
fbops->fb_imageblit(info, image);
116 const unsigned short *s,
int count,
int yy,
int xx,
124 u32 scan_align = info->
pixmap.scan_align - 1;
125 u32 buf_align = info->
pixmap.buf_align - 1;
136 image.
dx = vxres - ((yy + 1) * vc->
vc_font.height);
154 pitch = ((image.
width + 7) >> 3) + scan_align;
155 pitch &= ~scan_align;
156 size = pitch * image.
height + buf_align;
160 cw_putcs_aligned(vc, info, s, attribute, cnt, pitch,
161 width, cellsize, &image, buf, dst);
175 static void cw_clear_margins(
struct vc_data *vc,
struct fb_info *info,
178 unsigned int cw = vc->
vc_font.width;
179 unsigned int ch = vc->
vc_font.height;
181 unsigned int bh = info->
var.xres - (vc->
vc_rows*ch);
182 unsigned int rs = info->
var.yres -
rw;
189 if (rw && !bottom_only) {
207 int softback_lines,
int fg,
int bg)
212 int w = (vc->
vc_font.height + 7) >> 3, c;
213 int y = real_y(ops->
p, vc->
vc_y);
224 if (softback_lines) {
225 if (y + softback_lines >= vc->
vc_rows) {
234 attribute = get_attribute(info, c);
251 cw_update_attr(dst, src, attribute, vc);
293 int cur_height,
size, i = 0;
294 int width = (vc->
vc_font.width + 7)/8;
317 cur_height = (vc->
vc_font.height < 10) ? 1 : 2;
320 cur_height = vc->
vc_font.height/3;
323 cur_height = vc->
vc_font.height >> 1;
326 cur_height = (vc->
vc_font.height << 1)/3;
330 cur_height = vc->
vc_font.height;
334 size = (vc->
vc_font.height - cur_height) * width;
337 size = cur_height *
width;
370 if (info->
fbops->fb_cursor)
379 static int cw_update_start(
struct fb_info *info)
386 xoffset = vxres - (info->
var.xres + ops->
var.yoffset);
387 ops->
var.yoffset = ops->
var.xoffset;
388 ops->
var.xoffset = xoffset;
390 ops->
var.xoffset = info->
var.xoffset;
391 ops->
var.yoffset = info->
var.yoffset;
392 ops->
var.vmode = info->
var.vmode;
398 ops->
bmove = cw_bmove;
399 ops->
clear = cw_clear;
400 ops->
putcs = cw_putcs;