Home | History | Annotate | Download | only in ic

Lines Matching defs:scr

47 pcdisplay_cursor_init(struct pcdisplayscreen *scr, int existing)
55 pcdisplay_6845_write(scr->hdl, curstart, 0x20);
56 pcdisplay_6845_write(scr->hdl, curend, 0x00);
60 * This is the first screen. At this point, scr->mem is NULL
64 memt = scr->hdl->ph_memt;
65 memh = scr->hdl->ph_memh;
66 off = (scr->cursorrow * scr->type->ncols + scr->cursorcol) * 2
67 + scr->dispoffset;
69 scr->cursortmp = bus_space_read_2(memt, memh, off);
70 bus_space_write_2(memt, memh, off, scr->cursortmp ^ 0x7700);
72 scr->cursortmp = 0;
80 pcdisplay_6845_write(scr->hdl, curstart,
81 scr->type->fontheight - 2);
82 pcdisplay_6845_write(scr->hdl, curend,
83 scr->type->fontheight - 1);
86 scr->cursoron = 1;
93 struct pcdisplayscreen *scr = id;
94 bus_space_tag_t memt = scr->hdl->ph_memt;
95 bus_space_handle_t memh = scr->hdl->ph_memh;
99 if (scr->cursoron) {
100 off = scr->cursorrow * scr->type->ncols + scr->cursorcol;
101 if (scr->active)
102 bus_space_write_2(memt, memh, scr->dispoffset + off * 2,
103 scr->cursortmp);
105 scr->mem[off] = scr->cursortmp;
108 scr->cursorrow = row;
109 scr->cursorcol = col;
111 if ((scr->cursoron = on) == 0)
114 off = (scr->cursorrow * scr->type->ncols + scr->cursorcol);
115 if (scr->active) {
116 off = off * 2 + scr->dispoffset;
117 scr->cursortmp = bus_space_read_2(memt, memh, off);
118 bus_space_write_2(memt, memh, off, scr->cursortmp ^ 0x7700);
120 scr->cursortmp = scr->mem[off];
121 scr->mem[off] = scr->cursortmp ^ 0x7700;
124 struct pcdisplayscreen *scr = id;
127 scr->cursorrow = row;
128 scr->cursorcol = col;
129 scr->cursoron = on;
131 if (scr->active) {
135 pos = scr->dispoffset / 2
136 + row * scr->type->ncols + col;
138 pcdisplay_6845_write(scr->hdl, cursorh, pos >> 8);
139 pcdisplay_6845_write(scr->hdl, cursorl, pos);
158 struct pcdisplayscreen *scr = id;
159 bus_space_tag_t memt = scr->hdl->ph_memt;
160 bus_space_handle_t memh = scr->hdl->ph_memh;
163 off = row * scr->type->ncols + col;
166 if (__predict_false(off >= (scr->type->ncols * scr->type->nrows)))
169 if (scr->active)
170 bus_space_write_2(memt, memh, scr->dispoffset + off * 2,
173 scr->mem[off] = c | (attr << 8);
175 scr->visibleoffset = scr->dispoffset;
181 struct pcdisplayscreen *scr = id;
182 bus_space_tag_t memt = scr->hdl->ph_memt;
183 bus_space_handle_t memh = scr->hdl->ph_memh;
186 srcoff = dstoff = row * scr->type->ncols;
190 if (scr->active)
192 scr->dispoffset + srcoff * 2,
193 memh, scr->dispoffset + dstoff * 2,
196 memcpy(&scr->mem[dstoff], &scr->mem[srcoff], ncols * 2);
202 struct pcdisplayscreen *scr = id;
203 bus_space_tag_t memt = scr->hdl->ph_memt;
204 bus_space_handle_t memh = scr->hdl->ph_memh;
209 off = row * scr->type->ncols + startcol;
213 if (scr->active)
214 bus_space_set_region_2(memt, memh, scr->dispoffset + off * 2,
218 scr->mem[off + i] = val;
224 struct pcdisplayscreen *scr = id;
225 bus_space_tag_t memt = scr->hdl->ph_memt;
226 bus_space_handle_t memh = scr->hdl->ph_memh;
227 int ncols = scr->type->ncols;
233 if (scr->active)
235 scr->dispoffset + srcoff * 2,
236 memh, scr->dispoffset + dstoff * 2,
239 memcpy(&scr->mem[dstoff], &scr->mem[srcoff],
246 struct pcdisplayscreen *scr = id;
247 bus_space_tag_t memt = scr->hdl->ph_memt;
248 bus_space_handle_t memh = scr->hdl->ph_memh;
253 off = startrow * scr->type->ncols;
254 count = nrows * scr->type->ncols;
258 if (scr->active)
259 bus_space_set_region_2(memt, memh, scr->dispoffset + off * 2,
263 scr->mem[off + i] = val;
270 struct pcdisplayscreen *scr = id;
271 bus_space_tag_t memt = scr->hdl->ph_memt;
272 bus_space_handle_t memh = scr->hdl->ph_memh;
276 if (scr->active)
277 for (off = 0; off < scr->type->nrows * scr->type->ncols;
280 scr->dispoffset + off * 2);
283 scr->dispoffset + off * 2,
288 for (off = 0; off < scr->type->nrows * scr->type->ncols;
290 chardata = scr->mem[off];
292 scr->mem[off] = ((u_int16_t)(newattr << 8)) |
299 pcdisplay_getwschar(struct pcdisplayscreen *scr, struct wsdisplay_char *wschar)
305 KASSERT(scr != NULL && wschar != NULL);
307 off = wschar->row * scr->type->ncols + wschar->col;
308 if (off >= scr->type->ncols * scr->type->nrows)
311 if (scr->active)
312 chardata = bus_space_read_2(scr->hdl->ph_memt,
313 scr->hdl->ph_memh, scr->dispoffset + off * 2);
315 chardata = scr->mem[off];
329 pcdisplay_putwschar(struct pcdisplayscreen *scr, struct wsdisplay_char *wschar)
335 KASSERT(scr != NULL && wschar != NULL);
337 off = wschar->row * scr->type->ncols + wschar->col;
338 if (off >= (scr->type->ncols * scr->type->nrows))
348 if (scr->active)
349 bus_space_write_2(scr->hdl->ph_memt, scr->hdl->ph_memh,
350 scr->dispoffset + off * 2, chardata);
352 scr->mem[off] = chardata;