Lines Matching refs:vc
62 static void complete_change_console(struct vc_data *vc);
263 do_unimap_ioctl(int cmd, struct unimapdesc __user *user_ud, int perm, struct vc_data *vc) in do_unimap_ioctl() argument
277 return con_set_unimap(vc, tmp.entry_ct, tmp.entries); in do_unimap_ioctl()
279 if (!perm && fg_console != vc->vc_num) in do_unimap_ioctl()
281 return con_get_unimap(vc, tmp.entry_ct, &(user_ud->entry_ct), tmp.entries); in do_unimap_ioctl()
289 struct vc_data *vc = NULL; in vt_disallocate() local
296 vc = vc_deallocate(vc_num); in vt_disallocate()
299 if (vc && vc_num >= MIN_NR_CONSOLES) { in vt_disallocate()
300 tty_port_destroy(&vc->port); in vt_disallocate()
301 kfree(vc); in vt_disallocate()
310 struct vc_data *vc[MAX_NR_CONSOLES]; in vt_disallocate_all() local
316 vc[i] = vc_deallocate(i); in vt_disallocate_all()
318 vc[i] = NULL; in vt_disallocate_all()
322 if (vc[i] && i >= MIN_NR_CONSOLES) { in vt_disallocate_all()
323 tty_port_destroy(&vc[i]->port); in vt_disallocate_all()
324 kfree(vc[i]); in vt_disallocate_all()
337 struct vc_data *vc = tty->driver_data; in vt_ioctl() local
346 console = vc->vc_num; in vt_ioctl()
481 if (vc->vc_mode == (unsigned char) arg) in vt_ioctl()
483 vc->vc_mode = (unsigned char) arg; in vt_ioctl()
498 uival = vc->vc_mode; in vt_ioctl()
609 vc->vt_mode = tmp; in vt_ioctl()
611 vc->vt_mode.frsig = 0; in vt_ioctl()
612 put_pid(vc->vt_pid); in vt_ioctl()
613 vc->vt_pid = get_pid(task_pid(current)); in vt_ioctl()
615 vc->vt_newvt = -1; in vt_ioctl()
626 memcpy(&tmp, &vc->vt_mode, sizeof(struct vt_mode)); in vt_ioctl()
757 if (vc->vt_mode.mode != VT_PROCESS) { in vt_ioctl()
765 if (vc->vt_newvt >= 0) { in vt_ioctl()
771 vc->vt_newvt = -1; in vt_ioctl()
779 newvt = vc->vt_newvt; in vt_ioctl()
780 vc->vt_newvt = -1; in vt_ioctl()
823 struct vc_data *vc; in vt_ioctl() local
834 vc = vc_cons[i].d; in vt_ioctl()
836 if (vc) { in vt_ioctl()
837 vc->vc_resize_user = 1; in vt_ioctl()
865 vlin = vlin ? vlin : vc->vc_scan_lines; in vt_ioctl()
978 ret = con_font_op(vc, &op); in vt_ioctl()
1016 con_clear_unimap(vc, &ui); in vt_ioctl()
1022 ret = do_unimap_ioctl(cmd, up, perm, vc); in vt_ioctl()
1036 ret = put_user(vc->vc_hi_font_mask, in vt_ioctl()
1049 void reset_vc(struct vc_data *vc) in reset_vc() argument
1051 vc->vc_mode = KD_TEXT; in reset_vc()
1052 vt_reset_unicode(vc->vc_num); in reset_vc()
1053 vc->vt_mode.mode = VT_AUTO; in reset_vc()
1054 vc->vt_mode.waitv = 0; in reset_vc()
1055 vc->vt_mode.relsig = 0; in reset_vc()
1056 vc->vt_mode.acqsig = 0; in reset_vc()
1057 vc->vt_mode.frsig = 0; in reset_vc()
1058 put_pid(vc->vt_pid); in reset_vc()
1059 vc->vt_pid = NULL; in reset_vc()
1060 vc->vt_newvt = -1; in reset_vc()
1062 reset_palette(vc); in reset_vc()
1067 struct vc *vc_con = in vc_SAK()
1068 container_of(work, struct vc, SAK_work); in vc_SAK()
1069 struct vc_data *vc; in vc_SAK() local
1073 vc = vc_con->d; in vc_SAK()
1074 if (vc) { in vc_SAK()
1076 tty = vc->port.tty; in vc_SAK()
1083 reset_vc(vc); in vc_SAK()
1146 int perm, struct console_font_op *op, struct vc_data *vc) in compat_kdfontop_ioctl() argument
1155 i = con_font_op(vc, op); in compat_kdfontop_ioctl()
1171 int perm, struct vc_data *vc) in compat_unimap_ioctl() argument
1187 return con_set_unimap(vc, tmp.entry_ct, tmp_entries); in compat_unimap_ioctl()
1189 if (!perm && fg_console != vc->vc_num) in compat_unimap_ioctl()
1191 return con_get_unimap(vc, tmp.entry_ct, &(user_ud->entry_ct), tmp_entries); in compat_unimap_ioctl()
1199 struct vc_data *vc = tty->driver_data; in vt_compat_ioctl() local
1206 console = vc->vc_num; in vt_compat_ioctl()
1231 ret = compat_kdfontop_ioctl(up, perm, &op, vc); in vt_compat_ioctl()
1236 ret = compat_unimap_ioctl(cmd, up, perm, vc); in vt_compat_ioctl()
1287 static void complete_change_console(struct vc_data *vc) in complete_change_console() argument
1300 switch_screen(vc); in complete_change_console()
1312 if (old_vc_mode != vc->vc_mode) { in complete_change_console()
1313 if (vc->vc_mode == KD_TEXT) in complete_change_console()
1324 if (vc->vt_mode.mode == VT_PROCESS) { in complete_change_console()
1330 if (kill_pid(vc->vt_pid, vc->vt_mode.acqsig, 1) != 0) { in complete_change_console()
1340 reset_vc(vc); in complete_change_console()
1342 if (old_vc_mode != vc->vc_mode) { in complete_change_console()
1343 if (vc->vc_mode == KD_TEXT) in complete_change_console()
1354 vt_event_post(VT_EVENT_SWITCH, old, vc->vc_num); in complete_change_console()
1363 struct vc_data *vc; in change_console() local
1383 vc = vc_cons[fg_console].d; in change_console()
1384 if (vc->vt_mode.mode == VT_PROCESS) { in change_console()
1393 vc->vt_newvt = new_vc->vc_num; in change_console()
1394 if (kill_pid(vc->vt_pid, vc->vt_mode.relsig, 1) == 0) { in change_console()
1412 reset_vc(vc); in change_console()
1422 if (vc->vc_mode == KD_GRAPHICS) in change_console()