Lines Matching defs:vh
380 struct vga_handle *vh = &vc->hdl;
384 vh->vh_iot = iot;
385 vh->vh_memt = memt;
387 if (bus_space_map(vh->vh_iot, 0x3c0, 0x10, 0, &vh->vh_ioh_vga))
391 mor = bus_space_read_1(vh->vh_iot, vh->vh_ioh_vga, VGA_MISC_DATAR);
392 vh->vh_mono = !(mor & 1);
394 if (bus_space_map(vh->vh_iot, (vh->vh_mono ? 0x3b0 : 0x3d0), 0x10, 0,
395 &vh->vh_ioh_6845))
398 if (bus_space_map(vh->vh_memt, 0xa0000, 0x20000,
399 BUS_SPACE_MAP_CACHEABLE, &vh->vh_allmemh))
402 if (bus_space_subregion(vh->vh_memt, vh->vh_allmemh, 0, 0x10000,
403 &vh->vh_memh))
409 vc->currenttype = vh->vh_mono ? &vga_25lscreen_mono : &vga_25lscreen;
431 vga_load_builtinfont(vh, builtinfont_data, 0, 256);
443 struct vga_handle *vh;
451 vh = &vc->hdl;
459 cpos = vga_6845_read(vh, cursorh) << 8;
460 cpos |= vga_6845_read(vh, cursorl);
466 scr->dispoffset = vga_6845_read(vh, startadrh) << 9;
467 scr->dispoffset |= vga_6845_read(vh, startadrl) << 1;
479 scr->mem[i].ch = bus_space_read_1(vh->vh_memt,
480 vh->vh_allmemh, 0x18000 + i * 2);
481 scr->mem[i].attr = bus_space_read_1(vh->vh_memt,
482 vh->vh_allmemh, 0x18000 + i * 2 + 1);
489 vga_gdc_write(vh, mode, 0x02);
490 bus_space_set_region_4(vh->vh_memt, vh->vh_allmemh, 0, 0,
559 struct vga_handle *vh;
562 vh
567 bus_space_unmap(vh->vh_iot, vh->vh_ioh_vga, 0x10);
568 bus_space_unmap(vh->vh_iot, vh->vh_ioh_6845, 0x10);
569 bus_space_unmap(vh->vh_memt, vh->vh_allmemh, 0x20000);
777 struct vga_handle *vh = &vc->hdl;
815 vga_6845_write(vh, startadrh, scr->dispoffset >> 8);
816 vga_6845_write(vh, startadrl, scr->dispoffset);
820 vga_gdc_write(vh, mode, 0x02);
821 bus_space_set_region_4(vh->vh_memt, vh->vh_allmemh, 0, 0, 0x2000);
1001 vga_set_mode(struct vga_handle *vh, struct vga_moderegs *regs)
1006 vga_ts_write(vh, mode, vga_ts_read(vh, mode) | VGA_TS_MODE_BLANK);
1009 bus_space_write_1(vh->vh_iot, vh->vh_ioh_vga, VGA_MISC_DATAW,
1013 vga_ts_write(vh, syncreset, 0x01);
1014 vga_ts_write(vh, mode, regs->ts[1] | VGA_TS_MODE_BLANK);
1016 _vga_ts_write(vh, i, regs->ts[i]);
1018 vga_ts_write(vh, syncreset, 0x03);
1021 vga_6845_write(vh, vsynce, vga_6845_read(vh, vsynce) & ~0x80);
1024 _vga_6845_write(vh, i, regs->crtc[i]);
1028 _vga_gdc_write(vh, i, regs->gdc[i]);
1032 _vga_attr_write(vh, i, regs->atc[i]);
1035 vga_ts_write(vh, mode, vga_ts_read(vh, mode) & ~VGA_TS_MODE_BLANK);
1185 struct vga_handle *vh = scr->hdl;
1186 bus_space_tag_t memt = vh->vh_memt;
1187 bus_space_handle_t memh = vh->vh_memh;
1207 vga_gdc_write(vh, mode, 0x02);
1214 vga_gdc_write(vh, mode, 0x03);
1215 vga_gdc_write(vh, setres, fgcolor);
1227 vga_gdc_write(vh, mode, 0x02);
1235 vga_gdc_write(vh, mode, 0x03);
1236 vga_gdc_write(vh, setres, fgcolor);
1261 struct vga_handle *vh = scr->hdl;
1262 bus_space_tag_t memt = vh->vh_memt;
1263 bus_space_handle_t memh = vh->vh_memh;
1277 vga_gdc_write(vh, mode, 0x01);
1304 struct vga_handle *vh = scr->hdl;
1305 bus_space_tag_t memt = vh->vh_memt;
1306 bus_space_handle_t memh = vh->vh_memh;
1321 vga_gdc_write(vh, mode, 0x01);
1341 vga_6845_write(vh, startadrh, scr->dispoffset >> 8);
1342 vga_6845_write(vh, startadrl, scr->dispoffset);
1362 struct vga_handle *vh = scr->hdl;
1363 bus_space_tag_t memt = vh->vh_memt;
1364 bus_space_handle_t memh = vh->vh_memh;
1378 vga_gdc_write(vh, mode, 0x02);
1461 struct vga_handle *vh = &vc->hdl;
1465 vga_set_mode(vh, &moderegs);