Lines Matching refs:pcs
96 struct pcdisplayscreen pcs; member
332 8, scr->pcs.type->fontheight, 0, WSFONT_FIND_BITMAP) && in egavga_getfont()
343 cookie = wsfont_find(name, 8, scr->pcs.type->fontheight, 0, in egavga_getfont()
405 const struct wsscreen_descr *type = scr->pcs.type; in vga_selectfont()
448 scr->pcs.hdl = (struct pcdisplay_handle *)&vc->hdl; in vga_init_screen()
449 scr->pcs.type = type; in vga_init_screen()
450 scr->pcs.active = existing; in vga_init_screen()
467 scr->pcs.dispoffset = vga_6845_read(&vc->hdl, startadrh) << 9; in vga_init_screen()
468 scr->pcs.dispoffset |= vga_6845_read(&vc->hdl, startadrl) << 1; in vga_init_screen()
471 if (scr->pcs.dispoffset < scr->mindispoffset || in vga_init_screen()
472 scr->pcs.dispoffset > scr->maxdispoffset) in vga_init_screen()
473 scr->pcs.dispoffset = scr->mindispoffset; in vga_init_screen()
481 scr->pcs.dispoffset = scr->mindispoffset; in vga_init_screen()
484 scr->pcs.visibleoffset = scr->pcs.dispoffset; in vga_init_screen()
487 scr->pcs.cursorrow = cpos / type->ncols; in vga_init_screen()
488 scr->pcs.cursorcol = cpos % type->ncols; in vga_init_screen()
489 pcdisplay_cursor_init(&scr->pcs, existing); in vga_init_screen()
510 scr->pcs.mem = NULL; in vga_init_screen()
704 vga_console_screen.pcs.cursorcol, in vga_cnattach()
705 vga_console_screen.pcs.cursorrow, defattr); in vga_cnattach()
811 return pcdisplay_getwschar(&scr->pcs, in vga_ioctl()
816 return pcdisplay_putwschar(&scr->pcs, in vga_ioctl()
876 scr1->pcs.mem = in vga_alloc_screen()
877 malloc(scr1->pcs.type->ncols * scr1->pcs.type->nrows * 2, in vga_alloc_screen()
885 scr->pcs.mem = malloc(type->ncols * type->nrows * 2, in vga_alloc_screen()
887 pcdisplay_eraserows(&scr->pcs, 0, type->nrows, *defattrp); in vga_alloc_screen()
891 *curxp = scr->pcs.cursorcol; in vga_alloc_screen()
892 *curyp = scr->pcs.cursorrow; in vga_alloc_screen()
1015 type = scr->pcs.type; in vga_doswitch()
1019 if (!oldscr->pcs.active) in vga_doswitch()
1021 if (oldscr->pcs.type != vc->currenttype) in vga_doswitch()
1029 if (scr->pcs.active) in vga_doswitch()
1034 const struct wsscreen_descr *oldtype = oldscr->pcs.type; in vga_doswitch()
1036 oldscr->pcs.active = 0; in vga_doswitch()
1038 oldscr->pcs.dispoffset, oldscr->pcs.mem, in vga_doswitch()
1050 scr->pcs.visibleoffset = scr->pcs.dispoffset = scr->mindispoffset; in vga_doswitch()
1051 if (!oldscr || (scr->pcs.dispoffset != oldscr->pcs.dispoffset)) { in vga_doswitch()
1052 vga_6845_write(vh, startadrh, scr->pcs.dispoffset >> 9); in vga_doswitch()
1053 vga_6845_write(vh, startadrl, scr->pcs.dispoffset >> 1); in vga_doswitch()
1057 scr->pcs.dispoffset, scr->pcs.mem, type->ncols * type->nrows); in vga_doswitch()
1058 scr->pcs.active = 1; in vga_doswitch()
1062 pcdisplay_cursor(&scr->pcs, scr->pcs.cursoron, in vga_doswitch()
1063 scr->pcs.cursorrow, scr->pcs.cursorcol); in vga_doswitch()
1086 if (!res && scr->pcs.active) in vga_load_font()
1134 bus_space_tag_t memt = scr->pcs.hdl->ph_memt; in vga_copyrows()
1135 bus_space_handle_t memh = scr->pcs.hdl->ph_memh; in vga_copyrows()
1136 int ncols = scr->pcs.type->ncols; in vga_copyrows()
1142 if (scr->pcs.active) { in vga_copyrows()
1143 if (dstrow == 0 && (srcrow + nrows == scr->pcs.type->nrows)) { in vga_copyrows()
1145 int cursoron = scr->pcs.cursoron; in vga_copyrows()
1148 pcdisplay_cursor(&scr->pcs, 0, in vga_copyrows()
1149 scr->pcs.cursorrow, scr->pcs.cursorcol); in vga_copyrows()
1152 if ((scr->pcs.dispoffset + srcrow * ncols * 2) in vga_copyrows()
1154 scr->pcs.dispoffset += srcrow * ncols * 2; in vga_copyrows()
1157 scr->pcs.dispoffset + srcoff * 2, in vga_copyrows()
1159 scr->pcs.dispoffset = scr->mindispoffset; in vga_copyrows()
1162 scr->pcs.dispoffset >> 9); in vga_copyrows()
1164 scr->pcs.dispoffset >> 1); in vga_copyrows()
1167 pcdisplay_cursor(&scr->pcs, 1, in vga_copyrows()
1168 scr->pcs.cursorrow, scr->pcs.cursorcol); in vga_copyrows()
1172 scr->pcs.dispoffset + srcoff * 2, in vga_copyrows()
1173 memh, scr->pcs.dispoffset + dstoff * 2, in vga_copyrows()
1177 memcpy(&scr->pcs.mem[dstoff], &scr->pcs.mem[srcoff], in vga_copyrows()
1444 KASSERT(VGA_SCREEN_CANTWOFONTS(scr->pcs.type)); in vga_mapchar()
1464 if (scr->pcs.visibleoffset == scr->pcs.dispoffset) in vga_scroll()
1467 scr->pcs.visibleoffset = scr->pcs.dispoffset; in vga_scroll()
1471 int margin = scr->pcs.type->ncols * 2; in vga_scroll()
1474 vga_scr_end = (scr->pcs.dispoffset + scr->pcs.type->ncols * in vga_scroll()
1475 scr->pcs.type->nrows * 2); in vga_scroll()
1478 we = scr->vga_rollover + scr->pcs.type->ncols * 2; in vga_scroll()
1483 p = (scr->pcs.visibleoffset - ul + we) % we + lines * in vga_scroll()
1484 (scr->pcs.type->ncols * 2); in vga_scroll()
1485 st = (scr->pcs.dispoffset - ul + we) % we; in vga_scroll()
1490 scr->pcs.visibleoffset = (p + ul) % we; in vga_scroll()
1493 vga_6845_write(vh, startadrh, scr->pcs.visibleoffset >> 9); in vga_scroll()
1494 vga_6845_write(vh, startadrl, scr->pcs.visibleoffset >> 1); in vga_scroll()