Lines Matching +full:enforce +full:- +full:video +full:- +full:mode

5  * SPDX-License-Identifier:	GPL-2.0+
13 * At the moment only the 8x16 font is tested and the font fore- and
21 * Character output goes to a memory-mapped video
22 * framebuffer with little or big-endian organisation.
30 * VIDEO_FB_LITTLE_ENDIAN - framebuffer organisation default: big endian
31 * VIDEO_HW_RECTFILL - graphic driver supports hardware rectangle fill
32 * VIDEO_HW_BITBLT - graphic driver supports hardware bit blt
36 * VIDEO_VISIBLE_COLS - x resolution
37 * VIDEO_VISIBLE_ROWS - y resolution
38 * VIDEO_PIXEL_SIZE - storage size in byte per pixel
39 * VIDEO_DATA_FORMAT - graphical data format GDF
40 * VIDEO_FB_ADRS - start of video memory
42 * VIDEO_KBD_INIT_FCT - init function for keyboard
43 * VIDEO_TSTC_FCT - keyboard_tstc function
44 * VIDEO_GETC_FCT - keyboard_getc function
46 * CONFIG_VIDEO_LOGO - display Linux Logo in upper left corner.
51 * CONFIG_VIDEO_BMP_LOGO - use bmp_logo instead of linux_logo
52 * CONFIG_CONSOLE_EXTRA_INFO - display additional board information
62 * CONFIG_VIDEO_SW_CURSOR: - Draws a cursor after the last
72 #include <video.h>
110 #define VIDEO_VISIBLE_COLS (pGD->winSizeX)
111 #define VIDEO_VISIBLE_ROWS (pGD->winSizeY)
112 #define VIDEO_PIXEL_SIZE (pGD->gdfBytesPP)
113 #define VIDEO_DATA_FORMAT (pGD->gdfIndex)
114 #define VIDEO_FB_ADRS (pGD->frameAdrs)
187 #define CONSOLE_ROWS ((VIDEO_ROWS - video_logo_height) / VIDEO_FONT_HEIGHT)
196 #define CONSOLE_ROW_LAST (video_console_address + CONSOLE_SIZE - CONSOLE_ROW_SIZE)
331 while (count--) { in video_drawchars()
335 rows--; dest += VIDEO_LINE_LEN) { in video_drawchars()
355 while (count--) { in video_drawchars()
359 rows--; dest += VIDEO_LINE_LEN) { in video_drawchars()
389 while (count--) { in video_drawchars()
393 rows--; dest += VIDEO_LINE_LEN) { in video_drawchars()
423 while (count--) { in video_drawchars()
427 rows--; dest += VIDEO_LINE_LEN) { in video_drawchars()
466 while (count--) { in video_drawchars()
470 rows--; dest += VIDEO_LINE_LEN) { in video_drawchars()
562 while (c--) in memsetl()
570 while (c--) in memcpyl()
582 VIDEO_FONT_WIDTH * (end - begin + 1), /* fr. width */ in console_clear_line()
601 size = VIDEO_FONT_WIDTH * VIDEO_PIXEL_SIZE * (end - begin + 1); in console_clear_line()
626 - video_logo_height in console_scrollup()
627 - VIDEO_FONT_HEIGHT * rows /* frame height */ in console_scrollup()
631 (CONSOLE_SIZE - CONSOLE_ROW_SIZE * rows) >> 2); in console_scrollup()
635 console_clear_line(CONSOLE_ROWS - i, 0, CONSOLE_COLS - 1); in console_scrollup()
638 console_row -= rows; in console_scrollup()
643 console_col--; in console_back()
646 console_col = CONSOLE_COLS - 1; in console_back()
647 console_row--; in console_back()
675 console_row = CONSOLE_ROWS - 1; in console_cursor_fix()
679 console_col = CONSOLE_COLS - 1; in console_cursor_fix()
684 console_row -= n; in console_cursor_up()
696 console_col -= n; in console_cursor_left()
708 if (console_row != -1) in console_cursor_set_position()
710 if (console_col != -1) in console_cursor_set_position()
718 console_row -= n; in console_previousline()
822 * 0 - ESC in cfb_video_putc()
823 * 1 - [ in cfb_video_putc()
824 * 2 - num1 in cfb_video_putc()
825 * 3 - .. in cfb_video_putc()
826 * 4 - ; in cfb_video_putc()
827 * 5 - num2 in cfb_video_putc()
828 * 6 - .. in cfb_video_putc()
829 * - cchar in cfb_video_putc()
866 num1 = ansi_buf[i]-'0'; in cfb_video_putc()
869 --i; in cfb_video_putc()
878 num1 += ansi_buf[i]-'0'; in cfb_video_putc()
880 --i; in cfb_video_putc()
887 --i; in cfb_video_putc()
895 num2 = ansi_buf[i]-'0'; in cfb_video_putc()
904 num2 += ansi_buf[i]-'0'; in cfb_video_putc()
906 --i; in cfb_video_putc()
964 console_cursor_set_position(-1, num1-1); in cfb_video_putc()
968 console_cursor_set_position(num1-1, num2-1); in cfb_video_putc()
980 CONSOLE_COLS-1); in cfb_video_putc()
986 0, CONSOLE_COLS-1); in cfb_video_putc()
1029 while (count--) in cfb_video_puts()
1039 * Do not enforce drivers (or board code) to provide empty
1103 *(--dst) = color; in fill_555rgb_pswap()
1114 /* Pre-calculated color table entry */
1146 /* differences handled while pre-calculating palette */ in draw_bitmap()
1177 y = __le32_to_cpu(img->header.height) - 1; in display_rle8_bitmap()
1178 ncolors = __le32_to_cpu(img->header.colors_used); in display_rle8_bitmap()
1184 bm = (uchar *) img + __le32_to_cpu(img->header.data_offset); in display_rle8_bitmap()
1186 /* pre-calculate and setup palette */ in display_rle8_bitmap()
1190 cte = img->color_table[i]; in display_rle8_bitmap()
1204 cte = img->color_table[i]; in display_rle8_bitmap()
1213 cte = img->color_table[i]; in display_rle8_bitmap()
1220 printf("RLE Bitmap unsupported in video mode 0x%x\n", in display_rle8_bitmap()
1222 return -1; in display_rle8_bitmap()
1233 y--; in display_rle8_bitmap()
1246 y -= bm[3]; in display_rle8_bitmap()
1268 cnt = width - x; in display_rle8_bitmap()
1293 cnt = width - x; in display_rle8_bitmap()
1304 return -1; in display_rle8_bitmap()
1330 if (!((bmp->header.signature[0] == 'B') && in video_display_bitmap()
1331 (bmp->header.signature[1] == 'M'))) { in video_display_bitmap()
1345 * See doc/README.displaying-bmps in video_display_bitmap()
1347 if (gunzip(dst+2, CONFIG_SYS_VIDEO_LOGO_MAX_SIZE-2, in video_display_bitmap()
1365 if (!((bmp->header.signature[0] == 'B') && in video_display_bitmap()
1366 (bmp->header.signature[1] == 'M'))) { in video_display_bitmap()
1378 width = le32_to_cpu(bmp->header.width); in video_display_bitmap()
1379 height = le32_to_cpu(bmp->header.height); in video_display_bitmap()
1380 bpp = le16_to_cpu(bmp->header.bit_count); in video_display_bitmap()
1381 colors = le32_to_cpu(bmp->header.colors_used); in video_display_bitmap()
1382 compression = le32_to_cpu(bmp->header.compression); in video_display_bitmap()
1384 debug("Display-bmp: %ld x %ld with %d colors\n", in video_display_bitmap()
1405 x = max(0, (int)(VIDEO_VISIBLE_COLS - width) / 2); in video_display_bitmap()
1407 x = max(0, (int)(VIDEO_VISIBLE_COLS - width + x + 1)); in video_display_bitmap()
1410 y = max(0, (int)(VIDEO_VISIBLE_ROWS - height) / 2); in video_display_bitmap()
1412 y = max(0, (int)(VIDEO_VISIBLE_ROWS - height + y + 1)); in video_display_bitmap()
1423 width = VIDEO_VISIBLE_COLS - x; in video_display_bitmap()
1425 height = VIDEO_VISIBLE_ROWS - y; in video_display_bitmap()
1427 bmap = (uchar *) bmp + le32_to_cpu(bmp->header.data_offset); in video_display_bitmap()
1429 ((y + height - 1) * VIDEO_LINE_LEN) + in video_display_bitmap()
1439 switch (le16_to_cpu(bmp->header.bit_count)) { in video_display_bitmap()
1441 padded_line -= width / 2; in video_display_bitmap()
1446 while (ycount--) { in video_display_bitmap()
1460 cte = bmp->color_table[idx]; in video_display_bitmap()
1465 fb -= VIDEO_LINE_LEN + width * in video_display_bitmap()
1471 "video mode\n"); in video_display_bitmap()
1477 padded_line -= width; in video_display_bitmap()
1481 cte = bmp->color_table[xcount]; in video_display_bitmap()
1489 while (ycount--) { in video_display_bitmap()
1492 while (xcount--) { in video_display_bitmap()
1496 fb -= VIDEO_LINE_LEN + width * in video_display_bitmap()
1501 while (ycount--) { in video_display_bitmap()
1504 while (xcount--) { in video_display_bitmap()
1505 cte = bmp->color_table[*bmap++]; in video_display_bitmap()
1510 fb -= VIDEO_LINE_LEN + width * in video_display_bitmap()
1515 while (ycount--) { in video_display_bitmap()
1521 while (xcount--) { in video_display_bitmap()
1522 cte = bmp->color_table[*bmap++]; in video_display_bitmap()
1534 fb -= VIDEO_LINE_LEN + width * in video_display_bitmap()
1539 while (ycount--) { in video_display_bitmap()
1542 while (xcount--) { in video_display_bitmap()
1543 cte = bmp->color_table[*bmap++]; in video_display_bitmap()
1548 fb -= VIDEO_LINE_LEN + width * in video_display_bitmap()
1553 while (ycount--) { in video_display_bitmap()
1556 while (xcount--) { in video_display_bitmap()
1557 cte = bmp->color_table[*bmap++]; in video_display_bitmap()
1562 fb -= VIDEO_LINE_LEN + width * in video_display_bitmap()
1567 while (ycount--) { in video_display_bitmap()
1570 while (xcount--) { in video_display_bitmap()
1571 cte = bmp->color_table[*bmap++]; in video_display_bitmap()
1576 fb -= VIDEO_LINE_LEN + width * in video_display_bitmap()
1583 padded_line -= 3 * width; in video_display_bitmap()
1587 while (ycount--) { in video_display_bitmap()
1590 while (xcount--) { in video_display_bitmap()
1596 fb -= VIDEO_LINE_LEN + width * in video_display_bitmap()
1601 while (ycount--) { in video_display_bitmap()
1607 while (xcount--) { in video_display_bitmap()
1619 fb -= VIDEO_LINE_LEN + width * in video_display_bitmap()
1624 while (ycount--) { in video_display_bitmap()
1627 while (xcount--) { in video_display_bitmap()
1633 fb -= VIDEO_LINE_LEN + width * in video_display_bitmap()
1638 while (ycount--) { in video_display_bitmap()
1641 while (xcount--) { in video_display_bitmap()
1647 fb -= VIDEO_LINE_LEN + width * in video_display_bitmap()
1652 while (ycount--) { in video_display_bitmap()
1655 while (xcount--) { in video_display_bitmap()
1661 fb -= VIDEO_LINE_LEN + width * in video_display_bitmap()
1667 "with current video mode\n"); in video_display_bitmap()
1672 printf("Error: %d bit/pixel bitmaps not supported by U-Boot\n", in video_display_bitmap()
1673 le16_to_cpu(bmp->header.bit_count)); in video_display_bitmap()
1726 int skip = VIDEO_LINE_LEN - VIDEO_LOGO_WIDTH * VIDEO_PIXEL_SIZE; in plot_logo_or_black()
1734 x = max(0, (int)(VIDEO_VISIBLE_COLS - VIDEO_LOGO_WIDTH) / 2); in plot_logo_or_black()
1736 x = max(0, (int)(VIDEO_VISIBLE_COLS - VIDEO_LOGO_WIDTH + x + 1)); in plot_logo_or_black()
1739 y = max(0, (int)(VIDEO_VISIBLE_ROWS - VIDEO_LOGO_HEIGHT) / 2); in plot_logo_or_black()
1741 y = max(0, (int)(VIDEO_VISIBLE_ROWS - VIDEO_LOGO_HEIGHT + y + 1)); in plot_logo_or_black()
1774 while (ycount--) { in plot_logo_or_black()
1779 while (xcount--) { in plot_logo_or_black()
1785 r = logo_red[*source - VIDEO_LOGO_LUT_OFFSET]; in plot_logo_or_black()
1786 g = logo_green[*source - VIDEO_LOGO_LUT_OFFSET]; in plot_logo_or_black()
1787 b = logo_blue[*source - VIDEO_LOGO_LUT_OFFSET]; in plot_logo_or_black()
1880 * output on video console if the logo is not at 0,0 in video_logo()
1889 video_logo_height += max(0, (int)(VIDEO_VISIBLE_ROWS - in video_logo()
1903 space = (VIDEO_LINE_LEN / 2 - VIDEO_INFO_X) / VIDEO_FONT_WIDTH; in video_logo()
1911 (uchar *) info + space, len - space); in video_logo()
1919 ((video_logo_height - in video_logo()
1941 len - space); in video_logo()
1960 bd_t *bd = gd->bd; in cfb_fb_is_in_dram()
1967 start = bd->bi_dram[i].start; in cfb_fb_is_in_dram()
1968 end = bd->bi_dram[i].start + bd->bi_dram[i].size - 1; in cfb_fb_is_in_dram()
1974 if ((ulong)video_fb_address >= bd->bi_memstart && in cfb_fb_is_in_dram()
1975 (ulong)video_fb_address < bd->bi_memstart + bd->bi_memsize) in cfb_fb_is_in_dram()
2005 return -1; in cfg_video_init()
2088 debug("Video: Drawing the logo ...\n"); in cfg_video_init()
2106 * need to skip the video initialization.
2120 /* Check if video initialization should be skipped */ in drv_video_init()
2124 /* Init video chip - returns with framebuffer cleared */ in drv_video_init()
2125 if (cfg_video_init() == -1) in drv_video_init()
2134 have_keyboard = !fdtdec_get_config_bool(gd->fdt_blob, in drv_video_init()
2135 "u-boot,no-keyboard"); in drv_video_init()
2142 keyboard_ok = !(VIDEO_KBD_INIT_FCT == -1); in drv_video_init()
2171 console_col = min(col, CONSOLE_COLS - 1); in video_position_cursor()
2172 console_row = min(row, CONSOLE_ROWS - 1); in video_position_cursor()