Lines Matching refs:vc
46 const struct vc_data *vc = vc_cons[i].d;
49 * console_lock must be held to prevent the vc from being deallocated
54 return vc && kref_read(&vc->port.kref) > 1;
75 * and the vc start at /dev/ttyX, X >= 1. We maintain that here, so we will
86 static void complete_change_console(struct vc_data *vc);
252 static int vt_kdsetmode(struct vc_data *vc, unsigned long mode)
267 if (vc->vc_mode == mode)
270 vc->vc_mode = mode;
271 if (vc->vc_num != fg_console)
286 struct vc_data *vc = tty->driver_data;
288 unsigned int console = vc->vc_num;
381 ret = vt_kdsetmode(vc, arg);
386 return put_user(vc->vc_mode, (int __user *)arg);
474 ret = con_font_op(vc, &op);
490 bool perm, struct vc_data *vc)
500 return con_set_unimap(vc, tmp.entry_ct, tmp.entries);
502 if (!perm && fg_console != vc->vc_num)
504 return con_get_unimap(vc, tmp.entry_ct, &(user_ud->entry_ct),
510 static int vt_io_ioctl(struct vc_data *vc, unsigned int cmd, void __user *up,
541 con_clear_unimap(vc);
546 return do_unimap_ioctl(cmd, up, perm, vc);
555 static int vt_reldisp(struct vc_data *vc, unsigned int swtch)
559 if (vc->vt_mode.mode != VT_PROCESS)
563 if (vc->vt_newvt < 0) {
571 vc->vt_newvt = -1;
576 newvt = vc->vt_newvt;
577 vc->vt_newvt = -1;
632 struct vc_data *vc = NULL;
639 vc = vc_deallocate(vc_num);
642 if (vc && vc_num >= MIN_NR_CONSOLES)
643 tty_port_put(&vc->port);
651 struct vc_data *vc[MAX_NR_CONSOLES];
657 vc[i] = vc_deallocate(i);
659 vc[i] = NULL;
663 if (vc[i] && i >= MIN_NR_CONSOLES)
664 tty_port_put(&vc[i]->port);
668 static int vt_resizex(struct vc_data *vc, struct vt_consize __user *cs)
678 v.v_vlin = vc->vc_scan_lines;
739 struct vc_data *vc = tty->driver_data;
756 ret = vt_io_ioctl(vc, cmd, up, perm);
775 vc->vt_mode = tmp;
777 vc->vt_mode.frsig = 0;
778 put_pid(vc->vt_pid);
779 vc->vt_pid = get_pid(task_pid(current));
781 vc->vt_newvt = -1;
792 memcpy(&tmp, &vc->vt_mode, sizeof(struct vt_mode));
888 ret = vt_reldisp(vc, arg);
910 struct vc_data *vc;
921 vc = vc_cons[i].d;
923 if (vc) {
924 vc->vc_resize_user = 1;
937 return vt_resizex(vc, up);
950 return put_user(vc->vc_hi_font_mask,
961 void reset_vc(struct vc_data *vc)
963 vc->vc_mode = KD_TEXT;
964 vt_reset_unicode(vc->vc_num);
965 vc->vt_mode.mode = VT_AUTO;
966 vc->vt_mode.waitv = 0;
967 vc->vt_mode.relsig = 0;
968 vc->vt_mode.acqsig = 0;
969 vc->vt_mode.frsig = 0;
970 put_pid(vc->vt_pid);
971 vc->vt_pid = NULL;
972 vc->vt_newvt = -1;
974 reset_palette(vc);
979 struct vc *vc_con =
980 container_of(work, struct vc, SAK_work);
981 struct vc_data *vc;
985 vc = vc_con->d;
986 if (vc) {
988 tty = vc->port.tty;
995 reset_vc(vc);
1012 int perm, struct console_font_op *op, struct vc_data *vc)
1021 i = con_font_op(vc, op);
1037 int perm, struct vc_data *vc)
1049 return con_set_unimap(vc, tmp.entry_ct, tmp_entries);
1051 if (!perm && fg_console != vc->vc_num)
1053 return con_get_unimap(vc, tmp.entry_ct, &(user_ud->entry_ct), tmp_entries);
1061 struct vc_data *vc = tty->driver_data;
1080 return compat_kdfontop_ioctl(up, perm, &op, vc);
1084 return compat_unimap_ioctl(cmd, up, perm, vc);
1128 static void complete_change_console(struct vc_data *vc)
1141 switch_screen(vc);
1153 if (old_vc_mode != vc->vc_mode) {
1154 if (vc->vc_mode == KD_TEXT)
1165 if (vc->vt_mode.mode == VT_PROCESS) {
1171 if (kill_pid(vc->vt_pid, vc->vt_mode.acqsig, 1) != 0) {
1181 reset_vc(vc);
1183 if (old_vc_mode != vc->vc_mode) {
1184 if (vc->vc_mode == KD_TEXT)
1195 vt_event_post(VT_EVENT_SWITCH, old, vc->vc_num);
1204 struct vc_data *vc;
1224 vc = vc_cons[fg_console].d;
1225 if (vc->vt_mode.mode == VT_PROCESS) {
1234 vc->vt_newvt = new_vc->vc_num;
1235 if (kill_pid(vc->vt_pid, vc->vt_mode.relsig, 1) == 0) {
1253 reset_vc(vc);
1263 if (vc->vc_mode == KD_GRAPHICS)