summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-01-14 18:10:39 -0700
committerAnatolij Gustschin <agust@denx.de>2016-01-30 10:55:15 +0100
commitc5b77d01d1eb0943a8241665313577b8b51203ae (patch)
treeed476cd65c8f0d95ea66de47406c3426e5ec4b72 /drivers
parent5508f10ac9c5cb49f41284b383ba18637f5c7f77 (diff)
downloadu-boot-imx-c5b77d01d1eb0943a8241665313577b8b51203ae.zip
u-boot-imx-c5b77d01d1eb0943a8241665313577b8b51203ae.tar.gz
u-boot-imx-c5b77d01d1eb0943a8241665313577b8b51203ae.tar.bz2
video: Provide a left margin for the text console
Allow the left margin to be set so that text does not have to be right up against the left side. On some panels this makes it hard to read. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/vidconsole-uclass.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c
index 4c0efd5..884db01 100644
--- a/drivers/video/vidconsole-uclass.c
+++ b/drivers/video/vidconsole-uclass.c
@@ -53,7 +53,7 @@ static void vidconsole_back(struct udevice *dev)
struct vidconsole_priv *priv = dev_get_uclass_priv(dev);
priv->xcur_frac -= VID_TO_POS(priv->x_charsize);
- if (priv->xcur_frac < 0) {
+ if (priv->xcur_frac < priv->xstart_frac) {
priv->xcur_frac = (priv->cols - 1) *
VID_TO_POS(priv->x_charsize);
priv->ycur -= priv->y_charsize;
@@ -71,7 +71,7 @@ static void vidconsole_newline(struct udevice *dev)
const int rows = CONFIG_CONSOLE_SCROLL_LINES;
int i;
- priv->xcur_frac = 0;
+ priv->xcur_frac = priv->xstart_frac;
priv->ycur += priv->y_charsize;
/* Check if we need to scroll the terminal */
@@ -95,7 +95,7 @@ int vidconsole_put_char(struct udevice *dev, char ch)
/* beep */
break;
case '\r':
- priv->xcur_frac = 0;
+ priv->xcur_frac = priv->xstart_frac;
break;
case '\n':
vidconsole_newline(dev);