Home | History | Annotate | Download | only in ic

Lines Matching refs:vh

53 fontram(struct vga_handle *vh)
58 vga_ts_write(vh, syncreset, 0x01); /* synchronous reset */
59 vga_ts_write(vh, wrplmask, 0x04); /* write to map 2 */
60 vga_ts_write(vh, memmode, 0x07); /* sequential addressing */
61 vga_ts_write(vh, syncreset, 0x03); /* clear synchronous reset */
65 vga_gdc_write(vh, rdplanesel, 0x02); /* select map 2 for CPU reads */
66 vga_gdc_write(vh, mode, 0x00); /* disable odd-even addressing */
67 vga_gdc_write(vh, misc, 0x04); /* map starts at 0xA000 */
71 textram(struct vga_handle *vh)
76 vga_ts_write(vh, syncreset, 0x01); /* synchronous reset */
77 vga_ts_write(vh, wrplmask, 0x03); /* write to map 0 & 1 */
78 vga_ts_write(vh, memmode, 0x03); /* odd-even addressing */
79 vga_ts_write(vh, syncreset, 0x03); /* clear synchronous reset */
83 vga_gdc_write(vh, rdplanesel, 0x00); /* select map 0 for CPU reads */
84 vga_gdc_write(vh, mode, 0x10); /* enable odd-even addressing */
86 vga_gdc_write(vh, misc, (vh->vh_mono ? 0x0a : 0x0e));
91 vga_loadchars(struct vga_handle *vh, int fontset, int first, int num, int lpc,
100 fontram(vh);
104 bus_space_write_1(vh->vh_memt, vh->vh_allmemh,
107 textram(vh);
112 vga_readoutchars(struct vga_handle *vh, int fontset, int first, int num,
121 fontram(vh);
125 data[i * lpc + j] = bus_space_read_1(vh->vh_memt,
126 vh->vh_allmemh, offset + (i << 5) + j);
128 textram(vh);
134 vga_copyfont01(struct vga_handle *vh)
139 fontram(vh);
141 bus_space_copy_region_1(vh->vh_memt, vh->vh_allmemh, 0,
142 vh->vh_allmemh, 1 << 13, 1 << 13);
144 textram(vh);
150 vga_setfontset(struct vga_handle *vh, int fontset1, int fontset2)
165 vga_ts_write(vh, fontsel, cmap);
169 vga_setscreentype(struct vga_handle *vh, const struct wsscreen_descr *type)
172 vga_6845_write(vh, maxrow, type->fontheight - 1);
175 vga_6845_write(vh, vde, type->fontheight * type->nrows - 1);
179 vga_6845_write(vh, curstart, type->fontheight - 2);
180 vga_6845_write(vh, curend, type->fontheight - 1);
190 vga_attr_write(vh, colplen, 0x0f);
192 vga_attr_write(vh, colplen, 0x07);
197 vga_load_builtinfont(struct vga_handle *vh, uint8_t *font, int firstchar,
203 fontram(vh);
206 bus_space_read_region_1(vh->vh_memt, vh->vh_allmemh, i * 32,
209 textram(vh);
221 vga_reset(struct vga_handle *vh, void (*md_initfunc)(struct vga_handle *))
225 if (bus_space_map(vh->vh_iot, 0x3c0, 0x10, 0, &vh->vh_ioh_vga))
228 reg = vga_raw_read(vh, VGA_MISC_DATAR);
229 vh->vh_mono = !(reg & 0x01);
231 if (bus_space_map(vh->vh_iot, vh->vh_mono ? 0x3b0 : 0x3d0, 0x10,
232 0, &vh->vh_ioh_6845))
235 if (bus_space_map(vh->vh_memt, 0xa0000, 0x20000, 0, &vh->vh_allmemh))
238 if (bus_space_subregion(vh->vh_memt, vh->vh_allmemh,
239 vh->vh_mono ? 0x10000 : 0x18000, 0x8000, &vh->vh_memh))
243 if ((vga_gdc_read(vh, misc) & 0x01) == 0)
247 vga_initregs(vh);
251 (*md_initfunc)(vh);
256 bus_space_set_region_2(vh->vh_memt, vh->vh_memh, 0,
260 bus_space_unmap(vh->vh_memt, vh->vh_allmemh, 0x20000);
262 bus_space_unmap(vh->vh_iot, vh->vh_ioh_6845, 0x10);
264 bus_space_unmap(vh->vh_iot, vh->vh_ioh_vga, 0x10);
373 vga_initregs(struct vga_handle *vh)
378 vga_ts_write(vh, mode, vga_ts[1] | VGA_TS_MODE_BLANK);
381 vga_ts_write(vh, syncreset, 0x01);
384 _vga_ts_write(vh, i, vga_ts[i]);
386 vga_ts_write(vh, syncreset, 0x03);
389 vga_6845_write(vh, vsynce, vga_6845_read(vh, vsynce) & ~0x80);
392 _vga_6845_write(vh, i, vga_crtc[i]);
396 _vga_gdc_write(vh, i, vga_gdc[i]);
400 _vga_attr_write(vh, i, vga_atc[i]);
403 if (!vh->vh_mono) {
405 vga_raw_write(vh,
407 vga_raw_write(vh,
409 vga_raw_write(vh,
411 vga_raw_write(vh,
417 vga_raw_write(vh,
418 VGA_MISC_DATAW, VGA_MISCOUT | (vh->vh_mono ? 0 : 0x01));
421 vga_ts_write(vh, mode, vga_ts[1] & ~VGA_TS_MODE_BLANK);