Lines Matching refs:vc
46 const struct vc_data *vc = vc_cons[i].d; in vt_in_use() local
54 return vc && kref_read(&vc->port.kref) > 1; in vt_in_use()
86 static void complete_change_console(struct vc_data *vc);
252 static int vt_kdsetmode(struct vc_data *vc, unsigned long mode) in vt_kdsetmode() argument
267 if (vc->vc_mode == mode) in vt_kdsetmode()
270 vc->vc_mode = mode; in vt_kdsetmode()
271 if (vc->vc_num != fg_console) in vt_kdsetmode()
286 struct vc_data *vc = tty->driver_data; in vt_k_ioctl() local
288 unsigned int console = vc->vc_num; in vt_k_ioctl()
381 ret = vt_kdsetmode(vc, arg); in vt_k_ioctl()
386 return put_user(vc->vc_mode, (int __user *)arg); in vt_k_ioctl()
474 ret = con_font_op(vc, &op); in vt_k_ioctl()
490 bool perm, struct vc_data *vc) in do_unimap_ioctl() argument
500 return con_set_unimap(vc, tmp.entry_ct, tmp.entries); in do_unimap_ioctl()
502 if (!perm && fg_console != vc->vc_num) in do_unimap_ioctl()
504 return con_get_unimap(vc, tmp.entry_ct, &(user_ud->entry_ct), in do_unimap_ioctl()
510 static int vt_io_ioctl(struct vc_data *vc, unsigned int cmd, void __user *up, in vt_io_ioctl() argument
541 con_clear_unimap(vc); in vt_io_ioctl()
546 return do_unimap_ioctl(cmd, up, perm, vc); in vt_io_ioctl()
555 static int vt_reldisp(struct vc_data *vc, unsigned int swtch) in vt_reldisp() argument
559 if (vc->vt_mode.mode != VT_PROCESS) in vt_reldisp()
563 if (vc->vt_newvt < 0) { in vt_reldisp()
571 vc->vt_newvt = -1; in vt_reldisp()
576 newvt = vc->vt_newvt; in vt_reldisp()
577 vc->vt_newvt = -1; in vt_reldisp()
632 struct vc_data *vc = NULL; in vt_disallocate() local
639 vc = vc_deallocate(vc_num); in vt_disallocate()
642 if (vc && vc_num >= MIN_NR_CONSOLES) in vt_disallocate()
643 tty_port_put(&vc->port); in vt_disallocate()
651 struct vc_data *vc[MAX_NR_CONSOLES]; in vt_disallocate_all() local
657 vc[i] = vc_deallocate(i); in vt_disallocate_all()
659 vc[i] = NULL; in vt_disallocate_all()
663 if (vc[i] && i >= MIN_NR_CONSOLES) in vt_disallocate_all()
664 tty_port_put(&vc[i]->port); in vt_disallocate_all()
668 static int vt_resizex(struct vc_data *vc, struct vt_consize __user *cs) in vt_resizex() argument
678 v.v_vlin = vc->vc_scan_lines; in vt_resizex()
739 struct vc_data *vc = tty->driver_data; in vt_ioctl() local
756 ret = vt_io_ioctl(vc, cmd, up, perm); in vt_ioctl()
775 vc->vt_mode = tmp; in vt_ioctl()
777 vc->vt_mode.frsig = 0; in vt_ioctl()
778 put_pid(vc->vt_pid); in vt_ioctl()
779 vc->vt_pid = get_pid(task_pid(current)); in vt_ioctl()
781 vc->vt_newvt = -1; in vt_ioctl()
792 memcpy(&tmp, &vc->vt_mode, sizeof(struct vt_mode)); in vt_ioctl()
888 ret = vt_reldisp(vc, arg); in vt_ioctl()
910 struct vc_data *vc; in vt_ioctl() local
921 vc = vc_cons[i].d; in vt_ioctl()
923 if (vc) { in vt_ioctl()
924 vc->vc_resize_user = 1; in vt_ioctl()
937 return vt_resizex(vc, up); in vt_ioctl()
950 return put_user(vc->vc_hi_font_mask, in vt_ioctl()
961 void reset_vc(struct vc_data *vc) in reset_vc() argument
963 vc->vc_mode = KD_TEXT; in reset_vc()
964 vt_reset_unicode(vc->vc_num); in reset_vc()
965 vc->vt_mode.mode = VT_AUTO; in reset_vc()
966 vc->vt_mode.waitv = 0; in reset_vc()
967 vc->vt_mode.relsig = 0; in reset_vc()
968 vc->vt_mode.acqsig = 0; in reset_vc()
969 vc->vt_mode.frsig = 0; in reset_vc()
970 put_pid(vc->vt_pid); in reset_vc()
971 vc->vt_pid = NULL; in reset_vc()
972 vc->vt_newvt = -1; in reset_vc()
973 reset_palette(vc); in reset_vc()
978 struct vc *vc_con = in vc_SAK()
979 container_of(work, struct vc, SAK_work); in vc_SAK()
980 struct vc_data *vc; in vc_SAK() local
984 vc = vc_con->d; in vc_SAK()
985 if (vc) { in vc_SAK()
987 tty = vc->port.tty; in vc_SAK()
994 reset_vc(vc); in vc_SAK()
1011 int perm, struct console_font_op *op, struct vc_data *vc) in compat_kdfontop_ioctl() argument
1020 i = con_font_op(vc, op); in compat_kdfontop_ioctl()
1036 int perm, struct vc_data *vc) in compat_unimap_ioctl() argument
1048 return con_set_unimap(vc, tmp.entry_ct, tmp_entries); in compat_unimap_ioctl()
1050 if (!perm && fg_console != vc->vc_num) in compat_unimap_ioctl()
1052 return con_get_unimap(vc, tmp.entry_ct, &(user_ud->entry_ct), tmp_entries); in compat_unimap_ioctl()
1060 struct vc_data *vc = tty->driver_data; in vt_compat_ioctl() local
1079 return compat_kdfontop_ioctl(up, perm, &op, vc); in vt_compat_ioctl()
1083 return compat_unimap_ioctl(cmd, up, perm, vc); in vt_compat_ioctl()
1127 static void complete_change_console(struct vc_data *vc) in complete_change_console() argument
1140 switch_screen(vc); in complete_change_console()
1152 if (old_vc_mode != vc->vc_mode) { in complete_change_console()
1153 if (vc->vc_mode == KD_TEXT) in complete_change_console()
1164 if (vc->vt_mode.mode == VT_PROCESS) { in complete_change_console()
1170 if (kill_pid(vc->vt_pid, vc->vt_mode.acqsig, 1) != 0) { in complete_change_console()
1180 reset_vc(vc); in complete_change_console()
1182 if (old_vc_mode != vc->vc_mode) { in complete_change_console()
1183 if (vc->vc_mode == KD_TEXT) in complete_change_console()
1194 vt_event_post(VT_EVENT_SWITCH, old, vc->vc_num); in complete_change_console()
1203 struct vc_data *vc; in change_console() local
1223 vc = vc_cons[fg_console].d; in change_console()
1224 if (vc->vt_mode.mode == VT_PROCESS) { in change_console()
1233 vc->vt_newvt = new_vc->vc_num; in change_console()
1234 if (kill_pid(vc->vt_pid, vc->vt_mode.relsig, 1) == 0) { in change_console()
1252 reset_vc(vc); in change_console()
1262 if (vc->vc_mode == KD_GRAPHICS) in change_console()