From 17f0f77a593bfa2964990bdd5bdc02ecffc55a88 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Fri, 10 Jun 2022 00:59:17 +0200 Subject: vidconsole: Add damage notifications to all vidconsole drivers Now that we have a damage tracking API, let's populate damage done by vidconsole drivers. We try to declare as little memory as damaged as possible. Signed-off-by: Alexander Graf Reported-by: Da Xue [Alper: Rebase for met->baseline, fontdata->height/width, make rotated console_putc_xy() damages pass tests, edit patch message] Co-developed-by: Alper Nebi Yasak Signed-off-by: Alper Nebi Yasak Link: https://lore.kernel.org/u-boot/20230821135111.3558478-7-alpernebiyasak@gmail.com/ --- drivers/video/console_normal.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'drivers/video/console_normal.c') diff --git a/drivers/video/console_normal.c b/drivers/video/console_normal.c index 6f4194a1814..51ac8cc78e9 100644 --- a/drivers/video/console_normal.c +++ b/drivers/video/console_normal.c @@ -39,6 +39,12 @@ static int console_set_row(struct udevice *dev, uint row, int clr) if (ret) return ret; + video_damage(dev->parent, + 0, + fontdata->height * row, + vid_priv->xsize, + fontdata->height); + return 0; } @@ -60,6 +66,12 @@ static int console_move_rows(struct udevice *dev, uint rowdst, if (ret) return ret; + video_damage(dev->parent, + 0, + fontdata->height * rowdst, + vid_priv->xsize, + fontdata->height * count); + return 0; } @@ -91,6 +103,12 @@ static int console_putc_xy(struct udevice *dev, uint x_frac, uint y, int cp) if (ret) return ret; + video_damage(dev->parent, + x, + y, + fontdata->width, + fontdata->height); + ret = vidconsole_sync_copy(dev, start, line); if (ret) return ret; -- cgit v1.2.3