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);
250 static int vt_kdsetmode(struct vc_data *vc, unsigned long mode) in vt_kdsetmode() argument
266 if (vc->vc_mode == mode) in vt_kdsetmode()
269 vc->vc_mode = mode; in vt_kdsetmode()
270 if (vc->vc_num != fg_console) in vt_kdsetmode()
287 struct vc_data *vc = tty->driver_data; in vt_k_ioctl() local
289 unsigned int console = vc->vc_num; in vt_k_ioctl()
381 return vt_kdsetmode(vc, arg); in vt_k_ioctl()
384 return put_user(vc->vc_mode, (int __user *)arg); in vt_k_ioctl()
472 ret = con_font_op(vc, &op); in vt_k_ioctl()
487 static inline int do_fontx_ioctl(struct vc_data *vc, int cmd, in do_fontx_ioctl() argument
505 return con_font_op(vc, op); in do_fontx_ioctl()
514 i = con_font_op(vc, op); in do_fontx_ioctl()
526 static int vt_io_fontreset(struct vc_data *vc, struct console_font_op *op) in vt_io_fontreset() argument
540 ret = con_font_op(vc, op); in vt_io_fontreset()
545 con_set_default_unimap(vc); in vt_io_fontreset()
552 bool perm, struct vc_data *vc) in do_unimap_ioctl() argument
562 return con_set_unimap(vc, tmp.entry_ct, tmp.entries); in do_unimap_ioctl()
564 if (!perm && fg_console != vc->vc_num) in do_unimap_ioctl()
566 return con_get_unimap(vc, tmp.entry_ct, &(user_ud->entry_ct), in do_unimap_ioctl()
572 static int vt_io_ioctl(struct vc_data *vc, unsigned int cmd, void __user *up, in vt_io_ioctl() argument
587 return con_font_op(vc, &op); in vt_io_ioctl()
596 return con_font_op(vc, &op); in vt_io_ioctl()
612 return do_fontx_ioctl(vc, cmd, up, &op); in vt_io_ioctl()
618 return vt_io_fontreset(vc, &op); in vt_io_ioctl()
639 con_clear_unimap(vc); in vt_io_ioctl()
644 return do_unimap_ioctl(cmd, up, perm, vc); in vt_io_ioctl()
653 static int vt_reldisp(struct vc_data *vc, unsigned int swtch) in vt_reldisp() argument
657 if (vc->vt_mode.mode != VT_PROCESS) in vt_reldisp()
661 if (vc->vt_newvt < 0) { in vt_reldisp()
669 vc->vt_newvt = -1; in vt_reldisp()
674 newvt = vc->vt_newvt; in vt_reldisp()
675 vc->vt_newvt = -1; in vt_reldisp()
730 struct vc_data *vc = NULL; in vt_disallocate() local
737 vc = vc_deallocate(vc_num); in vt_disallocate()
740 if (vc && vc_num >= MIN_NR_CONSOLES) in vt_disallocate()
741 tty_port_put(&vc->port); in vt_disallocate()
749 struct vc_data *vc[MAX_NR_CONSOLES]; in vt_disallocate_all() local
755 vc[i] = vc_deallocate(i); in vt_disallocate_all()
757 vc[i] = NULL; in vt_disallocate_all()
761 if (vc[i] && i >= MIN_NR_CONSOLES) in vt_disallocate_all()
762 tty_port_put(&vc[i]->port); in vt_disallocate_all()
766 static int vt_resizex(struct vc_data *vc, struct vt_consize __user *cs) in vt_resizex() argument
781 vc = vc_cons[i].d; in vt_resizex()
783 if (vc) { in vt_resizex()
784 vc->vc_resize_user = 1; in vt_resizex()
785 vc_resize(vc, v.v_cols, v.v_rows); in vt_resizex()
800 struct vc_data *vc = tty->driver_data; in vt_ioctl() local
817 ret = vt_io_ioctl(vc, cmd, up, perm); in vt_ioctl()
836 vc->vt_mode = tmp; in vt_ioctl()
838 vc->vt_mode.frsig = 0; in vt_ioctl()
839 put_pid(vc->vt_pid); in vt_ioctl()
840 vc->vt_pid = get_pid(task_pid(current)); in vt_ioctl()
842 vc->vt_newvt = -1; in vt_ioctl()
853 memcpy(&tmp, &vc->vt_mode, sizeof(struct vt_mode)); in vt_ioctl()
948 ret = vt_reldisp(vc, arg); in vt_ioctl()
970 struct vc_data *vc; in vt_ioctl() local
981 vc = vc_cons[i].d; in vt_ioctl()
983 if (vc) { in vt_ioctl()
984 vc->vc_resize_user = 1; in vt_ioctl()
997 return vt_resizex(vc, up); in vt_ioctl()
1010 return put_user(vc->vc_hi_font_mask, in vt_ioctl()
1021 void reset_vc(struct vc_data *vc) in reset_vc() argument
1023 vc->vc_mode = KD_TEXT; in reset_vc()
1024 vt_reset_unicode(vc->vc_num); in reset_vc()
1025 vc->vt_mode.mode = VT_AUTO; in reset_vc()
1026 vc->vt_mode.waitv = 0; in reset_vc()
1027 vc->vt_mode.relsig = 0; in reset_vc()
1028 vc->vt_mode.acqsig = 0; in reset_vc()
1029 vc->vt_mode.frsig = 0; in reset_vc()
1030 put_pid(vc->vt_pid); in reset_vc()
1031 vc->vt_pid = NULL; in reset_vc()
1032 vc->vt_newvt = -1; in reset_vc()
1034 reset_palette(vc); in reset_vc()
1039 struct vc *vc_con = in vc_SAK()
1040 container_of(work, struct vc, SAK_work); in vc_SAK()
1041 struct vc_data *vc; in vc_SAK() local
1045 vc = vc_con->d; in vc_SAK()
1046 if (vc) { in vc_SAK()
1048 tty = vc->port.tty; in vc_SAK()
1055 reset_vc(vc); in vc_SAK()
1069 compat_fontx_ioctl(struct vc_data *vc, int cmd, in compat_fontx_ioctl() argument
1089 return con_font_op(vc, op); in compat_fontx_ioctl()
1098 i = con_font_op(vc, op); in compat_fontx_ioctl()
1120 int perm, struct console_font_op *op, struct vc_data *vc) in compat_kdfontop_ioctl() argument
1129 i = con_font_op(vc, op); in compat_kdfontop_ioctl()
1145 int perm, struct vc_data *vc) in compat_unimap_ioctl() argument
1157 return con_set_unimap(vc, tmp.entry_ct, tmp_entries); in compat_unimap_ioctl()
1159 if (!perm && fg_console != vc->vc_num) in compat_unimap_ioctl()
1161 return con_get_unimap(vc, tmp.entry_ct, &(user_ud->entry_ct), tmp_entries); in compat_unimap_ioctl()
1169 struct vc_data *vc = tty->driver_data; in vt_compat_ioctl() local
1188 return compat_fontx_ioctl(vc, cmd, up, perm, &op); in vt_compat_ioctl()
1191 return compat_kdfontop_ioctl(up, perm, &op, vc); in vt_compat_ioctl()
1195 return compat_unimap_ioctl(cmd, up, perm, vc); in vt_compat_ioctl()
1239 static void complete_change_console(struct vc_data *vc) in complete_change_console() argument
1252 switch_screen(vc); in complete_change_console()
1264 if (old_vc_mode != vc->vc_mode) { in complete_change_console()
1265 if (vc->vc_mode == KD_TEXT) in complete_change_console()
1276 if (vc->vt_mode.mode == VT_PROCESS) { in complete_change_console()
1282 if (kill_pid(vc->vt_pid, vc->vt_mode.acqsig, 1) != 0) { in complete_change_console()
1292 reset_vc(vc); in complete_change_console()
1294 if (old_vc_mode != vc->vc_mode) { in complete_change_console()
1295 if (vc->vc_mode == KD_TEXT) in complete_change_console()
1306 vt_event_post(VT_EVENT_SWITCH, old, vc->vc_num); in complete_change_console()
1315 struct vc_data *vc; in change_console() local
1335 vc = vc_cons[fg_console].d; in change_console()
1336 if (vc->vt_mode.mode == VT_PROCESS) { in change_console()
1345 vc->vt_newvt = new_vc->vc_num; in change_console()
1346 if (kill_pid(vc->vt_pid, vc->vt_mode.relsig, 1) == 0) { in change_console()
1364 reset_vc(vc); in change_console()
1374 if (vc->vc_mode == KD_GRAPHICS) in change_console()