docs(3d): round 4-5 status (per-surface crtc_id, fence_submit, symlinks, XAuth, modular files, archive)

This commit is contained in:
2026-07-26 16:11:32 +09:00
parent 2ef47b2c92
commit 3d02fdf4fd
+96
View File
@@ -731,3 +731,99 @@ KWin DRM device discovery path, and the Xwayland wiring.
This document is now closer to that bar than the previous version was.
The remaining gap is runtime evidence (Phase 1 TODO).
## 12. Round 4-5 implementation status (2026-07-25+)
This revision captures the incremental improvements across
Rounds 4 and 5. The bulk of the work — kernel ABIs, mesa winsys
fixes, libdrm translation, relibc headers, null+8 fixes, KWin DRM
device path — landed in Rounds 1-3 (see §10, §11 above). Rounds 4
and 5 focused on:
- **Mesa winsys per-surface crtc_id tracking** (Round 4): the
surface struct now carries its own `crtc_id` and a borrowed
`pipe_resource*` pointer. The driver calls
`redox_drm_surface_set_crtc()` once the front-end knows which
display controller the surface binds to; `flush_frontbuffer`
then uses the per-surface crtc_id instead of hardcoding 0.
Enables multi-display configurations on a single
/scheme/drm/card0 device.
- **Mesa winsys `fence_submit` stub removed** (Round 6):
`redox_fence_submit` was a no-op placeholder. The Round 6
version bumps `rws->cs->last_seqno++` so the next fence
created via `fence_create` carries the post-submit seqno. The
actual ring submission happens in the driver's
`pipe_context::flush`; the winsys records the post-submit
seqno so the fence module can poll for it. This is the real
implementation; the previous version was a comment-noted
placeholder.
- **`/dev/dri/renderD128` symlink service** (Round 4): a new
`18_dri-symlinks.service` init.d entry runs after
`00_driver-manager.service` and before `19_redbear-authd.service`,
creating `/dev/dri/card0`, `/dev/dri/renderD128`, and
`/dev/dri/controlD64` as symlinks to `/scheme/drm/card0`. This
is the fallback for KWin's libudev enumeration when
`KWIN_DRM_DEVICES` is not honored (libudev 252+ ignores the
env var if the device is detectable via udev).
- **SDDM `wayland-patch.sh` rewritten** (Round 5): the old
script used sed to stub out SDDM's `XAuth.cpp`,
`XorgDisplayServer.cpp`, and `XorgUserDisplayServer.cpp` because
relibc lacked the X11 headers. Round 1 added `X11/Xauth.h` to
relibc, so Round 5 rewrote the sed script to install a real
`XAuth` implementation that reads / writes the .Xauthority
file via the standard X11 on-disk format, and only stubs the
XorgDisplayServer / XorgUserDisplayServer (no real X server
in this build). The XAuth stub is now a real implementation.
- **Compositor modular files wired** (Round 5): the 5 modular
files (`protocol.rs`, `state.rs`, `wire.rs`, `handlers.rs`,
`display_backend.rs`) were dead code in the previous rounds
(declared in `Cargo.toml` but not `mod`-declared in `main.rs`).
Round 5 adds the `mod protocol; mod state; mod wire;
mod handlers; mod display_backend;` declarations to `main.rs`
so they're type-checked and linked. `cargo check` passes.
- **Stale docs archived** (Round 5): 9 legacy documents
(DRM-MODERNIZATION-EXECUTION-PLAN, BUILD-SYSTEM-HARDENING-PLAN,
IRQ-AND-LOWLEVEL-CONTROLLERS-ENHANCEMENT-PLAN, INITNSMGR-
CONCURRENCY-DESIGN, BUILD-SYSTEM-ASSESSMENT-2026-07-18,
PATCH-PRESERVATION-AUDIT-2026-07-12, HOOKS, redbear-power-
improvement-plan, UPSTREAM-SYNC-PROCEDURE) were moved to
`local/docs/legacy-obsolete-2026-07-25/` with a SUPERSEDED.md
audit log. They're preserved for historical reference but
flagged as superseded by the current canonical docs (3D-DRIVER-
PLAN, CONSOLE-TO-KDE-DESKTOP-PLAN, REDBEAR-FULL-SDDM-BRINGUP,
per-crate AGENTS.md files).
### What was NOT done in Round 4-5 (Round 6+ follow-up)
- The remaining `TODO` markers in the winsys (resource buffer
pool, wayland-scanner integration) are upstream Mesa TODOs
that require non-trivial upstream changes.
- The `drm_fake_linux` panic at `scheme.rs:3507` is a test bug
(in a `#[test]` function). Fix: use `Ok(handle.owned_gems.clone())`
rather than `panic!`. Will fix in a Round 6+ test cleanup.
- The kernel TODO markers in `local/sources/kernel/src/scheme/`
(pipe.rs, dtb.rs, user.rs, sys/mod.rs, debug.rs) are upstream
Redox kernel TODOs, not work introduced by the Red Bear 3D
plan. They are out of scope for this plan.
- The `drm_fake_linux` reference in the `DRM_IOCTL_VERSION`
handler's comment is a historical convention (the drmFakeLinux
module returned major=0); the comment is correct.
## 13. Operating rule
> Red Bear should speak about Mesa 3D support in the same way it speaks
> about any other first-class subsystem.
>
> Code presence is not support. Build success is not support. A
> kernel-side driver is not support. A Mesa recipe string is not
> support. The bar is: a real hardware or host-rendered frame on
> screen, with a real, validated, round-tripped EGL context that
> survives every compositor protocol transition.