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