Lines Matching refs:ip
95 rh_init(struct ite_softc *ip)
100 if (ip->grf == 0)
101 ip->grf = &grf_softc[ip - ite_softc];
104 ip->priv = ip->grf->g_data;
105 md = (struct MonDef *) ip->priv;
107 ip->cols = md->TX;
108 ip->rows = md->TY;
113 rh_cursor(struct ite_softc *ip, int flag)
116 volatile u_char *ba = ip->grf->g_regkva;
129 int pos = ip->curx + ip->cury * ip->cols;
137 RZ3SetCursorPos (ip->grf, pos);
139 ip->cursorx = ip->curx;
140 ip->cursory = ip->cury;
147 screen_up(struct ite_softc *ip, int top, int bottom, int lines)
155 RZ3AlphaErase(ip->grf, 0, top, bottom - top, ip->cols);
159 RZ3AlphaCopy(ip->grf, 0, top+lines, 0, top, ip->cols, bottom-top-lines+1);
160 RZ3AlphaErase(ip->grf, 0, bottom - lines + 1, ip->cols, lines);
165 screen_down (struct ite_softc *ip, int top, int bottom, int lines)
173 RZ3AlphaErase(ip->grf, 0, top, bottom - top, ip->cols);
177 RZ3AlphaCopy(ip->grf, 0, top, 0, top+lines, ip->cols, bottom-top-lines+1);
178 RZ3AlphaErase(ip->grf, 0, top, ip->cols, lines);
184 rh_deinit(struct ite_softc *ip)
186 ip->flags &= ~ITE_INITED;
191 rh_putc(struct ite_softc *ip, int c, int dy, int dx, int mode)
193 volatile u_char * fb = ip->grf->g_fbkva;
201 fb += 4 * (dy * ip->cols + dx);
207 rh_clear(struct ite_softc *ip, int sy, int sx, int h, int w)
209 RZ3AlphaErase (ip->grf, sx, sy, w, h);
218 rh_scroll(struct ite_softc *ip, int sy, int sx, int count, int dir)
221 u_long *fb = (u_long *)__UNVOLATILE(ip->grf->g_fbkva);
224 rh_cursor(ip, ERASE_CURSOR);
228 screen_up(ip, sy - count, ip->bottom_margin, count);
230 memcpy(fb + (sy - count) * ip->cols, fb + sy * ip->cols,
231 4 * (ip->bottom_margin - sy + 1) * ip->cols);
232 rh_clear(ip, ip->bottom_margin + 1 - count, 0, count, ip->cols);
236 screen_down(ip, sy, ip->bottom_margin, count);
238 memcpy(fb + (sy + count) * ip->cols, fb + sy * ip->cols,
239 4 * (ip->bottom_margin - sy - count + 1) * ip->cols);
240 rh_clear(ip, sy, 0, count, ip->cols);
243 RZ3AlphaCopy(ip->grf, sx, sy, sx + count, sy,
244 ip->cols - (sx + count), 1);
245 RZ3AlphaErase(ip->grf, sx, sy, count, 1);
247 RZ3AlphaCopy(ip->grf, sx + count, sy, sx, sy,
248 ip->cols - (sx + count), 1);
249 RZ3AlphaErase(ip->grf, ip->cols - count, sy, count, 1);
252 rh_cursor(ip, !ERASE_CURSOR);