Lines Matching defs:vc
26 static void update_attr(u8 *dst, const u8 *src, int attribute, struct vc_data *vc)
28 int i, offset = (vc->vc_font.height < 10) ? 1 : 2;
29 int width = DIV_ROUND_UP(vc->vc_font.width, 8);
30 unsigned int cellsize = vc->vc_font.height * width;
46 static void bit_bmove(struct vc_data *vc, struct fb_info *info, int sy,
51 area.sx = sx * vc->vc_font.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;
61 static void bit_clear(struct vc_data *vc, struct fb_info *info, int sy,
67 region.dx = sx * vc->vc_font.width;
68 region.dy = sy * vc->vc_font.height;
69 region.width = width * vc->vc_font.width;
70 region.height = height * vc->vc_font.height;
76 static inline void bit_putcs_aligned(struct vc_data *vc, struct fb_info *info,
81 u16 charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff;
82 unsigned int charcnt = vc->vc_font.charcount;
83 u32 idx = vc->vc_font.width >> 3;
91 src = vc->vc_font.data + (unsigned int)ch * cellsize;
94 update_attr(buf, src, attr, vc);
111 static inline void bit_putcs_unaligned(struct vc_data *vc,
118 u16 charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff;
119 unsigned int charcnt = vc->vc_font.charcount;
120 u32 shift_low = 0, mod = vc->vc_font.width % 8;
122 u32 idx = vc->vc_font.width >> 3;
130 src = vc->vc_font.data + (unsigned int)ch * cellsize;
133 update_attr(buf, src, attr, vc);
150 static void bit_putcs(struct vc_data *vc, struct fb_info *info,
157 u32 width = DIV_ROUND_UP(vc->vc_font.width, 8);
158 u32 cellsize = width * vc->vc_font.height;
162 u32 mod = vc->vc_font.width % 8, cnt, pitch, size;
168 image.dx = xx * vc->vc_font.width;
169 image.dy = yy * vc->vc_font.height;
170 image.height = vc->vc_font.height;
190 image.width = vc->vc_font.width * cnt;
197 cnt = image.width / vc->vc_font.width;
200 image.width = cnt * vc->vc_font.width;
211 bit_putcs_aligned(vc, info, s, attribute, cnt, pitch,
214 bit_putcs_unaligned(vc, info, s, attribute, cnt,
218 image.dx += cnt * vc->vc_font.width;
231 static void bit_clear_margins(struct vc_data *vc, struct fb_info *info,
234 unsigned int cw = vc->vc_font.width;
235 unsigned int ch = vc->vc_font.height;
236 unsigned int rw = info->var.xres - (vc->vc_cols*cw);
237 unsigned int bh = info->var.yres - (vc->vc_rows*ch);
262 static void bit_cursor(struct vc_data *vc, struct fb_info *info, bool enable,
267 unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff;
268 int w = DIV_ROUND_UP(vc->vc_font.width, 8), c;
269 int y = real_y(par->p, vc->state.y);
270 int attribute, use_sw = vc->vc_cursor_type & CUR_SW;
276 if (!vc->vc_font.data)
279 c = scr_readw((u16 *) vc->vc_pos);
284 if (c >= vc->vc_font.charcount)
286 src = vc->vc_font.data + (c * (w * vc->vc_font.height));
297 dst = kmalloc_array(w, vc->vc_font.height, GFP_ATOMIC);
302 update_attr(dst, src, attribute, vc);
314 if ((par->cursor_state.image.dx != (vc->vc_font.width * vc->state.x)) ||
315 (par->cursor_state.image.dy != (vc->vc_font.height * y)) ||
317 par->cursor_state.image.dx = vc->vc_font.width * vc->state.x;
318 par->cursor_state.image.dy = vc->vc_font.height * y;
322 if (par->cursor_state.image.height != vc->vc_font.height ||
323 par->cursor_state.image.width != vc->vc_font.width ||
325 par->cursor_state.image.height = vc->vc_font.height;
326 par->cursor_state.image.width = vc->vc_font.width;
337 vc->vc_cursor_type != par->p->cursor_shape ||
340 unsigned char *mask = fbcon_cursor_glyph(&vc->vc_font, vc->vc_cursor_type);
348 par->p->cursor_shape = vc->vc_cursor_type;