danos/system
Daniel Samson 4231301896
display: runtime mode-setting, EDID, and fenced (vsync) present (v2 V5)
The native backend can now change resolution and presents tear-free.

Mode-setting without churn. The driver sizes its scanout resource + shared surface to the
largest mode it offers and treats a mode change as re-pointing the scanout rectangle within
that surface — so the resource, its backing, and the shared mapping never change, and the
surface's row stride (the max width) is fixed while the active width/height move. The
compositor is handed that stride in the announce and composes at it; a smaller mode just
paints the top-left rectangle. This sidesteps the surface re-share a true resolution change
would otherwise need (the service harness can't reply with a capability).

- scanout-protocol gains get_modes + set_mode; the driver offers {640x480, 800x600} and
  re-points set_scanout on set_mode.
- backend.VirtioGpu carries the surface stride, exposes modes()/setMode(), and reports
  canModeSet = hasVsync = true.
- runtime.display gains modes()/setMode() (display-protocol get_modes/set_mode, forwarded to
  the backend) — the client-facing API.
- EDID: the driver negotiates VIRTIO_GPU_F_EDID when the device offers it, reads the monitor's
  EDID, and logs its preferred mode (parsed from the first detailed timing descriptor).
- vsync: every resource_flush is fenced (VIRTIO_GPU_FLAG_FENCE); the device signals the fence
  when the frame is on screen, which the used-ring ack the synchronous present already waits
  on gates — so a completed present is a tear-free one.

After the native upgrade the compositor runs a one-shot mode-set self-check: query the modes,
switch to a different one, re-composite, and confirm the backend reports the new geometry —
the gate's markers.

Gate: python3 test/qemu_test.py display-modeset (reuses the display-native boot) — "display:
mode set to 800x600, verified" + "display: vsync present ok", passing 3/3. host tests,
display-service, display-demo, shm, virtio-gpu, and display-native still pass.
2026-07-14 12:44:21 +01:00
..
devices display: framebuffer handoff primitive + service design (D1) 2026-07-14 00:54:56 +01:00
drivers display: runtime mode-setting, EDID, and fenced (vsync) present (v2 V5) 2026-07-14 12:44:21 +01:00
kernel display: hot-attach a virtio-gpu native backend over the GOP floor (v2 V4) 2026-07-14 12:21:37 +01:00
services display: runtime mode-setting, EDID, and fenced (vsync) present (v2 V5) 2026-07-14 12:44:21 +01:00
abi.zig display: hot-attach a virtio-gpu native backend over the GOP floor (v2 V4) 2026-07-14 12:21:37 +01:00
boot-handoff.zig zig fmt 2026-07-12 16:04:58 +01:00
initial-ramdisk.zig Post-reorg cleanup: POSIX layer, and naming fixes 2026-07-10 13:33:06 +01:00
parameters.zig USB driver stack: xHCI transfers, HID keyboard/mouse, mass storage 2026-07-13 14:11:00 +01:00