Repository navigation
feat(gfx): added driver-owned displays and a flush ioctl to /dev/gfxfb - #340
Merged
Merged
Conversation
FlareCoding
added this pull request to stack #342
October 6, 2026 06:09
FlareCoding
force-pushed
the
pr/gfxfb-driver-displays
branch
from
October 6, 2026 06:27
be0c683 to
491413b
Compare
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
/dev/gfxfbcould only expose the boot framebuffer, which the display hardware reads on its own. A display driver that keeps its pixels in RAM shows them only when told what to copy.GFXFB_FLUSHhands it the rects userland changed, and agfxfb_infoflag tells userland when to flush. The boot framebuffer path is unchanged.Note
Medium Risk
New user/kernel ioctl path with uaccess and mmap cache behavior changes; limited to graphics device plumbing with validation and tests.
Overview
Extends
/dev/gfxfbso a display driver can register a driver-owned RAM surface (viaregister_display) instead of relying only on the boot framebuffer that hardware scans directly.Userland still maps and draws the same way, but
GFXFB_GET_INFOnow exposes aGFXFB_INFO_NEEDS_FLUSHflag when a driver display is active, and a newGFXFB_FLUSHioctl passes clipped dirty rectangles from user memory to the driver’sdisplay::flush()in bounded batches. On the boot path, flush is a no-op;mmapnow picks write-combining vs normal cache fromsurface::cacheable.Adds kernel unit tests covering info flags, rect clipping/batching, malformed flush args, mmap attributes, and single-registration semantics.
Reviewed by Cursor Bugbot for commit 491413b. Bugbot is set up for automated code reviews on this repo. Configure here.