summaryrefslogtreecommitdiff
path: root/drivers/video/console_normal.c
diff options
context:
space:
mode:
authorAlexander Graf <agraf@csgraf.de>2022-06-10 00:59:17 +0200
committerSimon Glass <sjg@chromium.org>2025-05-01 04:30:53 -0600
commit17f0f77a593bfa2964990bdd5bdc02ecffc55a88 (patch)
treea96e2f96ec09fcde06d79532a1e99493c2eadb85 /drivers/video/console_normal.c
parentb5ffd6bdb42748ca43d9fe6adc0d808cec3986dc (diff)
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 <agraf@csgraf.de> Reported-by: Da Xue <da@libre.computer> [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 <alpernebiyasak@gmail.com> Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Link: https://lore.kernel.org/u-boot/20230821135111.3558478-7-alpernebiyasak@gmail.com/
Diffstat (limited to 'drivers/video/console_normal.c')
-rw-r--r--drivers/video/console_normal.c18
1 files changed, 18 insertions, 0 deletions
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;