From patchwork Wed Jun 10 09:52:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ye Li X-Patchwork-Id: 242038 List-Id: U-Boot discussion From: ye.li at nxp.com (Ye Li) Date: Wed, 10 Jun 2020 02:52:21 -0700 Subject: [PATCH] video: vidconsole: avoid multiple lines overwrite logo Message-ID: <1591782743-22846-1-git-send-email-ye.li@nxp.com> Fix the bug that multiple lines wraps to overwrite logo bmp display. Signed-off-by: Ye Li Reviewed-by: Jagan Teki Tested-by: Jagan Teki # bpi-m1+, bpi-m64 --- drivers/video/vidconsole-uclass.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c index d30e6db..9b76154 100644 --- a/drivers/video/vidconsole-uclass.c +++ b/drivers/video/vidconsole-uclass.c @@ -622,6 +622,7 @@ void vidconsole_position_cursor(struct udevice *dev, unsigned col, unsigned row) col *= priv->x_charsize; row *= priv->y_charsize; priv->xcur_frac = VID_TO_POS(min_t(short, col, vid_priv->xsize - 1)); + priv->xstart_frac = priv->xcur_frac; priv->ycur = min_t(short, row, vid_priv->ysize - 1); }