summaryrefslogtreecommitdiffstats
path: root/drivers/video/video-uclass.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-01-14 18:10:42 -0700
committerAnatolij Gustschin <agust@denx.de>2016-01-30 10:55:47 +0100
commita29b012037cc454ec811dbcd29a3aeffe59d86bc (patch)
treeae4ef91422d8b36e00b0ac087c3446d5cf7f995d /drivers/video/video-uclass.c
parent7b9f7e445e13de4f3169d9e5ba5e3b28c4d79ce4 (diff)
downloadtalos-obmc-uboot-a29b012037cc454ec811dbcd29a3aeffe59d86bc.tar.gz
talos-obmc-uboot-a29b012037cc454ec811dbcd29a3aeffe59d86bc.zip
video: Add a console driver that uses TrueType fonts
The existing 8x16 font is adequate for most purposes. It is small and fast. However for boot screens where information must be presented to the user, the console font is not ideal. Common requirements are larger and better-looking fonts. This console driver can use TrueType fonts built into U-Boot, and render them at any size. This can be used in scripts to place text as needed on the display. This driver is not really designed to operate with the command line. Much of U-Boot expects a fixed-width font. But to keep things working correctly, rudimentary support for the console is provided. The main missing feature is support for command-line editing. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Anatolij Gustschin <agust@denx.de>
Diffstat (limited to 'drivers/video/video-uclass.c')
-rw-r--r--drivers/video/video-uclass.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
index 24d537e6c4..2189fce369 100644
--- a/drivers/video/video-uclass.c
+++ b/drivers/video/video-uclass.c
@@ -201,11 +201,18 @@ static int video_post_probe(struct udevice *dev)
* it might be useful to support only bitmap drawing on the device
* for boards that don't need to display text.
*/
- snprintf(name, sizeof(name), "%s.vidconsole", dev->name);
+ if (IS_ENABLED(CONFIG_CONSOLE_TRUETYPE)) {
+ snprintf(name, sizeof(name), "%s.vidconsole_tt", dev->name);
+ strcpy(drv, "vidconsole_tt");
+ } else {
+ snprintf(name, sizeof(name), "%s.vidconsole%d", dev->name,
+ priv->rot);
+ snprintf(drv, sizeof(drv), "vidconsole%d", priv->rot);
+ }
+
str = strdup(name);
if (!str)
return -ENOMEM;
- snprintf(drv, sizeof(drv), "vidconsole%d", priv->rot);
ret = device_bind_driver(dev, drv, str, &cons);
if (ret) {
debug("%s: Cannot bind console driver\n", __func__);
OpenPOWER on IntegriCloud