Skip to content

soc: apple: display gate: say why the port controller link stays managed - #613

Merged
RyanTheTide merged 1 commit into
integration/aurorafrom
docs/display-gate-managed-link
Oct 30, 2026
Merged

RyanTheTide merged 1 commit into
integration/aurorafrom
docs/display-gate-managed-link

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

Follow-up to #564. This adds a comment and makes no functional change.

The question was whether the supplier link from each T6041 port controller to dcpext1 should be stateless, because unbinding dcpext1 unbinds the port controllers and takes USB down. It should stay managed.

  • Why not stateless. A port controller holds one mux handle for its USB and display muxes. Once the display routes are unregistered, typec_mux_begin() refuses every transaction on that handle with -ENODEV (deliberate since 78e061908a87), the safe and USB states included. A controller left bound would therefore be unable to switch the port on the next plug, and would never take the routes when dcpext1 binds again.
  • What the managed link does. The controllers are unbound with dcpext1 and probe again once it is back, with every mux. On the J616s, fleet9 shows the links 602e00000.dcp--spmi:1-0a, 1-0c and 2-0c as managed and active.
  • Deferred probe timeout. It cannot reorder the probe:
    • Until dcpext1 has a device, the wait is a fwnode link, which the timeout does not touch.
    • The device is created by the changeset that enables its node. From then on, a controller that the timeout lets go finds the routes unregistered and defers in the Type-C core, which does not give up on a mux.
    • A dcp that gives up disables its routes (dcp_typec_routes_disable()), and the controllers then probe without them.

The same code is on aurora-wip.

Status

  • checkpatch --strict is clean apart from the required Co-Authored-By form.
  • The object build is queued on the buildbox behind its STOP guard. Since this is a comment only, the build is a formality.
  • Hardware check on the J616s, to confirm the documented behaviour: unbind 602e00000.dcp and expect sn201202x to unbind and USB to go down (the GUI dies too). Bind it again and expect sn201202x to probe again and USB to return. Then boot with deferred_probe_timeout=1 and confirm the port controllers bind with the display routes and are never probed again.

🤖 Generated with Claude Code

The supplier link from each T6041 port controller to its display
processor becomes a managed device link. Unbinding the processor
therefore unbinds the port controllers as well, and USB on those ports is
down until the processor is bound again. A stateless link would avoid
that, but it would leave the port unusable. The controller holds one mux
handle for its USB and display muxes, and once the display route is
unregistered, typec_mux_begin() refuses every transaction on that handle
with -ENODEV. A controller left bound could not even return the port to
the safe or USB state on the next plug, and would never take the routes
the processor registers when it is bound again. With the managed link
the controller probes again once the processor is back, with every mux.

Also note why the deferred probe timeout cannot make a controller take
only its USB muxes. The wait is a fwnode link until the processor has a
device, which the timeout does not touch. The device is created with its
node enabled, and from then on the Type-C core defers for the routes that
are not registered yet.

No functional change.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Build: arm64 defconfig + asahi.config, LLVM=1 (clang 22.1.6), W=1. The touched objects build with no warnings and no errors.

🤖 Generated with Claude Code

@RyanTheTide
RyanTheTide merged commit 993ad0d into integration/aurora Oct 30, 2026
1 check passed
@RyanTheTide
RyanTheTide deleted the docs/display-gate-managed-link branch October 30, 2026 11:30
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