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