diff options
| author | Simon Glass <sjg@chromium.org> | 2024-10-14 16:31:54 -0600 |
|---|---|---|
| committer | Simon Glass <sjg@chromium.org> | 2024-10-18 14:10:22 -0600 |
| commit | 18a85cf7b5da3b8fabfed809cc972f0b58279620 (patch) | |
| tree | e983fa85bf8c938b2556dbd4e051f66d7e69a2b6 /include/video.h | |
| parent | 52c19173dfa162868be792d61a2e48e4bb6e0112 (diff) | |
video: Avoid starting a new line to close to the bottom
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@chromium.org>
Diffstat (limited to 'include/video.h')
| -rw-r--r-- | include/video.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/video.h b/include/video.h index fd19723b1d2..c7afe22d823 100644 --- a/include/video.h +++ b/include/video.h @@ -78,7 +78,8 @@ enum video_format { * * @xsize: Number of pixel columns (e.g. 1366) * @ysize: Number of pixels rows (e.g.. 768) - * @rot: Display rotation (0=none, 1=90 degrees clockwise, etc.) + * @rot: Display rotation (0=none, 1=90 degrees clockwise, etc.). THis + * does not affect @xsize and @ysize * @bpix: Encoded bits per pixel (enum video_log2_bpp) * @format: Pixel format (enum video_format) * @vidconsole_drv_name: Driver to use for the text console, NULL to |
