[PATCH v3 02/20] video: Avoid starting a new line to close to the bottom

Simon Glass sjg at chromium.org
Fri Oct 18 01:11:46 CEST 2024


When starting a new text line, an assumption is made that the current
vertical position is a multiple of the character height. When this is
not true, characters can be written after the end of the framebuffer.

This can causes crashes and strange errors from QEMU.

Adjust the scrolling check when processing a newline character, to
avoid any problems.

Add some comments to make things a little clearer.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

(no changes since v1)

 drivers/video/vidconsole-uclass.c | 4 +++-
 include/video.h                   | 3 ++-
 include/video_console.h           | 8 ++++++++
 3 files changed, 13 insertions(+), 2 deletions(-)

Applied to u-boot-dm, thanks!


More information about the U-Boot mailing list