Skip to content

feat(gfx): added driver-owned displays and a flush ioctl to /dev/gfxfb - #340

Merged
FlareCoding merged 2 commits into
pr/virtio-transportfrom
pr/gfxfb-driver-displays
Oct 6, 2026
Merged

FlareCoding merged 2 commits into
pr/virtio-transportfrom
pr/gfxfb-driver-displays

Conversation

@FlareCoding

@FlareCoding FlareCoding commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • /dev/gfxfb could 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.
  • Such a driver registers a display in place of the boot framebuffer, GFXFB_FLUSH hands it the rects userland changed, and a gfxfb_info flag 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/gfxfb so a display driver can register a driver-owned RAM surface (via register_display) instead of relying only on the boot framebuffer that hardware scans directly.

Userland still maps and draws the same way, but GFXFB_GET_INFO now exposes a GFXFB_INFO_NEEDS_FLUSH flag when a driver display is active, and a new GFXFB_FLUSH ioctl passes clipped dirty rectangles from user memory to the driver’s display::flush() in bounded batches. On the boot path, flush is a no-op; mmap now picks write-combining vs normal cache from surface::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.

@FlareCoding
FlareCoding added this pull request to stack #342 October 6, 2026 06:09
@FlareCoding
FlareCoding force-pushed the pr/gfxfb-driver-displays branch from be0c683 to 491413b Compare October 6, 2026 06:27
@FlareCoding
FlareCoding merged commit 424c8e4 into master Oct 6, 2026
19 checks passed
@FlareCoding
FlareCoding deleted the pr/gfxfb-driver-displays branch October 6, 2026 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant