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);
912 struct vc_data *vc;
923 vc = vc_cons[i].d;
925 if (vc) {
926 vc->vc_resize_user = 1;
939 return vt_resizex(vc, up);
952 return put_user(vc->vc_hi_font_mask,
963 void reset_vc(struct vc_data *vc)
965 vc->vc_mode = KD_TEXT;
966 vt_reset_unicode(vc->vc_num);
967 vc->vt_mode.mode = VT_AUTO;
968 vc->vt_mode.waitv = 0;
969 vc->vt_mode.relsig = 0;
970 vc->vt_mode.acqsig = 0;
971 vc->vt_mode.frsig = 0;
972 put_pid(vc->vt_pid);
973 vc->vt_pid = NULL;
974 vc->vt_newvt = -1;
975 reset_palette(vc);
980 struct vc *vc_con =
981 container_of(work, struct vc, SAK_work);
982 struct vc_data *vc;
986 vc = vc_con->d;
987 if (vc) {
989 tty = vc->port.tty;
996 reset_vc(vc);
1013 int perm, struct console_font_op *op, struct vc_data *vc)
1022 i = con_font_op(vc, op);
1038 int perm, struct vc_data *vc)
1050 return con_set_unimap(vc, tmp.entry_ct, tmp_entries);
1052 if (!perm && fg_console != vc->vc_num)
1054 return con_get_unimap(vc, tmp.entry_ct, &(user_ud->entry_ct), tmp_entries);
1062 struct vc_data *vc = tty->driver_data;
1081 return compat_kdfontop_ioctl(up, perm, &op, vc);
1085 return compat_unimap_ioctl(cmd, up, perm, vc);
1129 static void complete_change_console(struct vc_data *vc)
1142 switch_screen(vc);
1154 if (old_vc_mode != vc->vc_mode) {
1155 if (vc->vc_mode == KD_TEXT)
1166 if (vc->vt_mode.mode == VT_PROCESS) {
1172 if (kill_pid(vc->vt_pid, vc->vt_mode.acqsig, 1) != 0) {
1182 reset_vc(vc);
1184 if (old_vc_mode != vc->vc_mode) {
1185 if (vc->vc_mode == KD_TEXT)
1196 vt_event_post(VT_EVENT_SWITCH, old, vc->vc_num);
1205 struct vc_data *vc;
1225 vc = vc_cons[fg_console].d;
1226 if (vc->vt_mode.mode == VT_PROCESS) {
1235 vc->vt_newvt = new_vc->vc_num;
1236 if (kill_pid(vc->vt_pid, vc->vt_mode.relsig, 1) == 0) {
1254 reset_vc(vc);
1264 if (vc->vc_mode == KD_GRAPHICS)