Lines Matching refs:ip
53 ite_fontinfo(struct ite_data *ip)
55 uint32_t fontaddr = getword(ip, getword(ip, FONTROM) + FONTADDR);
57 ip->ftheight = getbyte(ip, fontaddr + FONTHEIGHT);
58 ip->ftwidth = getbyte(ip, fontaddr + FONTWIDTH);
59 ip->rows = ip->dheight / ip->ftheight;
60 ip->cols = ip->dwidth / ip->ftwidth;
62 if (ip->fbwidth > ip->dwidth) {
66 ip->fontx = ip->dwidth;
67 ip->fonty = 0;
68 ip->cpl = (ip->fbwidth - ip->dwidth) / ip->ftwidth;
69 ip->cblankx = ip->dwidth;
70 ip->cblanky = ip->fonty + ((128 / ip->cpl) +1) * ip->ftheight;
75 ip->fontx = 0;
76 ip->fonty = ip->dheight;
77 ip->cpl = ip->fbwidth / ip->ftwidth;
78 ip->cblankx = 0;
79 ip->cblanky = ip->fonty + ((128 / ip->cpl) + 1) * ip->ftheight;
84 ite_fontinit1bpp(struct ite_data *ip)
90 dp = (uint8_t *)(getword(ip, getword(ip, FONTROM) + FONTADDR) +
91 (uint8_t *)ip->regbase) + FONTDATA;
92 stride = ip->fbwidth >> 3;
93 width = (ip->ftwidth + 7) / 8;
97 (ip->fonty + (c / ip->cpl) * ip->ftheight) * stride;
98 fbmem += (ip->fontx >> 3) + (c % ip->cpl) * width;
99 for (l = 0; l < ip->ftheight; l++) {
111 ite_fontinit8bpp(struct ite_data *ip)
113 int bytewidth = (((ip->ftwidth - 1) / 8) + 1);
114 int glyphsize = bytewidth * ip->ftheight;
119 romp = getword(ip, getword(ip, FONTROM) + FONTADDR) + FONTDATA;
122 (ip->fonty + (c / ip->cpl) * ip->ftheight) * ip->fbwidth +
123 (ip->fontx + (c % ip->cpl) * ip->ftwidth));
126 *dp++ = getbyte(ip, romp);
129 ite_writeglyph(ip, fbmem, fontbuf);
134 ite_writeglyph(struct ite_data *ip, uint8_t *fbmem, uint8_t *glyphp)
139 for (l = 0; l < ip->ftheight; l++) {
141 for (b = 0; b < ip->ftwidth; b++) {
153 fbmem -= ip->ftwidth;
154 fbmem += ip->fbwidth;
161 #define flip_cursor(ip) \
162 (*ip->bmv)(ip, ip->cblanky, ip->cblankx, ip->cursory * ip->ftheight, \
163 ip->cursorx * ip->ftwidth, ip->ftheight, ip->ftwidth, RR_XOR)
166 ite_dio_cursor(struct ite_data *ip, int flag)
171 flip_cursor(ip);
174 ip->cursorx = ip->curx;
175 ip->cursory = ip->cury;
179 flip_cursor(ip);
185 ite_dio_putc1bpp(struct ite_data *ip, int c, int dy, int dx)
188 ite_dio_windowmove1bpp(ip, charY(ip, c), charX1bpp(ip, c),
189 dy * ip->ftheight, dx * ip->ftwidth,
190 ip->ftheight, ip->ftwidth, RR_COPY);
194 ite_dio_putc8bpp(struct ite_data *ip, int c, int dy, int dx)
197 (*ip->bmv)(ip, charY(ip, c), charX(ip, c),
198 dy * ip->ftheight, dx * ip->ftwidth,
199 ip->ftheight, ip->ftwidth, RR_COPY);
203 ite_dio_clear(struct ite_data *ip, int sy, int sx, int h, int w)
206 (*ip->bmv)(ip, sy * ip->ftheight, sx * ip->ftwidth,
207 sy * ip->ftheight, sx * ip->ftwidth,
208 h * ip->ftheight, w * ip->ftwidth, RR_CLEAR);
212 ite_dio_scroll(struct ite_data *ip)
215 (*ip->bmv)(ip, ip->ftheight, 0, 0, 0, (ip->rows - 1) * ip->ftheight,
216 ip->cols * ip->ftwidth, RR_COPY);
298 ite_dio_windowmove1bpp(struct ite_data *ip, int sy, int sx, int dy, int dx,
324 width = ip->fbwidth >> 5;
325 psrcLine = ((uint32_t *)ip->fbbase) + (sy * width);
326 pdstLine = ((uint32_t *)ip->fbbase) + (dy * width);