Home | History | Annotate | Download | only in isa

Lines Matching defs:vc

286 ega_selectfont(struct ega_config *vc, struct egascreen *scr, char *name1, char *name2)
296 struct egafont *f = vc->vc_fonts[i];
336 ega_init_screen(struct ega_config *vc, struct egascreen *scr, const struct wsscreen_descr *type, int existing, long *attrp)
341 scr->cfg = vc;
342 scr->pcs.hdl = (struct pcdisplay_handle *)&vc->hdl;
349 cpos = vga_6845_read(&vc->hdl, cursorh) << 8;
350 cpos |= vga_6845_read(&vc->hdl, cursorl);
356 scr->pcs.dispoffset = vga_6845_read(&vc->hdl, startadrh) << 9;
357 scr->pcs.dispoffset |= vga_6845_read(&vc->hdl, startadrl) << 1;
381 if (ega_selectfont(vc, scr, 0, 0)) {
388 vc->nscreens++;
389 LIST_INSERT_HEAD(&vc->screens, scr, next);
393 ega_init(struct ega_config *vc, bus_space_tag_t iot, bus_space_tag_t memt, int mono)
395 struct vga_handle *vh = &vc->hdl;
417 vc->nscreens = 0;
418 LIST_INIT(&vc->screens);
419 vc->active = NULL;
420 vc->currenttype = vh->vh_mono ? &ega_stdscreen_mono : &ega_stdscreen;
421 callout_init(&vc->switch_callout, 0);
423 vc->vc_fonts[0] = &ega_builtinfont;
425 vc->vc_fonts[i] = 0;
427 vc->currentfontset1 = vc->currentfontset2 = 0;
585 struct ega_config *vc = v;
588 if (vc->nscreens == 1) {
594 vc->screens.lh_first->pcs.mem =
599 ega_init_screen(vc, scr, type, vc->nscreens == 0, defattrp);
601 if (vc->nscreens == 1) {
603 vc->active = scr;
604 vc->currenttype = type;
621 struct ega_config *vc = vs->cfg;
629 if (vc->active == vs)
630 vc->active = 0;
634 ega_setfont(struct ega_config *vc, struct egascreen *scr)
640 if (vc->currentfontset1 != fontslot1 ||
641 vc->currentfontset2 != fontslot2) {
642 vga_setfontset(&vc->hdl, 2 * fontslot1, 2 * fontslot2);
643 vc->currentfontset1 = fontslot1;
644 vc->currentfontset2 = fontslot2;
652 struct ega_config *vc = scr->cfg;
654 oldscr = vc->active; /* can be NULL! */
659 vc->wantedscreen = cookie;
660 vc->switchcb = cb;
661 vc->switchcbarg = cbarg;
663 callout_reset(&vc->switch_callout, 0,
668 ega_doswitch(vc);
673 ega_doswitch(struct ega_config *vc)
676 struct vga_handle *vh = &vc->hdl;
679 scr = vc->wantedscreen;
682 (*vc->switchcb)(vc->switchcbarg, EIO, 0);
686 oldscr = vc->active; /* can be NULL! */
691 if (oldscr->pcs.type != vc->currenttype)
712 if (vc->currenttype != type) {
714 vc->currenttype = type;
717 ega_setfont(vc, scr);
731 vc->active = scr;
736 vc->wantedscreen = 0;
737 if (vc->switchcb)
738 (*vc->switchcb)(vc->switchcbarg, 0, 0);
744 struct ega_config *vc = v;
754 res = ega_selectfont(vc, scr, data->name, name2);
756 ega_setfont(vc, scr);
772 if (!vc->vc_fonts[slot])
789 vga_loadchars(&vc->hdl, 2 * slot, 0, 256, f->height, data->data);
791 vc->vc_fonts[slot] = f;
800 struct ega_config *vc = scr->cfg;
806 if (vc->hdl.vh_mono) {