Skip to content

video/console: Fix various DM_VIDEO console issues

Andre Przywara u-boot 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8video/console: Fix DM_VIDEO font glyph array indexingdrivers/video/console_normal.c drivers/video/console_rotate.c+6 -42 replies
2/8video/console: Implement reverse video ANSI sequence for DM_VIDEOdrivers/video/vidconsole-uclass.c drivers/video/video-uclass.c include/video.h+13 -14 replies
3/8video/console: Implement relative cursor movement ANSI handlingdrivers/video/vidconsole-uclass.c+37 -03 replies
3/8video/console: Implement relative cursor movement ANSI handlingdrivers/video/vidconsole-uclass.c+0 -01 reply
3/8video/console: Implement relative cursor movement ANSI handling+0 -00 replies
4/8video/console: Implement ANSI clear line commanddrivers/video/vidconsole-uclass.c+19 -02 replies
5/8video/console: Factor out actual character outputdrivers/video/vidconsole-uclass.c+27 -152 replies
6/8video/console: Convert UTF-8 codes to CP437 code pointsdrivers/video/Makefile drivers/video/utf8_cp437.c drivers/video/vidconsole-uclass.c +1 more+186 -22 replies
6/8video/console: Convert UTF-8 codes to CP437 code points+0 -00 replies
7/8usb: kbd: Properly translate up/down arrow keyscommon/usb_kbd.c+23 -12 replies
7/8usb: kbd: Properly translate up/down arrow keys+0 -01 reply
8/8sunxi: allow boards to de-select SYS_WHITE_ON_BLACK font schemedrivers/video/Kconfig include/configs/sunxi-common.h+1 -22 replies

Reviews trailers per patch

10 of 12 patches have a Reviewed-by or Acked-by.

PatchSimon Glass
1/8R-b
2/8R-b R-b
3/8R-b
3/8R-b
3/8R-b
4/8R-b
5/8R-b
6/8
6/8
7/8R-b
7/8R-b
8/8R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [U-Boot] [PATCH 0/8] video/console: Fix various DM_VIDEO console issues

The graphical console (vidconsole-uclass.c) for DM_VIDEO based display drivers has several issues:
- Many ANSI sequences are not handled properly.
- The character set used is assumed to be the original IBM PC code page 437, even though the UEFI code expect the terminal to display UTF-8 encoded characters. Truetype fonts expect ISO8859-1.
- The USB keyboard does not handle arrow keys correctly.
- There is no visible cursor displayed.
- Truetype fonts only work in 16-bit screen modes.
- The maximum font width supported is 8 pixels.
- The "bmp" command to display bitmaps only works in certain video modes.

This leads to a very poor user experience, up to a point where applications become unusable (Grub/EFI and U-Boot's bootmenu come to mind).

This patch set aims to fix the most important of those issues (the first three). I have further patches to address the rest, but they are not so nice or have issues, so I will send them later.

Patch 1/8 is a bug fix (for ASCII characters > 127). Patch 2-4 extend the ANSI sequence handling. Patch 5 and 6 fix the character encoding for the bitmap fonts. The USB keyboard learns about proper arrow key handling in patch 7, while patch 8 fixes a minor Kconfig omission for sunxi.

After this series I can use both the bootmenu and Grub/EFI properly. Tested on Sandbox and an Pine64-LTS board.

Cheers,
Andre.

Andre Przywara (8):
video/console: Fix DM_VIDEO font glyph array indexing video/console: Implement reverse video ANSI sequence for DM_VIDEO video/console: Implement relative cursor movement ANSI handling video/console: Implement ANSI clear line command video/console: Factor out actual character output video/console: Convert UTF-8 codes to CP437 code points
usb: kbd: Properly translate up/down arrow keys
sunxi: allow boards to de-select SYS_WHITE_ON_BLACK font scheme

 common/usb_kbd.c                  |  24 +++++-
 drivers/video/Kconfig             |   2 +-
 drivers/video/Makefile            |   1 +
 drivers/video/console_normal.c    |   3 +-
 drivers/video/console_rotate.c    |   7 +-
 drivers/video/utf8_cp437.c        | 170 ++++++++++++++++++++++++++++++++++++++
 drivers/video/vidconsole-uclass.c | 113 +++++++++++++++++++++----
 drivers/video/video-uclass.c      |   1 +
 include/configs/sunxi-common.h    |   1 -
 include/video.h                   |   2 +
 include/video_console.h           |   9 ++
 11 files changed, 310 insertions(+), 23 deletions(-)
 create mode 100644 drivers/video/utf8_cp437.c
Signature · 1 line
2.14.5