diff options
| author | Alexander Graf <[email protected]> | 2022-06-10 00:59:21 +0200 |
|---|---|---|
| committer | Simon Glass <[email protected]> | 2025-05-01 04:32:45 -0600 |
| commit | 70dfd674782adb47a641288925484d6edc8df963 (patch) | |
| tree | b724faa2e63804c31a98e8b6fac815650d963b90 /drivers/video/console_normal.c | |
| parent | 4aaa19bd181adf9556b31c3dcd66635ae6594c70 (diff) | |
video: Use VIDEO_DAMAGE for VIDEO_COPY
CONFIG_VIDEO_COPY implemented a range-based copying mechanism: If we
print a single character, it will always copy the full range of bytes
from the top left corner of the character to the lower right onto the
uncached frame buffer. This includes pretty much the full line contents
of the printed character.
Since we now have proper damage tracking, let's make use of that to reduce
the amount of data we need to copy. With this patch applied, we will only
copy the tiny rectangle surrounding characters when we print them,
speeding up the video console.
After this, changes to the main frame buffer are not immediately copied
to the copy frame buffer, but postponed until the next video device
sync. So issue an explicit sync before inspecting the copy frame buffer
contents for the video tests.
Signed-off-by: Alexander Graf <[email protected]>
[Alper: Rebase for fontdata->height/w, fill_part(), fix memmove(dev),
drop from defconfig, use damage.xstart/yend, use IS_ENABLED(),
call video_sync() before copy_fb check, update video_copy test]
Co-developed-by: Alper Nebi Yasak <[email protected]>
Signed-off-by: Alper Nebi Yasak <[email protected]>
Link: https://lore.kernel.org/u-boot/[email protected]/
Diffstat (limited to 'drivers/video/console_normal.c')
| -rw-r--r-- | drivers/video/console_normal.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/video/console_normal.c b/drivers/video/console_normal.c index 51ac8cc78e9..07db613ac53 100644 --- a/drivers/video/console_normal.c +++ b/drivers/video/console_normal.c @@ -35,10 +35,6 @@ static int console_set_row(struct udevice *dev, uint row, int clr) fill_pixel_and_goto_next(&dst, clr, pbytes, pbytes); end = dst; - ret = vidconsole_sync_copy(dev, line, end); - if (ret) - return ret; - video_damage(dev->parent, 0, fontdata->height * row, @@ -57,14 +53,11 @@ static int console_move_rows(struct udevice *dev, uint rowdst, void *dst; void *src; int size; - int ret; dst = vid_priv->fb + rowdst * fontdata->height * vid_priv->line_length; src = vid_priv->fb + rowsrc * fontdata->height * vid_priv->line_length; size = fontdata->height * vid_priv->line_length * count; - ret = vidconsole_memmove(dev, dst, src, size); - if (ret) - return ret; + memmove(dst, src, size); video_damage(dev->parent, 0, @@ -109,10 +102,6 @@ static int console_putc_xy(struct udevice *dev, uint x_frac, uint y, int cp) fontdata->width, fontdata->height); - ret = vidconsole_sync_copy(dev, start, line); - if (ret) - return ret; - return VID_TO_POS(fontdata->width); } |
