Lines Matching full:view

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