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