Lines Matching defs:tem

168 tem_add(struct tem_vt_state *tem)
170 ASSERT(MUTEX_HELD(&tems.ts_lock) && MUTEX_HELD(&tem->tvs_lock));
172 list_insert_head(&tems.ts_list, tem);
176 tem_rm(struct tem_vt_state *tem)
178 ASSERT(MUTEX_HELD(&tems.ts_lock) && MUTEX_HELD(&tem->tvs_lock));
180 list_remove(&tems.ts_list, tem);
190 struct tem_vt_state *tem = (struct tem_vt_state *)tem_arg;
193 mutex_enter(&tem->tvs_lock);
195 if (!tem->tvs_initialized) {
196 mutex_exit(&tem->tvs_lock);
201 tem_safe_check_first_time(tem, credp, CALLED_FROM_NORMAL);
202 tem_safe_terminal_emulate(tem, buf, len, credp, CALLED_FROM_NORMAL);
204 mutex_exit(&tem->tvs_lock);
285 * A tem is regarded as initialized only after tem_internal_init(),
310 * re-init the tem after video mode has changed and tems_info has
314 tem_reinit(struct tem_vt_state *tem, boolean_t reset_display)
316 ASSERT(MUTEX_HELD(&tems.ts_lock) && MUTEX_HELD(&tem->tvs_lock));
318 tem_free_buf(tem); /* only free virtual buffers */
321 tem_internal_init(tem, kcred, B_FALSE, reset_display);
325 tem_free_buf(struct tem_vt_state *tem)
327 ASSERT(tem != NULL && MUTEX_HELD(&tem->tvs_lock));
329 if (tem->tvs_outbuf != NULL)
330 kmem_free(tem->tvs_outbuf, tem->tvs_outbuf_size);
331 if (tem->tvs_pix_data != NULL)
332 kmem_free(tem->tvs_pix_data, tem->tvs_pix_data_size);
333 if (tem->tvs_screen_buf != NULL)
334 kmem_free(tem->tvs_screen_buf, tem->tvs_screen_buf_size);
335 if (tem->tvs_fg_buf != NULL)
336 kmem_free(tem->tvs_fg_buf, tem->tvs_color_buf_size);
337 if (tem->tvs_bg_buf != NULL)
338 kmem_free(tem->tvs_bg_buf, tem->tvs_color_buf_size);
344 struct tem_vt_state *tem = (struct tem_vt_state *)tem_arg;
347 mutex_enter(&tem->tvs_lock);
349 if (tem->tvs_isactive && tem->tvs_fbmode == KD_TEXT)
350 tem_safe_blank_screen(tem, credp, CALLED_FROM_NORMAL);
352 tem_free_buf(tem);
353 tem_rm(tem);
355 if (tems.ts_active == tem)
358 mutex_exit(&tem->tvs_lock);
361 kmem_free(tem, sizeof (struct tem_vt_state));
638 * Only need to reinit the active tem.
785 tem_prom_scroll_up(struct tem_vt_state *tem, int nrows, cred_t *credp,
806 tem_safe_pix_cls_range(tem, 0, nrows, tems.ts_p_offset.y,
818 tem_adjust_row(struct tem_vt_state *tem, int prom_row, cred_t *credp,
843 * below our tem's lower boundary.
847 tem_prom_scroll_up(tem, scroll_up_lines, credp, called_from);
855 tem_pix_align(struct tem_vt_state *tem, cred_t *credp,
873 * kernel console tem is different with that of prom
874 * tem.
876 row = tem_adjust_row(tem, row, credp, called_from);
879 tem->tvs_first_line = row + 1;
882 tem->tvs_s_cursor.row = tem->tvs_c_cursor.row =
884 tem->tvs_s_cursor.col = tem->tvs_c_cursor.col = 0;
886 tem_safe_reset_display(tem, credp, called_from, B_TRUE, B_TRUE);
947 struct tem_vt_state *tem = (struct tem_vt_state *)tem_arg;
951 mutex_enter(&tem->tvs_lock);
952 fbmode = tem->tvs_fbmode;
953 mutex_exit(&tem->tvs_lock);
961 struct tem_vt_state *tem = (struct tem_vt_state *)tem_arg;
964 mutex_enter(&tem->tvs_lock);
966 if (fbmode == tem->tvs_fbmode) {
967 mutex_exit(&tem->tvs_lock);
972 tem->tvs_fbmode = fbmode;
974 if (tem->tvs_isactive) {
975 tem_kdsetmode(tem->tvs_fbmode, credp);
977 tem_safe_unblank_screen(tem, credp, CALLED_FROM_NORMAL);
980 mutex_exit(&tem->tvs_lock);
987 struct tem_vt_state *tem = (struct tem_vt_state *)tem_arg;
990 tems.ts_active = tem;
992 mutex_enter(&tem->tvs_lock);
993 tem->tvs_isactive = B_TRUE;
995 tem_kdsetmode(tem->tvs_fbmode, credp);
998 tem_safe_unblank_screen(tem, credp, CALLED_FROM_NORMAL);
1000 mutex_exit(&tem->tvs_lock);