Repository navigation
fbcon: use whole rows in the console grid - #123
Merged
FengHeting merged 4 commits intoNov 2, 2026
Merged
Conversation
The grid used ceil(height / font_height) rows, so the last allocated row extended past the framebuffer and had to be clipped cell by cell. Round down when sizing the grid in fbcon_init() and fbcon_resize() so every console row is fully visible; the uncovered bottom strip is already painted by fbcon_clear_uncovered_bottom(). Clamp the grid to at least one row and one column for framebuffers smaller than a cell. Signed-off-by: MicroFish <2609948707@qq.com>
video_get_info() recomputed the console grid from the framebuffer and font dimensions instead of reporting the grid fbcon owns. That misses the 80x25 fallback used when the framebuffer is smaller than a cell and can disagree with the allocated grid. Return the tracked c_width and c_height so callers see the console grid that is actually in use. Signed-off-by: MicroFish <2609948707@qq.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fbcon_init()andfbcon_resize()size the grid withheight / font_height, so every allocated row is fully visible instead of the last row extending past the framebuffer and being clipped cell by cell. The uncovered bottom strip is still painted byfbcon_clear_uncovered_bottom().video_get_info()returns the trackedc_width/c_heightinstead of recomputing them, so callers see the grid fbcon actually allocated, including the 80x25 fallback.Testing
Default configuration builds.