11 #include <linux/module.h>
12 #include <linux/slab.h>
13 #include <linux/string.h>
17 #include <asm/types.h>
39 for (i = 0; i < vc->
vc_font.width; i++) {
40 for (j = 0; j <
width; j++) {
47 if (msk1 && j == width - 2)
64 int sx,
int dy,
int dx,
int height,
int width)
70 area.sx = sy * vc->
vc_font.height;
75 area.height = width * vc->
vc_font.width;
77 info->fbops->fb_copyarea(
info, &area);
112 ccw_update_attr(buf, src, attr, vc);
117 __fb_pad_aligned_buffer(dst, d_pitch, src, idx,
123 dst += d_pitch * vc->
vc_font.width;
126 info->
fbops->fb_imageblit(info, image);
130 const unsigned short *s,
int count,
int yy,
int xx,
138 u32 scan_align = info->
pixmap.scan_align - 1;
139 u32 buf_align = info->
pixmap.buf_align - 1;
170 pitch = ((image.
width + 7) >> 3) + scan_align;
171 pitch &= ~scan_align;
172 size = pitch * image.
height + buf_align;
176 ccw_putcs_aligned(vc, info, s, attribute, cnt, pitch,
177 width, cellsize, &image, buf, dst);
191 static void ccw_clear_margins(
struct vc_data *vc,
struct fb_info *info,
194 unsigned int cw = vc->
vc_font.width;
195 unsigned int ch = vc->
vc_font.height;
197 unsigned int bh = info->
var.xres - (vc->
vc_rows*ch);
198 unsigned int bs = vc->
vc_rows*ch;
205 if (rw && !bottom_only) {
223 int softback_lines,
int fg,
int bg)
228 int w = (vc->
vc_font.height + 7) >> 3, c;
229 int y = real_y(ops->
p, vc->
vc_y);
240 if (softback_lines) {
241 if (y + softback_lines >= vc->
vc_rows) {
250 attribute = get_attribute(info, c);
267 ccw_update_attr(dst, src, attribute, vc);
309 int cur_height,
size, i = 0;
310 int width = (vc->
vc_font.width + 7)/8;
333 cur_height = (vc->
vc_font.height < 10) ? 1 : 2;
336 cur_height = vc->
vc_font.height/3;
339 cur_height = vc->
vc_font.height >> 1;
342 cur_height = (vc->
vc_font.height << 1)/3;
346 cur_height = vc->
vc_font.height;
350 size = (vc->
vc_font.height - cur_height) * width;
353 size = cur_height *
width;
386 if (info->
fbops->fb_cursor)
395 static int ccw_update_start(
struct fb_info *info)
402 yoffset = (vyres - info->
var.yres) - ops->
var.xoffset;
403 ops->
var.xoffset = ops->
var.yoffset;
404 ops->
var.yoffset = yoffset;
406 ops->
var.xoffset = info->
var.xoffset;
407 ops->
var.yoffset = info->
var.yoffset;
408 ops->
var.vmode = info->
var.vmode;
414 ops->
bmove = ccw_bmove;
415 ops->
clear = ccw_clear;
416 ops->
putcs = ccw_putcs;