Lines Matching refs:view

74  * The main tty view data structure.
81 struct raw3270_view view;
147 return tp->view.rows - TTY3270_INPUT_AREA_ROWS;
153 raw3270_buffer_address(tp->view.dev, cp, x, y);
223 *cp++ = tp->view.ascebc['>'];
228 tp->view.cols * 2 - TTY3270_STATUS_AREA_SIZE - 2);
236 if (count < tp->view.cols * 2 - 11)
244 *d++ = tp->view.ascebc[(int)*s++];
275 codepage_convert(tp->view.ascebc, cp, len);
303 struct tty3270 *tp = container_of(rq->view, struct tty3270, view);
347 if (line->len < tp->view.cols)
362 if (line->len < tp->view.cols)
440 *cp++ = tp->view.ascebc[c];
537 spin_lock_irq(&tp->view.lock);
571 rc = raw3270_start(&tp->view, wrq);
579 spin_unlock_irq(&tp->view.lock);
603 spin_lock_irq(&tp->view.lock);
612 spin_unlock_irq(&tp->view.lock);
616 * Deactivate tty view.
622 raw3270_deactivate_view(&tp->view);
642 spin_lock_irq(&tp->view.lock);
649 spin_unlock_irq(&tp->view.lock);
659 spin_lock_irq(&tp->view.lock);
664 spin_unlock_irq(&tp->view.lock);
674 struct tty3270 *tp = container_of(rrq->view, struct tty3270, view);
678 spin_lock_irq(&tp->view.lock);
690 len = tty3270_input_size(tp->view.cols) - 6 - rrq->rescnt;
705 raw3270_start_request(&tp->view, tp->readpartreq, TC_WRITESF,
714 spin_unlock_irq(&tp->view.lock);
717 raw3270_start_request(&tp->view, tp->kreset, TC_WRITE, &kreset_data, 1);
726 raw3270_put_view(&tp->view);
734 struct tty3270 *tp = container_of(rq->view, struct tty3270, view);
736 raw3270_get_view(rq->view);
756 raw3270_request_set_data(rrq, tp->input, tty3270_input_size(tp->view.cols));
759 rc = raw3270_start(&tp->view, rrq);
761 rc = raw3270_start_irq(&tp->view, rrq);
776 raw3270_put_view(&tp->view);
780 * Switch to the tty view.
782 static int tty3270_activate(struct raw3270_view *view)
784 struct tty3270 *tp = container_of(view, struct tty3270, view);
791 static void tty3270_deactivate(struct raw3270_view *view)
793 struct tty3270 *tp = container_of(view, struct tty3270, view);
811 raw3270_get_view(&tp->view);
962 static void tty3270_resize(struct raw3270_view *view,
966 struct tty3270 *tp = container_of(view, struct tty3270, view);
978 spin_lock_irq(&tp->view.lock);
980 spin_unlock_irq(&tp->view.lock);
998 spin_lock_irq(&tp->view.lock);
1003 tp->view.rows = new_rows;
1004 tp->view.cols = new_cols;
1005 tp->view.model = new_model;
1015 spin_unlock_irq(&tp->view.lock);
1026 ws.ws_col = tp->view.cols;
1041 static void tty3270_release(struct raw3270_view *view)
1043 struct tty3270 *tp = container_of(view, struct tty3270, view);
1050 raw3270_put_view(&tp->view);
1058 static void tty3270_free(struct raw3270_view *view)
1060 struct tty3270 *tp = container_of(view, struct tty3270, view);
1078 struct raw3270_view *view = raw3270_find_view(&tty3270_fn, i);
1080 if (!IS_ERR(view))
1081 raw3270_del_view(view);
1108 rc = raw3270_add_view(&tp->view, &tty3270_fn,
1114 tp->screen = tty3270_alloc_screen(tp, tp->view.rows, tp->view.cols,
1127 tp->input = kzalloc(tty3270_input_size(tp->view.cols), GFP_KERNEL | GFP_DMA);
1133 tp->prompt = kzalloc(tty3270_input_size(tp->view.cols), GFP_KERNEL);
1139 tp->rcl_lines = tty3270_alloc_recall(tp->view.cols);
1153 kbd_ascebc(tp->kbd, tp->view.ascebc);
1155 raw3270_activate_view(&tp->view);
1156 raw3270_put_view(&tp->view);
1167 tty3270_free_screen(tp->screen, tp->view.rows);
1169 raw3270_put_view(&tp->view);
1170 raw3270_del_view(&tp->view);
1182 struct raw3270_view *view;
1187 view = raw3270_find_view(&tty3270_fn, tty->index + RAW3270_FIRSTMINOR);
1188 if (IS_ERR(view)) {
1193 tp = container_of(view, struct tty3270, view);
1199 tty->winsize.ws_col = tp->view.cols;
1202 raw3270_put_view(&tp->view);
1242 raw3270_put_view(&tp->view);
1332 if (n > tp->view.cols - tp->cx)
1333 n = tp->view.cols - tp->cx;
1334 k = min_t(int, line->len - tp->cx, tp->view.cols - tp->cx - n);
1338 if (line->len > tp->view.cols)
1339 line->len = tp->view.cols;
1380 tp->cx = min_t(int, tp->cx, tp->view.cols - 1);
1400 end = tp->view.cols;
1408 end = tp->view.cols;
1533 tp->cx = min_t(int, tp->view.cols - 1, max_cx);
1733 spin_lock_irq(&tp->view.lock);
1755 if (tp->cx >= tp->view.cols) {
1786 if (tp->cx >= tp->view.cols) {
1800 spin_unlock_irq(&tp->view.lock);
1864 spin_lock_irq(&tp->view.lock);
1873 spin_unlock_irq(&tp->view.lock);
1914 spin_lock_irq(&tp->view.lock);
1923 spin_unlock_irq(&tp->view.lock);
2057 spin_lock_irqsave(&tp->view.lock, flags);
2064 if (tp->cx >= tp->view.cols) {
2072 spin_unlock_irqrestore(&tp->view.lock, flags);
2086 raw3270_wait_cons_dev(tp->view.dev);
2107 if (!tp->view.dev)
2109 if (!raw3270_view_lock_unavailable(&tp->view)) {
2110 rc = raw3270_activate_view(&tp->view);
2114 if (!spin_trylock_irqsave(&tp->view.lock, flags))
2120 spin_unlock_irqrestore(&tp->view.lock, flags);
2122 spin_lock_irqsave(&tp->view.lock, flags);
2125 spin_unlock_irqrestore(&tp->view.lock, flags);
2149 struct raw3270_view *view;
2169 view = raw3270_find_view(&tty3270_fn, RAW3270_FIRSTMINOR);
2170 if (IS_ERR(view)) {
2175 tp = container_of(view, struct tty3270, view);