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;
738 struct vc_data *vc = tty->driver_data;
755 ret = vt_io_ioctl(vc, cmd, up, perm);
774 vc->vt_mode = tmp;
776 vc->vt_mode.frsig = 0;
777 put_pid(vc->vt_pid);
778 vc->vt_pid = get_pid(task_pid(current));
780 vc->vt_newvt = -1;
791 memcpy(&tmp, &vc->vt_mode, sizeof(struct vt_mode));
887 ret = vt_reldisp(vc, arg);
911 struct vc_data *vc;
922 vc = vc_cons[i].d;
924 if (vc) {
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;
973 reset_palette(vc);
978 struct vc *vc_con =
979 container_of(work, struct vc, SAK_work);
980 struct vc_data *vc;
984 vc = vc_con->d;
985 if (vc) {
987 tty = vc->port.tty;
994 reset_vc(vc);
1011 int perm, struct console_font_op *op, struct vc_data *vc)
1020 i = con_font_op(vc, op);
1036 int perm, struct vc_data *vc)
1048 return con_set_unimap(vc, tmp.entry_ct, tmp_entries);
1050 if (!perm && fg_console != vc->vc_num)
1052 return con_get_unimap(vc, tmp.entry_ct, &(user_ud->entry_ct), tmp_entries);
1060 struct vc_data *vc = tty->driver_data;
1079 return compat_kdfontop_ioctl(up, perm, &op, vc);
1083 return compat_unimap_ioctl(cmd, up, perm, vc);
1127 static void complete_change_console(struct vc_data *vc)
1140 switch_screen(vc);
1152 if (old_vc_mode != vc->vc_mode) {
1153 if (vc->vc_mode == KD_TEXT)
1164 if (vc->vt_mode.mode == VT_PROCESS) {
1170 if (kill_pid(vc->vt_pid, vc->vt_mode.acqsig, 1) != 0) {
1180 reset_vc(vc);
1182 if (old_vc_mode != vc->vc_mode) {
1183 if (vc->vc_mode == KD_TEXT)
1194 vt_event_post(VT_EVENT_SWITCH, old, vc->vc_num);
1203 struct vc_data *vc;
1223 vc = vc_cons[fg_console].d;
1224 if (vc->vt_mode.mode == VT_PROCESS) {
1233 vc->vt_newvt = new_vc->vc_num;
1234 if (kill_pid(vc->vt_pid, vc->vt_mode.relsig, 1) == 0) {
1252 reset_vc(vc);
1262 if (vc->vc_mode == KD_GRAPHICS)