Lines Matching refs:fb_info
154 fb_info.cursor.origin.x = xbi_fb->cursor.origin.x; in xbi_fb_init()
155 fb_info.cursor.origin.y = xbi_fb->cursor.origin.y; in xbi_fb_init()
156 fb_info.cursor.pos.x = xbi_fb->cursor.pos.x; in xbi_fb_init()
157 fb_info.cursor.pos.y = xbi_fb->cursor.pos.y; in xbi_fb_init()
158 fb_info.cursor.visible = xbi_fb->cursor.visible; in xbi_fb_init()
167 fb_info.paddr = tag->framebuffer_common.framebuffer_addr; in xbi_fb_init()
168 fb_info.pitch = tag->framebuffer_common.framebuffer_pitch; in xbi_fb_init()
169 fb_info.depth = tag->framebuffer_common.framebuffer_bpp; in xbi_fb_init()
170 fb_info.bpp = P2ROUNDUP(fb_info.depth, 8) >> 3; in xbi_fb_init()
171 fb_info.screen.x = tag->framebuffer_common.framebuffer_width; in xbi_fb_init()
172 fb_info.screen.y = tag->framebuffer_common.framebuffer_height; in xbi_fb_init()
173 fb_info.fb_size = fb_info.screen.y * fb_info.pitch; in xbi_fb_init()
181 if (fb_info.paddr == 0) in xbi_fb_init()
182 fb_info.fb_type = FB_TYPE_UNKNOWN; in xbi_fb_init()
186 fb_info.fb_type = FB_TYPE_EGA_TEXT; in xbi_fb_init()
190 if (fb_info.paddr != 0) in xbi_fb_init()
191 fb_info.fb_type = FB_TYPE_INDEXED; in xbi_fb_init()
195 if (fb_info.paddr != 0) in xbi_fb_init()
196 fb_info.fb_type = FB_TYPE_RGB; in xbi_fb_init()
203 fb_info.rgb.red.size = tag->u.fb2.framebuffer_red_mask_size; in xbi_fb_init()
204 fb_info.rgb.red.pos = tag->u.fb2.framebuffer_red_field_position; in xbi_fb_init()
205 fb_info.rgb.green.size = tag->u.fb2.framebuffer_green_mask_size; in xbi_fb_init()
206 fb_info.rgb.green.pos = tag->u.fb2.framebuffer_green_field_position; in xbi_fb_init()
207 fb_info.rgb.blue.size = tag->u.fb2.framebuffer_blue_mask_size; in xbi_fb_init()
208 fb_info.rgb.blue.pos = tag->u.fb2.framebuffer_blue_field_position; in xbi_fb_init()
209 rgb_info = fb_info.rgb; in xbi_fb_init()
225 bp = set_font((short *)&fb_info.terminal.y, in boot_fb_set_font()
226 (short *)&fb_info.terminal.x, h, w); in boot_fb_set_font()
236 fb_info.font_width = boot_fb_font.vf_width; in boot_fb_set_font()
237 fb_info.font_height = boot_fb_font.vf_height; in boot_fb_set_font()
248 switch (fb_info.depth) { in boot_fb_fill()
277 switch (fb_info.depth) { in boot_fb_cpy()
339 fb_info.shadow_fb = (uint8_t *)bops->bsys_alloc(NULL, NULL, in boot_fb_shadow_init()
340 fb_info.fb_size, MMU_PAGESIZE); in boot_fb_shadow_init()
342 if (fb_info.shadow_fb == NULL) in boot_fb_shadow_init()
346 boot_fb_cpy(fb_info.shadow_fb, fb_info.fb, fb_info.fb_size); in boot_fb_shadow_init()
356 if (fb_info.inverse == B_TRUE || in boot_get_color()
357 fb_info.inverse_screen == B_TRUE) { in boot_get_color()
358 if (fb_info.fg_color < XLATE_NCOLORS) { in boot_get_color()
362 if (fb_info.fg_color == pc_white) in boot_get_color()
363 *bg = brt_xlate[fb_info.fg_color]; in boot_get_color()
365 *bg = dim_xlate[fb_info.fg_color]; in boot_get_color()
367 *bg = fb_info.fg_color; in boot_get_color()
370 if (fb_info.bg_color < XLATE_NCOLORS) { in boot_get_color()
371 if (fb_info.bg_color == pc_white) in boot_get_color()
372 *fg = brt_xlate[fb_info.bg_color]; in boot_get_color()
374 *fg = dim_xlate[fb_info.bg_color]; in boot_get_color()
376 *fg = fb_info.bg_color; in boot_get_color()
379 if (fb_info.fg_color < XLATE_NCOLORS) { in boot_get_color()
380 if (fb_info.fg_color == pc_white) in boot_get_color()
381 *fg = brt_xlate[fb_info.fg_color]; in boot_get_color()
383 *fg = dim_xlate[fb_info.fg_color]; in boot_get_color()
385 *fg = fb_info.fg_color; in boot_get_color()
388 if (fb_info.bg_color < XLATE_NCOLORS) { in boot_get_color()
389 if (fb_info.bg_color == pc_white) in boot_get_color()
390 *bg = brt_xlate[fb_info.bg_color]; in boot_get_color()
392 *bg = dim_xlate[fb_info.bg_color]; in boot_get_color()
394 *bg = fb_info.bg_color; in boot_get_color()
405 if (fb_info.fb_type != FB_TYPE_RGB) { in boot_color_map()
412 return (rgb_color_map(&fb_info.rgb, index, 0)); in boot_color_map()
423 fb_info.fb = (uint8_t *)(uintptr_t)fb_info.paddr; in boot_fb_init()
425 boot_fb_set_font(fb_info.screen.y, fb_info.screen.x); in boot_fb_init()
426 window.x = (fb_info.screen.x - in boot_fb_init()
427 fb_info.terminal.x * boot_fb_font.vf_width) / 2; in boot_fb_init()
428 window.y = (fb_info.screen.y - in boot_fb_init()
429 fb_info.terminal.y * boot_fb_font.vf_height) / 2; in boot_fb_init()
430 fb_info.terminal_origin.x = window.x; in boot_fb_init()
431 fb_info.terminal_origin.y = window.y; in boot_fb_init()
439 if (fb_info.cursor.pos.x != 0 || fb_info.cursor.pos.y != 0) { in boot_fb_init()
440 fb_info.cursor.origin.x = window.x + in boot_fb_init()
441 fb_info.cursor.pos.x * boot_fb_font.vf_width; in boot_fb_init()
442 fb_info.cursor.origin.y = window.y + in boot_fb_init()
443 fb_info.cursor.pos.y * boot_fb_font.vf_height; in boot_fb_init()
448 if (fb_info.cursor.pos.x == 0 && fb_info.cursor.pos.y == 0) { in boot_fb_init()
449 fb_info.cursor.origin.x = window.x; in boot_fb_init()
450 fb_info.cursor.origin.y = window.y; in boot_fb_init()
457 if (fb_info.cursor.pos.x > fb_info.terminal.x || in boot_fb_init()
458 fb_info.cursor.pos.y > fb_info.terminal.y || in boot_fb_init()
459 fb_info.cursor.origin.x > fb_info.screen.x || in boot_fb_init()
460 fb_info.cursor.origin.y > fb_info.screen.y) { in boot_fb_init()
462 fb_info.cursor.origin.x = window.x; in boot_fb_init()
463 fb_info.cursor.origin.y = window.y; in boot_fb_init()
464 fb_info.cursor.pos.x = 0; in boot_fb_init()
465 fb_info.cursor.pos.y = 0; in boot_fb_init()
470 if (fb_info.cursor.pos.x == 0 && fb_info.cursor.pos.y == 0) { in boot_fb_init()
478 for (y = 0; y < fb_info.screen.y; y++) { in boot_fb_init()
479 uint8_t *dest = fb_info.fb + toffset; in boot_fb_init()
481 boot_fb_fill(dest, bg, fb_info.pitch); in boot_fb_init()
482 toffset += fb_info.pitch; in boot_fb_init()
497 if (rect->col >= fb_info.screen.x || in boot_fb_blit()
498 rect->row >= fb_info.screen.y || in boot_fb_blit()
499 rect->col + rect->width >= fb_info.screen.x || in boot_fb_blit()
500 rect->row + rect->height >= fb_info.screen.y) in boot_fb_blit()
503 size = rect->width * fb_info.bpp; in boot_fb_blit()
504 offset = rect->col * fb_info.bpp + rect->row * fb_info.pitch; in boot_fb_blit()
505 fbp = fb_info.fb + offset; in boot_fb_blit()
506 if (fb_info.shadow_fb != NULL) in boot_fb_blit()
507 sfbp = fb_info.shadow_fb + offset; in boot_fb_blit()
511 uint8_t *dest = fbp + i * fb_info.pitch; in boot_fb_blit()
515 dest = sfbp + i * fb_info.pitch; in boot_fb_blit()
530 switch (fb_info.depth) { in bit_to_pix()
559 size = fb_info.terminal.x * boot_fb_font.vf_width * fb_info.bpp; in boot_fb_eraseline_impl()
561 toffset = x * fb_info.bpp + y * fb_info.pitch; in boot_fb_eraseline_impl()
562 dst = fb_info.fb + toffset; in boot_fb_eraseline_impl()
563 sdst = fb_info.shadow_fb + toffset; in boot_fb_eraseline_impl()
566 uint8_t *dest = dst + i * fb_info.pitch; in boot_fb_eraseline_impl()
567 if (fb_info.fb + fb_info.fb_size >= dest + size) in boot_fb_eraseline_impl()
569 if (fb_info.shadow_fb != NULL) { in boot_fb_eraseline_impl()
570 dest = sdst + i * fb_info.pitch; in boot_fb_eraseline_impl()
571 if (fb_info.shadow_fb + fb_info.fb_size >= in boot_fb_eraseline_impl()
582 boot_fb_eraseline_impl(fb_info.cursor.origin.x, in boot_fb_eraseline()
583 fb_info.cursor.origin.y); in boot_fb_eraseline()
598 soffset = c_copy->s_col * fb_info.bpp + c_copy->s_row * fb_info.pitch; in boot_fb_conscopy()
599 toffset = c_copy->t_col * fb_info.bpp + c_copy->t_row * fb_info.pitch; in boot_fb_conscopy()
601 src = fb_info.fb + soffset; in boot_fb_conscopy()
602 dst = fb_info.fb + toffset; in boot_fb_conscopy()
604 if (fb_info.shadow_fb != NULL) { in boot_fb_conscopy()
605 src = fb_info.shadow_fb + soffset; in boot_fb_conscopy()
606 sdst = fb_info.shadow_fb + toffset; in boot_fb_conscopy()
609 width = (c_copy->e_col - c_copy->s_col + 1) * fb_info.bpp; in boot_fb_conscopy()
613 increment = i * fb_info.pitch; in boot_fb_conscopy()
616 if (soffset + increment + width >= fb_info.fb_size || in boot_fb_conscopy()
617 toffset + increment + width >= fb_info.fb_size) in boot_fb_conscopy()
633 c_copy.s_col = fb_info.cursor.origin.x; in boot_fb_shiftline()
634 c_copy.s_row = fb_info.cursor.origin.y; in boot_fb_shiftline()
636 c_copy.e_col = (fb_info.terminal.x - chars) * boot_fb_font.vf_width; in boot_fb_shiftline()
637 c_copy.e_col += fb_info.terminal_origin.x; in boot_fb_shiftline()
640 c_copy.t_col = fb_info.cursor.origin.x + chars * boot_fb_font.vf_width; in boot_fb_shiftline()
641 c_copy.t_row = fb_info.cursor.origin.y; in boot_fb_shiftline()
655 c_copy.s_row = fb_info.terminal_origin.y + boot_fb_font.vf_height; in boot_fb_scroll()
656 c_copy.s_col = fb_info.terminal_origin.x; in boot_fb_scroll()
657 c_copy.e_row = fb_info.screen.y - fb_info.terminal_origin.y; in boot_fb_scroll()
658 c_copy.e_col = fb_info.screen.x - fb_info.terminal_origin.x; in boot_fb_scroll()
659 c_copy.t_row = fb_info.terminal_origin.y; in boot_fb_scroll()
660 c_copy.t_col = fb_info.terminal_origin.x; in boot_fb_scroll()
665 boot_fb_eraseline_impl(fb_info.terminal_origin.x, in boot_fb_scroll()
666 fb_info.terminal_origin.y + in boot_fb_scroll()
667 (fb_info.terminal.y - 1) * boot_fb_font.vf_height); in boot_fb_scroll()
684 if (fb_info.cursor.visible == visible) in boot_fb_cursor()
691 fb_info.cursor.visible = visible; in boot_fb_cursor()
692 pitch = fb_info.pitch; in boot_fb_cursor()
693 size = boot_fb_font.vf_width * fb_info.bpp; in boot_fb_cursor()
699 offset = fb_info.cursor.origin.x * fb_info.bpp + in boot_fb_cursor()
700 fb_info.cursor.origin.y * pitch; in boot_fb_cursor()
701 switch (fb_info.depth) { in boot_fb_cursor()
704 fb8 = fb_info.fb + offset + i * pitch; in boot_fb_cursor()
705 if (fb_info.shadow_fb != NULL) in boot_fb_cursor()
706 sfb8 = fb_info.shadow_fb + offset + i * pitch; in boot_fb_cursor()
720 fb16 = (uint16_t *)(fb_info.fb + offset + i * pitch); in boot_fb_cursor()
721 if (fb_info.shadow_fb != NULL) in boot_fb_cursor()
723 (fb_info.shadow_fb + offset + i * pitch); in boot_fb_cursor()
738 fb8 = fb_info.fb + offset + i * pitch; in boot_fb_cursor()
739 if (fb_info.shadow_fb != NULL) in boot_fb_cursor()
740 sfb8 = fb_info.shadow_fb + offset + i * pitch; in boot_fb_cursor()
763 fb32 = (uint32_t *)(fb_info.fb + offset + i * pitch); in boot_fb_cursor()
764 if (fb_info.shadow_fb != NULL) { in boot_fb_cursor()
766 (fb_info.shadow_fb + offset + i * pitch); in boot_fb_cursor()
786 if (row >= fb_info.terminal.y) in boot_fb_setpos()
787 row = fb_info.terminal.y - 1; in boot_fb_setpos()
790 if (col >= fb_info.terminal.x) in boot_fb_setpos()
791 col = fb_info.terminal.x - 1; in boot_fb_setpos()
793 fb_info.cursor.pos.x = col; in boot_fb_setpos()
794 fb_info.cursor.pos.y = row; in boot_fb_setpos()
795 fb_info.cursor.origin.x = fb_info.terminal_origin.x; in boot_fb_setpos()
796 fb_info.cursor.origin.x += col * boot_fb_font.vf_width; in boot_fb_setpos()
797 fb_info.cursor.origin.y = fb_info.terminal_origin.y; in boot_fb_setpos()
798 fb_info.cursor.origin.y += row * boot_fb_font.vf_height; in boot_fb_setpos()
807 rows = fb_info.cursor.pos.y; in boot_fb_putchar()
808 cols = fb_info.cursor.pos.x; in boot_fb_putchar()
811 if (rows < fb_info.terminal.y - 1) in boot_fb_putchar()
819 display.col = fb_info.cursor.origin.x; in boot_fb_putchar()
820 display.row = fb_info.cursor.origin.y; in boot_fb_putchar()
826 if (cols < fb_info.terminal.x - 1) in boot_fb_putchar()
828 else if (rows < fb_info.terminal.y - 1) in boot_fb_putchar()