Lines Matching +full:3 +full:base +full:- +full:x
1 // SPDX-License-Identifier: GPL-2.0
120 dispDeviceRect[3] = height; in btext_setup_display()
134 * - build some kind of vgacon with it to enable early printk
135 * - move to a separate file
136 * - add a few video driver hooks to keep in sync with display
142 unsigned long base, offset, size; in btext_map() local
149 base = ((unsigned long) dispDeviceBase) & 0xFFFFF000UL; in btext_map()
150 offset = ((unsigned long) dispDeviceBase) - base; in btext_map()
151 size = dispDeviceRowBytes * dispDeviceRect[3] + offset in btext_map()
153 vbase = ioremap_wc(base, size); in btext_map()
166 prop = of_get_property(np, "linux,bootx-width", NULL); in btext_initialize()
170 return -EINVAL; in btext_initialize()
172 prop = of_get_property(np, "linux,bootx-height", NULL); in btext_initialize()
176 return -EINVAL; in btext_initialize()
178 prop = of_get_property(np, "linux,bootx-depth", NULL); in btext_initialize()
182 return -EINVAL; in btext_initialize()
185 prop = of_get_property(np, "linux,bootx-linebytes", NULL); in btext_initialize()
192 prop = of_get_property(np, "linux,bootx-addr", NULL); in btext_initialize()
202 return -EINVAL; in btext_initialize()
213 dispDeviceRect[3] = height; in btext_initialize()
223 int rc = -ENODEV; in btext_find_display()
248 /* Calc the base address of a given point (x,y) */
249 static unsigned char * calc_base(int x, int y) in calc_base() argument
251 unsigned char *base; in calc_base() local
253 base = logicalDisplayBase; in calc_base()
254 if (!base) in calc_base()
255 base = dispDeviceBase; in calc_base()
256 base += (x + dispDeviceRect[0]) * (dispDeviceDepth >> 3); in calc_base()
257 base += (y + dispDeviceRect[1]) * dispDeviceRowBytes; in calc_base()
258 return base; in calc_base()
276 dispDeviceRect[3] = height; in btext_update_display()
293 unsigned int *base = (unsigned int *)calc_base(0, 0); in btext_clearscreen() local
294 unsigned long width = ((dispDeviceRect[2] - dispDeviceRect[0]) * in btext_clearscreen()
295 (dispDeviceDepth >> 3)) >> 2; in btext_clearscreen()
299 for (i=0; i<(dispDeviceRect[3] - dispDeviceRect[1]); i++) in btext_clearscreen()
301 unsigned int *ptr = base; in btext_clearscreen()
302 for(j=width; j; --j) in btext_clearscreen()
304 base += (dispDeviceRowBytes >> 2); in btext_clearscreen()
311 unsigned int *base = (unsigned int *)calc_base(0, 0); in btext_flushscreen() local
312 unsigned long width = ((dispDeviceRect[2] - dispDeviceRect[0]) * in btext_flushscreen()
313 (dispDeviceDepth >> 3)) >> 2; in btext_flushscreen()
316 for (i=0; i < (dispDeviceRect[3] - dispDeviceRect[1]); i++) in btext_flushscreen()
318 unsigned int *ptr = base; in btext_flushscreen()
319 for(j = width; j > 0; j -= 8) { in btext_flushscreen()
323 base += (dispDeviceRowBytes >> 2); in btext_flushscreen()
330 unsigned int *base = (unsigned int *)calc_base(0, g_loc_Y << 4); in btext_flushline() local
331 unsigned long width = ((dispDeviceRect[2] - dispDeviceRect[0]) * in btext_flushline()
332 (dispDeviceDepth >> 3)) >> 2; in btext_flushline()
337 unsigned int *ptr = base; in btext_flushline()
338 for(j = width; j > 0; j -= 8) { in btext_flushline()
342 base += (dispDeviceRowBytes >> 2); in btext_flushline()
353 unsigned long width = ((dispDeviceRect[2] - dispDeviceRect[0]) * in scrollscreen()
354 (dispDeviceDepth >> 3)) >> 2; in scrollscreen()
359 for (i=0; i<(dispDeviceRect[3] - dispDeviceRect[1] - 16); i++) in scrollscreen()
363 for(j=width; j; --j) in scrollscreen()
371 for(j=width; j; --j) in scrollscreen()
407 static void draw_byte_32(const unsigned char *font, unsigned int *base, int rb) in draw_byte_32() argument
416 base[0] = (-(bits >> 7) & fg) ^ bg; in draw_byte_32()
417 base[1] = (-((bits >> 6) & 1) & fg) ^ bg; in draw_byte_32()
418 base[2] = (-((bits >> 5) & 1) & fg) ^ bg; in draw_byte_32()
419 base[3] = (-((bits >> 4) & 1) & fg) ^ bg; in draw_byte_32()
420 base[4] = (-((bits >> 3) & 1) & fg) ^ bg; in draw_byte_32()
421 base[5] = (-((bits >> 2) & 1) & fg) ^ bg; in draw_byte_32()
422 base[6] = (-((bits >> 1) & 1) & fg) ^ bg; in draw_byte_32()
423 base[7] = (-(bits & 1) & fg) ^ bg; in draw_byte_32()
424 base = (unsigned int *) ((char *)base + rb); in draw_byte_32()
428 static inline void draw_byte_16(const unsigned char *font, unsigned int *base, int rb) in draw_byte_16() argument
438 base[0] = (eb[bits >> 6] & fg) ^ bg; in draw_byte_16()
439 base[1] = (eb[(bits >> 4) & 3] & fg) ^ bg; in draw_byte_16()
440 base[2] = (eb[(bits >> 2) & 3] & fg) ^ bg; in draw_byte_16()
441 base[3] = (eb[bits & 3] & fg) ^ bg; in draw_byte_16()
442 base = (unsigned int *) ((char *)base + rb); in draw_byte_16()
446 static inline void draw_byte_8(const unsigned char *font, unsigned int *base, int rb) in draw_byte_8() argument
456 base[0] = (eb[bits >> 4] & fg) ^ bg; in draw_byte_8()
457 base[1] = (eb[bits & 0xf] & fg) ^ bg; in draw_byte_8()
458 base = (unsigned int *) ((char *)base + rb); in draw_byte_8()
464 unsigned char *base = calc_base(locX << 3, locY << 4); in draw_byte() local
473 draw_byte_32(font, (unsigned int *)base, rb); in draw_byte()
477 draw_byte_16(font, (unsigned int *)base, rb); in draw_byte()
480 draw_byte_8(font, (unsigned int *)base, rb); in draw_byte()
490 int x; in btext_drawchar() local
498 --g_loc_X; in btext_drawchar()
501 g_loc_X = (g_loc_X & -8) + 8; in btext_drawchar()
522 g_loc_Y--; in btext_drawchar()
526 waste time scrolling each line. -- paulus. */ in btext_drawchar()
530 for (x = 0; x < g_max_loc_X; ++x) in btext_drawchar()
531 draw_byte(' ', x, g_loc_Y); in btext_drawchar()
548 while (len--) in btext_drawtext()