Skip to content

usb: preserve unported Type-C and DP recovery research (draft) - #72

Draft
ooaklee wants to merge 1 commit into
x/sp11-ucsi-qualification-v26-20261016from
x/sp11-typec-recovery-7.2.5-20261017
Draft

ooaklee wants to merge 1 commit into
x/sp11-ucsi-qualification-v26-20261016from
x/sp11-typec-recovery-7.2.5-20261017

Conversation

@ooaklee

@ooaklee ooaklee commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

Historical source preservation for the broader Type-C / DisplayPort recovery overlay. Remain draft. The current kernel integration branch is sp11/ubuntu-qcom-x1e-7.3.y.

Two bounded fixes have been split out, tested and merged into that default through #79: Qualcomm reset error propagation and PS883x orientation retry / idempotent probe-remove unwind. They passed independent GLM 5.3 review, GitHub CI, 29 behavioral cases/seven negative controls with sanitizers, and complete AArch64 object builds. They should not be merged again from this carrier.

The remaining twelve files are not active merely because those two fixes landed:

  • PMIC GLINK core/header generation API: port together; validate state transitions, send admission/backpressure and changed-generation rejection. This is a useful next bounded foundation, but does not correlate late replies.
  • PMIC GLINK altmode: FIFO/lifecycle/event/request locking, generation invalidation, HPD and stop/drain behavior require a coherent state-machine review and churn/overflow/late-ACK tests.
  • DP AUX, controller/display and audio (eight files): retained fault/PM leases and lock/API changes must be ported together onto current split link/stream APIs. Preserve current HPD_IRQ and audio sequencing; old whole-file replacement is inappropriate.
  • QMP shared resource/quarantine recovery: manually reconcile against current PIPE ownership and phy/thunderbolt: preserve PIPE ownership and separate shared NHI lifetime #71. Validate acquisition, failed cleanup and shared USB/DP ownership rather than importing the older large overlay wholesale. phy: qcom: port USB4 PHY research to current 7.3 (draft) #24 tracks a separate current-base PHY port with explicit unresolved cleanup/register gates.

The original fourteen-file overlay remains at head 507356d03f3c against its historical qualification base so its unported work and provenance stay inspectable. This carrier is not retargeted mechanically: doing so would mix obsolete integration history with the current default. Implement each coherent remainder as a focused 7.3 follow-up, then close this draft when all residual work is resolved or explicitly superseded.

No claim of working USB4 tunnels, physical display recovery, new packages or current hardware qualification is made by this source-preservation PR.

Record the fourteen frozen recovery driver and header inputs on the accepted v26 source. Keep reset, QMP, PMIC GLINK ingress and altmode, PS883x, and MSM DP recovery work available for focused review.

This source-only tracking commit is not the v27 producer identity, a new full-tree validation, operational USB4 support, or the deferred GLINK channel lifecycle repair. No board activation or packaging change is included.

Signed-off-by: Leon Silcott <leon@boasi.io>
@ooaklee ooaklee changed the title [TRACKING] Preserve post-v26 Type-C and display recovery inputs usb: preserve unported Type-C and DP recovery research (draft) Nov 12, 2026
ooaklee added a commit that referenced this pull request Nov 13, 2026
Second bounded extraction from the #72 recovery overlay, building on the
pmic_glink generation API (#83).

The historical driver kept per-port firmware state in struct fields
written by receive callbacks and read by workers with no consistency
between them, waited for unattributable PAN ACKs, and published HPD on
work scheduled from any state:

- Replace per-port state fields with a bounded kfifo of snapshot events
  (PMIC_GLINK_MAX_EVENTS=64); a full queue is reported and dropped, never
  overwritten, so firmware cannot drive unbounded memory use.
- Tag every queued event and request with the pmic_glink generation;
stale events are discarded and in-flight requests rejected across a
service restart (pmic_glink_altmode_current()).
- Split locking: event_lock (spinlock, queues/state only, never held
over providers or waits) and lifecycle_lock (mutex, serialises
provider/HPD application and reconciliation, never ACK waits). The old
single-lock request path serialized unrelated ports behind ACK waits.
- pdr_notify reconciles a new generation under event_lock: queues are
reset, waiters are woken for cancellation (not as ACKs), and
enable_worker re-registers PAN_EN once for the new generation.
- HPD bridge notifications now track last-published state so a stale
generation cannot leave a connector stuck connected; a service
transition forces disconnected before reopening the barrier.
- SC8180X legacy notifications no longer infer SC8280 mux state
(has_mux_ctrl=false) and are only used for orientation/SVID/HPD.

Adaptations vs overlay head 507356d: keep the base's corrected
usbc_sc8280x_tbt_data size (res[7]) and usbc_notify trailing reserved
word (upstream b255c6f), and keep drm_aux_hpd_bridge_notify_extra /
system_freezable_wq usage already in this base.
ooaklee added a commit that referenced this pull request Nov 14, 2026
Second bounded extraction from the #72 recovery overlay, building on the
pmic_glink generation API (#83).

The historical driver kept per-port firmware state in struct fields
written by receive callbacks and read by workers with no consistency
between them, waited for unattributable PAN ACKs, and published HPD on
work scheduled from any state:

- Replace per-port state fields with a bounded kfifo of snapshot events
  (PMIC_GLINK_MAX_EVENTS=64); a full queue is reported and dropped, never
  overwritten, so firmware cannot drive unbounded memory use.
- Tag every queued event and request with the pmic_glink generation;
stale events are discarded and in-flight requests rejected across a
service restart (pmic_glink_altmode_current()).
- Split locking: event_lock (spinlock, queues/state only, never held
over providers or waits) and lifecycle_lock (mutex, serialises
provider/HPD application and reconciliation, never ACK waits). The old
single-lock request path serialized unrelated ports behind ACK waits.
- pdr_notify reconciles a new generation under event_lock: queues are
reset, waiters are woken for cancellation (not as ACKs), and
enable_worker re-registers PAN_EN once for the new generation.
- HPD bridge notifications now track last-published state so a stale
generation cannot leave a connector stuck connected; a service
transition forces disconnected before reopening the barrier.
- SC8180X legacy notifications no longer infer SC8280 mux state
(has_mux_ctrl=false) and are only used for orientation/SVID/HPD.

Adaptations vs overlay head 507356d: keep the base's corrected
usbc_sc8280x_tbt_data size (res[7]) and usbc_notify trailing reserved
word (upstream b255c6f), and keep drm_aux_hpd_bridge_notify_extra /
system_freezable_wq usage already in this base.
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