Lines Matching refs:vc
93 bool vc_is_sel(const struct vc_data *vc) in vc_is_sel() argument
95 return vc == vc_sel.cons; in vc_is_sel()
198 static int vc_selection_store_chars(struct vc_data *vc, bool unicode) in vc_selection_store_chars() argument
224 if (!((i + 2) % vc->vc_size_row)) { in vc_selection_store_chars()
239 static int vc_do_selection(struct vc_data *vc, unsigned short mode, int ps, in vc_do_selection() argument
257 if (!(ps % vc->vc_size_row)) in vc_do_selection()
267 if (!((pe + 2) % vc->vc_size_row)) in vc_do_selection()
272 new_sel_start = rounddown(ps, vc->vc_size_row); in vc_do_selection()
273 new_sel_end = rounddown(pe, vc->vc_size_row) + in vc_do_selection()
274 vc->vc_size_row - 2; in vc_do_selection()
288 !atedge(new_sel_end, vc->vc_size_row) && in vc_do_selection()
292 atedge(pe, vc->vc_size_row)) in vc_do_selection()
323 return vc_selection_store_chars(vc, unicode); in vc_do_selection()
326 static int vc_selection(struct vc_data *vc, struct tiocl_selection *v, in vc_selection() argument
339 v->xs = min_t(u16, v->xs - 1, vc->vc_cols - 1); in vc_selection()
340 v->ys = min_t(u16, v->ys - 1, vc->vc_rows - 1); in vc_selection()
341 v->xe = min_t(u16, v->xe - 1, vc->vc_cols - 1); in vc_selection()
342 v->ye = min_t(u16, v->ye - 1, vc->vc_rows - 1); in vc_selection()
350 ps = v->ys * vc->vc_size_row + (v->xs << 1); in vc_selection()
351 pe = v->ye * vc->vc_size_row + (v->xe << 1); in vc_selection()
355 if (vc_sel.cons != vc) { in vc_selection()
357 vc_sel.cons = vc; in vc_selection()
360 return vc_do_selection(vc, v->sel_mode, ps, pe); in vc_selection()
386 struct vc_data *vc = tty->driver_data; in paste_selection() local
400 tty_buffer_lock_exclusive(&vc->port); in paste_selection()
402 add_wait_queue(&vc->paste_wait, &wait); in paste_selection()
423 remove_wait_queue(&vc->paste_wait, &wait); in paste_selection()
426 tty_buffer_unlock_exclusive(&vc->port); in paste_selection()