Lines Matching refs:vc
26 struct vc_data *vc) in update_attr() argument
28 int i, offset = (vc->vc_font.height < 10) ? 1 : 2; in update_attr()
29 int width = DIV_ROUND_UP(vc->vc_font.width, 8); in update_attr()
30 unsigned int cellsize = vc->vc_font.height * width; in update_attr()
46 static void bit_bmove(struct vc_data *vc, struct fb_info *info, int sy, in bit_bmove() argument
51 area.sx = sx * vc->vc_font.width; in bit_bmove()
52 area.sy = sy * vc->vc_font.height; in bit_bmove()
53 area.dx = dx * vc->vc_font.width; in bit_bmove()
54 area.dy = dy * vc->vc_font.height; in bit_bmove()
55 area.height = height * vc->vc_font.height; in bit_bmove()
56 area.width = width * vc->vc_font.width; in bit_bmove()
61 static void bit_clear(struct vc_data *vc, struct fb_info *info, int sy, in bit_clear() argument
67 region.dx = sx * vc->vc_font.width; in bit_clear()
68 region.dy = sy * vc->vc_font.height; in bit_clear()
69 region.width = width * vc->vc_font.width; in bit_clear()
70 region.height = height * vc->vc_font.height; in bit_clear()
76 static inline void bit_putcs_aligned(struct vc_data *vc, struct fb_info *info, in bit_putcs_aligned() argument
81 u16 charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; in bit_putcs_aligned()
82 unsigned int charcnt = vc->vc_font.charcount; in bit_putcs_aligned()
83 u32 idx = vc->vc_font.width >> 3; in bit_putcs_aligned()
91 src = vc->vc_font.data + (unsigned int)ch * cellsize; in bit_putcs_aligned()
94 update_attr(buf, src, attr, vc); in bit_putcs_aligned()
111 static inline void bit_putcs_unaligned(struct vc_data *vc, in bit_putcs_unaligned() argument
118 u16 charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; in bit_putcs_unaligned()
119 unsigned int charcnt = vc->vc_font.charcount; in bit_putcs_unaligned()
120 u32 shift_low = 0, mod = vc->vc_font.width % 8; in bit_putcs_unaligned()
122 u32 idx = vc->vc_font.width >> 3; in bit_putcs_unaligned()
130 src = vc->vc_font.data + (unsigned int)ch * cellsize; in bit_putcs_unaligned()
133 update_attr(buf, src, attr, vc); in bit_putcs_unaligned()
150 static void bit_putcs(struct vc_data *vc, struct fb_info *info, in bit_putcs() argument
155 u32 width = DIV_ROUND_UP(vc->vc_font.width, 8); in bit_putcs()
156 u32 cellsize = width * vc->vc_font.height; in bit_putcs()
160 u32 mod = vc->vc_font.width % 8, cnt, pitch, size; in bit_putcs()
166 image.dx = xx * vc->vc_font.width; in bit_putcs()
167 image.dy = yy * vc->vc_font.height; in bit_putcs()
168 image.height = vc->vc_font.height; in bit_putcs()
188 image.width = vc->vc_font.width * cnt; in bit_putcs()
195 cnt = image.width / vc->vc_font.width; in bit_putcs()
198 image.width = cnt * vc->vc_font.width; in bit_putcs()
209 bit_putcs_aligned(vc, info, s, attribute, cnt, pitch, in bit_putcs()
212 bit_putcs_unaligned(vc, info, s, attribute, cnt, in bit_putcs()
216 image.dx += cnt * vc->vc_font.width; in bit_putcs()
229 static void bit_clear_margins(struct vc_data *vc, struct fb_info *info, in bit_clear_margins() argument
232 unsigned int cw = vc->vc_font.width; in bit_clear_margins()
233 unsigned int ch = vc->vc_font.height; in bit_clear_margins()
234 unsigned int rw = info->var.xres - (vc->vc_cols*cw); in bit_clear_margins()
235 unsigned int bh = info->var.yres - (vc->vc_rows*ch); in bit_clear_margins()
260 static void bit_cursor(struct vc_data *vc, struct fb_info *info, bool enable, in bit_cursor() argument
265 unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; in bit_cursor()
266 int w = DIV_ROUND_UP(vc->vc_font.width, 8), c; in bit_cursor()
267 int y = real_y(par->p, vc->state.y); in bit_cursor()
268 int attribute, use_sw = vc->vc_cursor_type & CUR_SW; in bit_cursor()
274 if (!vc->vc_font.data) in bit_cursor()
277 c = scr_readw((u16 *) vc->vc_pos); in bit_cursor()
279 src = vc->vc_font.data + ((c & charmask) * (w * vc->vc_font.height)); in bit_cursor()
290 dst = kmalloc_array(w, vc->vc_font.height, GFP_ATOMIC); in bit_cursor()
295 update_attr(dst, src, attribute, vc); in bit_cursor()
307 if ((par->cursor_state.image.dx != (vc->vc_font.width * vc->state.x)) || in bit_cursor()
308 (par->cursor_state.image.dy != (vc->vc_font.height * y)) || in bit_cursor()
310 par->cursor_state.image.dx = vc->vc_font.width * vc->state.x; in bit_cursor()
311 par->cursor_state.image.dy = vc->vc_font.height * y; in bit_cursor()
315 if (par->cursor_state.image.height != vc->vc_font.height || in bit_cursor()
316 par->cursor_state.image.width != vc->vc_font.width || in bit_cursor()
318 par->cursor_state.image.height = vc->vc_font.height; in bit_cursor()
319 par->cursor_state.image.width = vc->vc_font.width; in bit_cursor()
330 vc->vc_cursor_type != par->p->cursor_shape || in bit_cursor()
333 char *mask = kmalloc_array(w, vc->vc_font.height, GFP_ATOMIC); in bit_cursor()
343 par->p->cursor_shape = vc->vc_cursor_type; in bit_cursor()
351 cur_height = (vc->vc_font.height < 10) ? 1 : 2; in bit_cursor()
354 cur_height = vc->vc_font.height/3; in bit_cursor()
357 cur_height = vc->vc_font.height >> 1; in bit_cursor()
360 cur_height = (vc->vc_font.height << 1)/3; in bit_cursor()
364 cur_height = vc->vc_font.height; in bit_cursor()
367 size = (vc->vc_font.height - cur_height) * w; in bit_cursor()