Lines Matching refs:ip
65 void cl_init(struct ite_softc *ip);
66 void cl_cursor(struct ite_softc *ip, int flag);
67 void cl_deinit(struct ite_softc *ip);
68 void cl_putc(struct ite_softc *ip, int c, int dy, int dx, int mode);
69 void cl_clear(struct ite_softc *ip, int sy, int sx, int h, int w);
70 void cl_scroll(struct ite_softc *ip, int sy, int sx, int count, int dir);
105 cl_init(struct ite_softc *ip) in cl_init() argument
109 ip->priv = ip->grf->g_data; in cl_init()
110 md = (struct grfcltext_mode *) ip->priv; in cl_init()
112 ip->cols = md->cols; in cl_init()
113 ip->rows = md->rows; in cl_init()
118 cl_cursor(struct ite_softc *ip, int flag) in cl_cursor() argument
120 volatile u_char *ba = ip->grf->g_regkva; in cl_cursor()
126 flag = ip->curx + ip->cury * ip->cols; in cl_cursor()
129 ip->cursorx = ip->curx; in cl_cursor()
130 ip->cursory = ip->cury; in cl_cursor()
143 cl_deinit(struct ite_softc *ip) in cl_deinit() argument
145 ip->flags &= ~ITE_INITED; in cl_deinit()
150 cl_putc(struct ite_softc *ip, int c, int dy, int dx, int mode) in cl_putc() argument
152 volatile unsigned char *ba = ip->grf->g_regkva; in cl_putc()
153 volatile unsigned char *fb = ip->grf->g_fbkva; in cl_putc()
157 if (ip->flags & ITE_INGRF) in cl_putc()
165 cp = fb + ((dy * ip->cols) + dx); in cl_putc()
173 cl_clear(struct ite_softc *ip, int sy, int sx, int h, int w) in cl_clear() argument
180 volatile unsigned char *ba = ip->grf->g_regkva; in cl_clear()
183 if (ip->flags & ITE_INGRF) in cl_clear()
186 dst = (unsigned char*)__UNVOLATILE(ip->grf->g_fbkva) + in cl_clear()
187 (sy * ip->cols) + sx; in cl_clear()
188 src = dst + (ip->rows*ip->cols); in cl_clear()
198 cl_scroll(struct ite_softc *ip, int sy, int sx, int count, int dir) in cl_scroll() argument
201 volatile unsigned char *ba = ip->grf->g_regkva; in cl_scroll()
203 if (ip->flags & ITE_INGRF) in cl_scroll()
206 fb = (unsigned char*)__UNVOLATILE(ip->grf->g_fbkva) + sy * ip->cols; in cl_scroll()
211 memcpy(fb - (count * ip->cols), fb, in cl_scroll()
212 (ip->bottom_margin + 1 - sy) * ip->cols); in cl_scroll()
215 memcpy(fb + (count * ip->cols), fb, in cl_scroll()
216 (ip->bottom_margin + 1 - (sy + count)) * ip->cols); in cl_scroll()
219 memcpy(fb+sx+count, fb+sx, ip->cols - (sx + count)); in cl_scroll()
222 memcpy(fb+sx-count, fb+sx, ip->cols - sx); in cl_scroll()
230 memcpy(fb - (count * ip->cols), fb, in cl_scroll()
231 (ip->bottom_margin + 1 - sy) * ip->cols); in cl_scroll()
234 memcpy(fb + (count * ip->cols), fb, in cl_scroll()
235 (ip->bottom_margin + 1 - (sy + count)) * ip->cols); in cl_scroll()
238 memcpy(fb+sx+count, fb+sx, ip->cols - (sx + count)); in cl_scroll()
241 memcpy(fb+sx-count, fb+sx, ip->cols - sx); in cl_scroll()