Lines Matching defs:vc
377 vga_raster_init(struct vga_config *vc, bus_space_tag_t iot,
380 struct vga_handle *vh = &vc->hdl;
406 vc->nscreens = 0;
407 LIST_INIT(&vc->screens);
408 vc->active = NULL;
409 vc->currenttype = vh->vh_mono ? &vga_25lscreen_mono : &vga_25lscreen;
410 callout_init(&vc->vc_switch_callout, 0);
413 vc->nfonts = 1;
414 LIST_INIT(&vc->vc_fontlist);
434 LIST_INSERT_HEAD(&vc->vc_fontlist, vf, next);
438 vga_raster_init_screen(struct vga_config *vc, struct vgascreen *scr,
445 scr->cfg = vc;
446 scr->hdl = &vc->hdl;
451 vh = &vc->hdl;
454 vga_raster_setup_font(vc, scr);
486 vga_raster_setscreentype(vc, type);
506 if (!vc->hdl.vh_mono)
517 vc->nscreens++;
518 LIST_INSERT_HEAD(&vc->screens, scr, next);
527 struct vga_config *vc;
533 vc = &vga_console_vc;
536 vc = malloc(sizeof(struct vga_config), M_DEVBUF, M_WAITOK);
537 vga_raster_init(vc, iot, memt);
540 vc->vc_type = type;
541 vc->vc_funcs = vf;
543 sc->sc_vc = vc;
544 vc->softc = sc;
547 aa.scrdata = (vc->hdl.vh_mono ? &vga_screenlist_mono : &vga_screenlist);
549 aa.accesscookie = vc;
558 struct vga_config *vc;
561 vc = &vga_console_vc;
562 vh = &vc
592 vga_get_video(struct vga_config *vc)
595 return (vga_ts_read(&vc->hdl, mode) & VGA_TS_MODE_BLANK) == 0;
599 vga_set_video(struct vga_config *vc, int state)
603 vga_ts_write(&vc->hdl, syncreset, 0x01);
605 val = vga_ts_read(&vc->hdl, mode);
606 vga_ts_write(&vc->hdl, mode, val & ~VGA_TS_MODE_BLANK);
608 val = vga_6845_read(&vc->hdl, mode);
609 vga_6845_write(&vc->hdl, mode, val | 0x80);
612 val = vga_ts_read(&vc->hdl, mode);
613 vga_ts_write(&vc->hdl, mode, val | VGA_TS_MODE_BLANK);
615 val = vga_6845_read(&vc->hdl, mode);
616 vga_6845_write(&vc->hdl, mode, val & ~0x80);
619 vga_ts_write(&vc->hdl, syncreset, 0x03);
626 struct vga_config *vc = v;
627 const struct vga_funcs *vf = vc->vc_funcs;
631 *(int *)data = vc->vc_type;
636 const struct wsscreen_descr *wd = vc->currenttype;
646 *(int *)data = (vga_get_video(vc) ?
651 vga_set_video(vc, *(int *)data == WSDISPLAYIO_VIDEO_ON);
668 if (vc->vc_funcs == NULL) {
688 struct vga_config *vc = v;
689 const struct vga_funcs *vf = vc->vc_funcs;
691 if (vc->vc_funcs == NULL)
704 struct vga_config *vc = v;
707 if (vc->nscreens == 1) {
708 vc->screens.lh_first->mem = boot_scrmem;
712 vga_raster_init_screen(vc, scr, type, vc->nscreens == 0, defattrp);
714 if (vc->nscreens == 1) {
716 vc->active = scr;
717 vc->currenttype = type;
735 struct vga_config *vc = vs->cfg;
738 vc->nscreens--;
744 if (vc->active == vs)
745 vc->active = 0;
753 struct vga_config *vc = scr->cfg;
755 oldscr = vc->active; /* can be NULL! */
760 vc->wantedscreen = cookie;
761 vc->switchcb = cb;
762 vc->switchcbarg = cbarg;
764 callout_reset(&vc->vc_switch_callout, 0,
765 (void(*)(void *))vga_switch_screen, vc);
769 vga_switch_screen(vc);
774 vga_switch_screen(struct vga_config *vc)
777 struct vga_handle *vh = &vc->hdl;
780 scr = vc->wantedscreen;
783 (*vc->switchcb)(vc->switchcbarg, EIO, 0);
787 oldscr = vc->active; /* can be NULL! */
792 if (oldscr->type != vc->currenttype)
807 if (vc->currenttype != type) {
808 vga_raster_setscreentype(vc, type);
809 vc->currenttype = type;
826 vc->active = scr;
830 vc->wantedscreen = 0;
831 if (vc->switchcb)
832 (*vc->switchcb)(vc->switchcbarg, 0, 0);
846 vga_raster_setup_font(struct vga_config *vc, struct vgascreen *scr)
852 LIST_FOREACH(vf, &vc->vc_fontlist, next) {
1405 struct vga_config *vc = scr->cfg;
1411 if (vc->hdl.vh_mono) {
1458 vga_raster_setscreentype(struct vga_config *vc,
1461 struct vga_handle *vh = &vc->hdl;