diff options
author | Simon Glass <sjg@chromium.org> | 2023-06-01 10:22:33 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-07-14 12:54:50 -0400 |
commit | 0ab4f91a107832692781a367a1ef2173af75f108 (patch) | |
tree | 8cf7f25b649e2b23fa3dbdc2e7c6114d397c6303 /include/video.h | |
parent | 7432f68c53526980d0a2b2ffd54fe61141bb1178 (diff) | |
download | u-boot-0ab4f91a107832692781a367a1ef2173af75f108.tar.gz |
video: Provide a way to clear part of the console
This is useful when the background colour must be written before text
is updated, to avoid strange display artifacts.
Add a function for this, using the existing code from the truetype
console.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/video.h')
-rw-r--r-- | include/video.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/video.h b/include/video.h index 03434a81234..6dc42d464b0 100644 --- a/include/video.h +++ b/include/video.h @@ -205,6 +205,22 @@ int video_clear(struct udevice *dev); int video_fill(struct udevice *dev, u32 colour); /** + * video_fill_part() - Erase a region + * + * Erase a rectangle of the display within the given bounds. + * + * @dev: Device to update + * @xstart: X start position in pixels from the left + * @ystart: Y start position in pixels from the top + * @xend: X end position in pixels from the left + * @yend: Y end position in pixels from the top + * @colour: Value to write + * Return: 0 if OK, -ENOSYS if the display depth is not supported + */ +int video_fill_part(struct udevice *dev, int xstart, int ystart, int xend, + int yend, u32 colour); + +/** * video_sync() - Sync a device's frame buffer with its hardware * * @vid: Device to sync |