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