summaryrefslogtreecommitdiff
path: root/drivers/video/vidconsole-uclass.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-01-06 15:57:33 +0300
committerTom Rini <trini@konsulko.com>2021-01-06 15:57:33 +0300
commitbc0b99bd8b19599f670f42401de655fa9b44cd94 (patch)
tree8f5294dc16657c32b1a401c13a1f2a0579ac62e2 /drivers/video/vidconsole-uclass.c
parentb11f634b1c1be6ab419758c6596c673445e5ac70 (diff)
parent0109db1cd1e63b35c1c84d6bc2ccaa26aa6b7ce3 (diff)
downloadu-boot-bc0b99bd8b19599f670f42401de655fa9b44cd94.tar.xz
Merge tag 'xilinx-for-v2021.04' of https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze into next
Xilinx changes for v2021.04 arm64: - DT updates microblaze: - Add support for NOR device support spi: - Fix unaligned data write issue nand: - Minor code change xilinx: - Fru fix in limit calculation - Fill git repo link for all Xilinx boards video: - Add support for seps525 spi display tools: - Minor Vitis file support cmd/common - Minor code indentation fixes serial: - Uartlite debug uart initialization fix
Diffstat (limited to 'drivers/video/vidconsole-uclass.c')
-rw-r--r--drivers/video/vidconsole-uclass.c40
1 files changed, 29 insertions, 11 deletions
diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c
index ceb4744354..81b65f5aae 100644
--- a/drivers/video/vidconsole-uclass.c
+++ b/drivers/video/vidconsole-uclass.c
@@ -89,9 +89,7 @@ static int vidconsole_back(struct udevice *dev)
if (priv->ycur < 0)
priv->ycur = 0;
}
- video_sync(dev->parent, false);
-
- return 0;
+ return video_sync(dev->parent, false);
}
/* Move to a newline, scrolling the display if necessary */
@@ -101,7 +99,7 @@ static void vidconsole_newline(struct udevice *dev)
struct udevice *vid_dev = dev->parent;
struct video_priv *vid_priv = dev_get_uclass_priv(vid_dev);
const int rows = CONFIG_CONSOLE_SCROLL_LINES;
- int i;
+ int i, ret;
priv->xcur_frac = priv->xstart_frac;
priv->ycur += priv->y_charsize;
@@ -116,7 +114,12 @@ static void vidconsole_newline(struct udevice *dev)
}
priv->last_ch = 0;
- video_sync(dev->parent, false);
+ ret = video_sync(dev->parent, false);
+ if (ret) {
+#ifdef DEBUG
+ console_puts_select_stderr(true, "[vc err: video_sync]");
+#endif
+ }
}
static const struct vid_rgb colors[VID_COLOR_COUNT] = {
@@ -348,8 +351,15 @@ static void vidconsole_escape_char(struct udevice *dev, char ch)
parsenum(priv->escape_buf + 1, &mode);
if (mode == 2) {
+ int ret;
+
video_clear(dev->parent);
- video_sync(dev->parent, false);
+ ret = video_sync(dev->parent, false);
+ if (ret) {
+#ifdef DEBUG
+ console_puts_select_stderr(true, "[vc err: video_sync]");
+#endif
+ }
priv->ycur = 0;
priv->xcur_frac = priv->xstart_frac;
} else {
@@ -565,7 +575,12 @@ static void vidconsole_putc(struct stdio_dev *sdev, const char ch)
console_puts_select_stderr(true, "[vc err: putc]");
#endif
}
- video_sync(dev->parent, false);
+ ret = video_sync(dev->parent, false);
+ if (ret) {
+#ifdef DEBUG
+ console_puts_select_stderr(true, "[vc err: video_sync]");
+#endif
+ }
}
static void vidconsole_puts(struct stdio_dev *sdev, const char *s)
@@ -582,7 +597,12 @@ static void vidconsole_puts(struct stdio_dev *sdev, const char *s)
console_puts_select_stderr(true, str);
#endif
}
- video_sync(dev->parent, false);
+ ret = video_sync(dev->parent, false);
+ if (ret) {
+#ifdef DEBUG
+ console_puts_select_stderr(true, "[vc err: video_sync]");
+#endif
+ }
}
/* Set up the number of rows and colours (rotated drivers override this) */
@@ -691,9 +711,7 @@ static int do_video_puts(struct cmd_tbl *cmdtp, int flag, int argc,
for (s = argv[1]; *s; s++)
vidconsole_put_char(dev, *s);
- video_sync(dev->parent, false);
-
- return 0;
+ return video_sync(dev->parent, false);
}
U_BOOT_CMD(