diff options
author | Simon Glass <sjg@chromium.org> | 2018-10-01 12:22:47 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2018-10-09 04:40:27 -0600 |
commit | 9949ee876dc585d198a0fd4790a21e9a2332201f (patch) | |
tree | dad48129deb7f11564de4b31a714ebb909d0323e /drivers/video/vidconsole-uclass.c | |
parent | 751fed426f87204517df14de76762461cd2a4203 (diff) | |
download | u-boot-9949ee876dc585d198a0fd4790a21e9a2332201f.zip u-boot-9949ee876dc585d198a0fd4790a21e9a2332201f.tar.gz u-boot-9949ee876dc585d198a0fd4790a21e9a2332201f.tar.bz2 |
video: at91: Adjust vidconsole_position_cursor() to use char pos
At present this function uses pixels but it seems more useful for it to
position in terms of characters on the screen. This also matches the
comment to the function. Update this.
Unfortunately there is one user of this function (at91). Have a crack at
fixing this, since I cannot test it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
Diffstat (limited to 'drivers/video/vidconsole-uclass.c')
-rw-r--r-- | drivers/video/vidconsole-uclass.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c index 89ac8b3..1874887 100644 --- a/drivers/video/vidconsole-uclass.c +++ b/drivers/video/vidconsole-uclass.c @@ -511,6 +511,8 @@ void vidconsole_position_cursor(struct udevice *dev, unsigned col, unsigned row) struct udevice *vid_dev = dev->parent; struct video_priv *vid_priv = dev_get_uclass_priv(vid_dev); + col *= priv->x_charsize; + row *= priv->y_charsize; priv->xcur_frac = VID_TO_POS(min_t(short, col, vid_priv->xsize - 1)); priv->ycur = min_t(short, row, vid_priv->ysize - 1); } |