DRAFT: J414c offline USB4 DP lifecycle prototype - #1
Conversation
DCP 14.7 expects its 0x234-byte extension before the pointer-null flags. Linux placed it after the flags, so DCP read the flags at the old offsets and rejected surface-clear requests. Move the extension before the pointer-null flags. Signed-off-by: a-ramses <abdicheramzi@gmail.com>
This reverts commit 47508c0. The DCP 14.7 request layout now matches the firmware, so surface-clear requests work and stale framebuffer references can be retired again. Signed-off-by: a-ramses <abdicheramzi@gmail.com>
Add optional platform callbacks around DP tunnel activation. Track completed phases so rollback only undoes work that succeeded. Platforms without callbacks keep the existing path. This experimental plumbing has no display-routing side effects. It is compile-tested only and has not been hardware-tested. Signed-off-by: Matthew Altman <matthewaltman2008@gmail.com>
Log the selected host DP-IN and remote DP-OUT at each phase. The callbacks do not touch DCP, ATC PHY, crossbar, or DT state. T602x DPIN routing remains unproven. This is compile-tested only and does not enable hardware video. Signed-off-by: Matthew Altman <matthewaltman2008@gmail.com>
|
Offline review/build update:
No package was created or installed, no DT node was enabled, and dock5-2 remains unchanged. |
Move the experimental Apple DP source lifecycle behind an ACIO-owned ordered workqueue. Keep the callbacks limited to scalar reservation state while the worker only traces converged desired state. Use session and token cookies to reject stale teardown, quiesce and flush the manager around ACIO shutdown, and add pure reducer KUnit coverage. This remains an offline trace-only prototype with no DCP, PHY, mux, MMIO, or DT side effects. Signed-off-by: Matthew Altman <matthewaltman2008@gmail.com>
|
Offline checkpoint published at What this adds:
Validation completed:
Experimental boundary: this commit performs in-memory bookkeeping and trace logging only. It does not call DCP, select a PHY/crossbar, write MMIO, or enable DT nodes. KUnit runtime was not executed (no arm64 UML backend or aarch64 QEMU here; the global Rust KUnit config also hits unrelated existing DRM Rust test failures). It has not been run with the dock and is not a video fix. The gating next steps remain T602x DPIN0/1 MMIO capture, tunneled logical-PHY design, DCP target/engine arbitration, DCP hot-unplug race fixes, and then a one-shot trace-first dock test. The known dock5-2 baseline remains untouched at |
Move the existing physical PHY operations behind per-port transport ops and install them before publishing each DPTX service. Preserve the native APCALL behavior while separating physical lane, rate, activation, and deactivation handling. Add an unreachable logical USB4 model, remote-target helpers, and KUnit coverage. The logical model only records scalar link state and contains no PHY, Type-C, mux, MMIO, DT, or Thunderbolt operations. No production path selects it, and no DCP connect or timeout behavior changes. Reject out-of-range remote target fields instead of silently masking them. This remains an offline compile-tested seam, not a video-producing route. Signed-off-by: Matthew Altman <matthewaltman2008@gmail.com>
Model DPTX connection attempts explicitly so disconnect and shutdown can cancel an in-flight link-configuration wait without allowing the waiter to assert HPD or connect AV afterward. Correctly treat a zero wait_for_completion_timeout return as a timeout and propagate EPIC request and HPD errors. Serialize completion reuse with attempt publication, distinguish remote display ownership from a fully connected output, drain connect callers before AFK shutdown, and quarantine every unsuccessful attempt until DCP reinitialization. The quarantine is intentionally conservative because firmware APCALLs carry no attempt token and a late APCALL must not satisfy a newer attempt. Add KUnit coverage for success, timeout, cancellation, stale tickets, anomalous completion, generation wrap, and forced failure. This is compile-tested experimental infrastructure: KUnit runtime, native HDMI timeout behavior, and dock video remain hardware-untested.
|
Offline checkpoint pushed: db0c762 — drm/apple: harden DPTX connection lifecycle. What changed:
Verification on the exact commit:
Experimental boundary: KUnit runtime was not executed; native HDMI behavior with the corrected 2-second timeout and all dock/video behavior remain hardware-untested. This commit does not select the logical USB4 transport, enable ATC2 DPIN DT, or program T602x DPIN MMIO. |
|
Offline crossbar observability checkpoint pushed: What changed:
Verification on the exact commit:
Experimental boundary: this commit does not enable |
Add a pure, KUnit-only reducer for explicit dcpext engine leases and DP-IN sink ownership. Keep the model unreferenced by production code until J414c engine/core and T602x DPIN routing are proven. A future live integration must compose DPTX attempt failure with an engine-level quarantine or retained lease.
|
Offline ownership-model checkpoint pushed: What changed:
Verification:
Experimental boundary: the header is included only by its KUnit test. No production DCP, Thunderbolt, mux, PHY, HPD, MMIO, DT, probe, or callback path references it. It does not select an engine or route and has not run on hardware. Before live wiring, DPTX FAILED must compose with an engine-level quarantine/retained lease, and actual J414c engine/core plus T602x DPIN policy must come from hardware evidence. |
Model provider-selected ordered engine allocation without exposing engine policy to Thunderbolt. Add terminal sink-preserving quarantine and an owner-ticketed DPTX endpoint restart barrier that rejects active leases and stale completions.\n\nThis remains KUnit-only and has no production call sites, DT changes, MMIO changes, or hardware validation.
|
Published offline checkpoint 5c1b036. Scope:
Hard exclusions:
Validation:
Docs checkpoint: https://github.com/ice3186/j414c-dock-bringup/commit/9b241b7 |
Status
Experimental and compile-tested only. This does not enable external video and has not been tested with the dock.
What this branch contains
Offline validation
Hardware gate
T602x DPIN0/DPIN1 register programming is not implemented or proven in the current display-crossbar driver. Do not enable atcphy2_xbar or add DCP routing until a macOS/m1n1 MMIO trace establishes the real sequence.
Dock-return next steps
Full PRD and tested/untested matrix: https://github.com/ice3186/j414c-dock-bringup/blob/main/J414C-USB4-DP-PRD.md