Lines Matching full:vc

89 	struct vc_data *vc = param->vc;  in vcs_notifier()  local
110 if (currcons != vc->vc_num) in vcs_notifier()
178 * vcs_vc - return VC for @inode
179 * @inode: inode for which to return a VC
203 * vcs_size - return size for a VC in @vc
204 * @vc: which VC
210 static int vcs_size(const struct vc_data *vc, bool attr, bool unicode) in vcs_size() argument
216 size = vc->vc_rows * vc->vc_cols; in vcs_size()
232 struct vc_data *vc; in vcs_lseek() local
236 vc = vcs_vc(inode, NULL); in vcs_lseek()
237 if (!vc) in vcs_lseek()
240 size = vcs_size(vc, use_attributes(inode), use_unicode(inode)); in vcs_lseek()
247 static int vcs_read_buf_uni(struct vc_data *vc, char *con_buf, in vcs_read_buf_uni() argument
250 unsigned int nr, row, col, maxcol = vc->vc_cols; in vcs_read_buf_uni()
253 ret = vc_uniscr_check(vc); in vcs_read_buf_uni()
264 vc_uniscr_copy_line(vc, con_buf, viewed, row, col, nr); in vcs_read_buf_uni()
275 static void vcs_read_buf_noattr(const struct vc_data *vc, char *con_buf, in vcs_read_buf_noattr() argument
279 unsigned int col, maxcol = vc->vc_cols; in vcs_read_buf_noattr()
281 org = screen_pos(vc, pos, viewed); in vcs_read_buf_noattr()
286 *con_buf++ = (vcs_scr_readw(vc, org++) & 0xff); in vcs_read_buf_noattr()
288 org = screen_pos(vc, pos, viewed); in vcs_read_buf_noattr()
295 static unsigned int vcs_read_buf(const struct vc_data *vc, char *con_buf, in vcs_read_buf() argument
300 unsigned int col, maxcol = vc->vc_cols; in vcs_read_buf()
305 con_buf[0] = min(vc->vc_rows, 0xFFu); in vcs_read_buf()
306 con_buf[1] = min(vc->vc_cols, 0xFFu); in vcs_read_buf()
307 getconsxy(vc, con_buf + 2); in vcs_read_buf()
340 org = screen_pos(vc, pos, viewed); in vcs_read_buf()
351 *con_buf16++ = vcs_scr_readw(vc, org++); in vcs_read_buf()
354 org = screen_pos(vc, pos, viewed); in vcs_read_buf()
367 struct vc_data *vc; in vcs_read() local
403 vc = vcs_vc(inode, &viewed); in vcs_read()
404 if (!vc) { in vcs_read()
413 size = vcs_size(vc, attr, uni_mode); in vcs_read()
433 ret = vcs_read_buf_uni(vc, con_buf, pos, this_round, in vcs_read()
438 vcs_read_buf_noattr(vc, con_buf, pos, this_round, in vcs_read()
441 this_round = vcs_read_buf(vc, con_buf, pos, this_round, in vcs_read()
473 static u16 *vcs_write_buf_noattr(struct vc_data *vc, const char *con_buf, in vcs_write_buf_noattr() argument
477 unsigned int col, maxcol = vc->vc_cols; in vcs_write_buf_noattr()
479 *org0 = org = screen_pos(vc, pos, viewed); in vcs_write_buf_noattr()
487 vcs_scr_writew(vc, in vcs_write_buf_noattr()
488 (vcs_scr_readw(vc, org) & 0xff00) | c, org); in vcs_write_buf_noattr()
491 org = screen_pos(vc, pos, viewed); in vcs_write_buf_noattr()
513 static u16 *vcs_write_buf(struct vc_data *vc, const char *con_buf, in vcs_write_buf() argument
517 unsigned int col, maxcol = vc->vc_cols; in vcs_write_buf()
524 getconsxy(vc, header + 2); in vcs_write_buf()
530 putconsxy(vc, header + 2); in vcs_write_buf()
539 *org0 = org = screen_pos(vc, pos/2, viewed); in vcs_write_buf()
545 vcs_scr_writew(vc, vc_compile_le16(c, vcs_scr_readw(vc, org)), in vcs_write_buf()
550 org = screen_pos(vc, pos/2, viewed); in vcs_write_buf()
563 vcs_scr_writew(vc, w, org++); in vcs_write_buf()
567 org = screen_pos(vc, pos, viewed); in vcs_write_buf()
578 vcs_scr_writew(vc, vc_compile_le16(vcs_scr_readw(vc, org) >> 8, c), in vcs_write_buf()
588 struct vc_data *vc; in vcs_write() local
611 vc = vcs_vc(inode, &viewed); in vcs_write()
612 if (!vc) in vcs_write()
615 size = vcs_size(vc, attr, false); in vcs_write()
648 /* The vc might have been freed or vcs_size might have changed in vcs_write()
652 vc = vcs_vc(inode, &viewed); in vcs_write()
653 if (!vc) { in vcs_write()
658 size = vcs_size(vc, attr, false); in vcs_write()
674 org = vcs_write_buf(vc, con_buf, pos, this_round, in vcs_write()
677 org = vcs_write_buf_noattr(vc, con_buf, pos, this_round, in vcs_write()
685 update_region(vc, (unsigned long)(org0), org - org0); in vcs_write()
690 vcs_scr_updated(vc); in vcs_write()
774 .name = "vc",