13 #include <linux/module.h>
14 #include <linux/slab.h>
15 #include <linux/string.h>
19 #include <asm/types.h>
33 offset = cellsize - (offset *
width);
34 for (i = 0; i < cellsize; i++) {
47 int sx,
int dy,
int dx,
int height,
int width)
52 area.sy = sy * vc->
vc_font.height;
53 area.dx = dx * vc->
vc_font.width;
54 area.dy = dy * vc->
vc_font.height;
55 area.height = height * vc->
vc_font.height;
56 area.width = width * vc->
vc_font.width;
58 info->
fbops->fb_copyarea(info, &area);
61 static void bit_clear(
struct vc_data *vc,
struct fb_info *info,
int sy,
62 int sx,
int height,
int width)
77 static inline void bit_putcs_aligned(
struct vc_data *vc,
struct fb_info *info,
91 update_attr(buf, src, attr, vc);
96 __fb_pad_aligned_buffer(dst, d_pitch, src, idx,
105 info->
fbops->fb_imageblit(info, image);
108 static inline void bit_putcs_unaligned(
struct vc_data *vc,
111 u32 s_pitch,
u32 cellsize,
126 update_attr(buf, src, attr, vc);
131 image->
height, shift_high,
134 dst += (shift_low >= 8) ? s_pitch : s_pitch - 1;
136 shift_high = 8 - shift_low;
139 info->
fbops->fb_imageblit(info, image);
144 const unsigned short *s,
int count,
int yy,
int xx,
151 u32 scan_align = info->
pixmap.scan_align - 1;
152 u32 buf_align = info->
pixmap.buf_align - 1;
178 pitch &= ~scan_align;
179 size = pitch * image.
height + buf_align;
185 bit_putcs_aligned(vc, info, s, attribute, cnt, pitch,
186 width, cellsize, &image, buf, dst);
188 bit_putcs_unaligned(vc, info, s, attribute, cnt,
189 pitch, width, cellsize, &image,
205 static void bit_clear_margins(
struct vc_data *vc,
struct fb_info *info,
209 unsigned int cw = vc->
vc_font.width;
210 unsigned int ch = vc->
vc_font.height;
212 unsigned int bh = info->
var.yres - (vc->
vc_rows*ch);
213 unsigned int rs = info->
var.xres -
rw;
214 unsigned int bs = info->
var.yres - bh;
220 if (rw && !bottom_only) {
238 int softback_lines,
int fg,
int bg)
244 int y = real_y(ops->
p, vc->
vc_y);
251 if (softback_lines) {
252 if (y + softback_lines >= vc->
vc_rows) {
261 attribute = get_attribute(info, c);
262 src = vc->
vc_font.data + ((c & charmask) * (w * vc->
vc_font.height));
278 update_attr(dst, src, attribute, vc);
317 int cur_height,
size, i = 0;
334 cur_height = (vc->
vc_font.height < 10) ? 1 : 2;
337 cur_height = vc->
vc_font.height/3;
340 cur_height = vc->
vc_font.height >> 1;
343 cur_height = (vc->
vc_font.height << 1)/3;
347 cur_height = vc->
vc_font.height;
350 size = (vc->
vc_font.height - cur_height) * w;
353 size = cur_height *
w;
383 if (info->
fbops->fb_cursor)
392 static int bit_update_start(
struct fb_info *info)
398 ops->
var.xoffset = info->
var.xoffset;
399 ops->
var.yoffset = info->
var.yoffset;
400 ops->
var.vmode = info->
var.vmode;
406 ops->
bmove = bit_bmove;
407 ops->
clear = bit_clear;
408 ops->
putcs = bit_putcs;