Lines Matching refs:ptem

209 tem_internal_init(struct tem_vt_state *ptem, cred_t *credp,  in tem_internal_init()  argument
219 ASSERT(MUTEX_HELD(&tems.ts_lock) && MUTEX_HELD(&ptem->tvs_lock)); in tem_internal_init()
222 ptem->tvs_pix_data_size = tems.ts_pix_data_size; in tem_internal_init()
223 ptem->tvs_pix_data = in tem_internal_init()
224 kmem_alloc(ptem->tvs_pix_data_size, KM_SLEEP); in tem_internal_init()
227 ptem->tvs_outbuf_size = tems.ts_c_dimension.width; in tem_internal_init()
228 ptem->tvs_outbuf = in tem_internal_init()
229 (unsigned char *)kmem_alloc(ptem->tvs_outbuf_size, KM_SLEEP); in tem_internal_init()
233 ptem->tvs_screen_buf_size = width * height; in tem_internal_init()
234 ptem->tvs_screen_buf = in tem_internal_init()
238 ptem->tvs_fg_buf = (text_color_t *)kmem_alloc(total, KM_SLEEP); in tem_internal_init()
239 ptem->tvs_bg_buf = (text_color_t *)kmem_alloc(total, KM_SLEEP); in tem_internal_init()
240 ptem->tvs_color_buf_size = total; in tem_internal_init()
242 tem_safe_reset_display(ptem, credp, CALLED_FROM_NORMAL, in tem_internal_init()
245 tem_safe_get_color(ptem, &fg, &bg, TEM_ATTR_SCREEN_REVERSE); in tem_internal_init()
248 ptem->tvs_screen_buf[i * width + j] = ' '; in tem_internal_init()
249 ptem->tvs_fg_buf[(i * width +j) * tc_size] = fg; in tem_internal_init()
250 ptem->tvs_bg_buf[(i * width +j) * tc_size] = bg; in tem_internal_init()
254 ptem->tvs_initialized = 1; in tem_internal_init()
260 struct tem_vt_state *ptem = (struct tem_vt_state *)tem_arg; in tem_initialized() local
263 mutex_enter(&ptem->tvs_lock); in tem_initialized()
264 ret = ptem->tvs_initialized; in tem_initialized()
265 mutex_exit(&ptem->tvs_lock); in tem_initialized()
273 struct tem_vt_state *ptem; in tem_init() local
275 ptem = kmem_zalloc(sizeof (struct tem_vt_state), KM_SLEEP); in tem_init()
276 mutex_init(&ptem->tvs_lock, (char *)NULL, MUTEX_DRIVER, NULL); in tem_init()
279 mutex_enter(&ptem->tvs_lock); in tem_init()
281 ptem->tvs_isactive = B_FALSE; in tem_init()
282 ptem->tvs_fbmode = KD_TEXT; in tem_init()
288 ptem->tvs_initialized = 0; in tem_init()
295 tem_add(ptem); in tem_init()
296 mutex_exit(&ptem->tvs_lock); in tem_init()
298 return ((tem_vt_state_t)ptem); in tem_init()
301 tem_internal_init(ptem, credp, B_TRUE, B_FALSE); in tem_init()
302 tem_add(ptem); in tem_init()
303 mutex_exit(&ptem->tvs_lock); in tem_init()
306 return ((tem_vt_state_t)ptem); in tem_init()