Skip to content

tools/asahi, selftests: model the T6050 DP tunnel merges in the host tests - #1524

Merged
DjDeveloperr merged 2 commits into
integration/aurorafrom
djdev/host-tests-usb4-fixtures
Nov 11, 2026
Merged

DjDeveloperr merged 2 commits into
integration/aurorafrom
djdev/host-tests-usb4-fixtures

Conversation

@DjDeveloperr

Copy link
Copy Markdown
Contributor

Since the T6050 USB4 DisplayPort tunnel merges (#1268, #1270, #1271), host-tests has failed on integration/aurora. 216 of 224 runs pass. The rest stopped building or aborted against their fixtures:

  • t6030-clock, t6030-wiring, tiled-split: the extracted production bodies use symbols the fixtures don't have: DCP_FABRIC_DPIN_MAX, dcp_fabric_dpin_slot(), apple_dp_tunnel_routes_port(), apple_t6050_dp_tunnel_clock(), route->tunnel_rate, dcp->fw_compat / DCP_FIRMWARE_V_27_0.
  • tunnel-route (exit 250): dcp_typec_tunnel_ctl() now accepts DP IN 2/3 and reads the fixture's two-entry dpin[] past its end.
  • apple-dcp: route deactivation now calls dcp_tb_events_retire(), dcp_xbar_t8142() and dcp_typec_fixed_crtcs(). The machine stub also asserted on the new apple,t6050 query, and SetLinkRate uses the UHBR rates and firmware 27.

Every failure was a stale fixture. The driver needed no change.

The fixtures now model the new code instead of stubbing it out. Where a function could be extracted from production, it is (apple_dp_tunnel_routes_port(), dcp_fabric_dpin_slot(), dcp_tb_events_retire(), the firmware enum and DCP_FABRIC_DPIN_MAX). New cases cover the new behaviour:

  • t6030-clock: on T6050, DP IN n runs tunnel clock n + 1, and the route keeps its rate only when the clock started.
  • t6030-wiring:
    • routes on port 2 beside a USB4 router on port 3;
    • four named DP INs on a five-output crossbar;
    • DP IN 2/3 refused on a three-output crossbar, and refused without a DP IN 0/1 pair.
  • tunnel-route: DP IN 0-3 controls on four- and five-output crossbars, named and legacy; DP IN 4 refused.
  • tiled-split:
    • firmware 27 pipelines never take a tile, even with a tile hint;
    • DP IN 3 takes DP IN 1's stream slot;
    • two new mutants: fw27-tileable and dpin3-primary-slot.
  • apple-dcp: the normal SAFE case also checks that deactivation clears queued tunnel events.

No existing case changed its expected result. Three tiled-split mutants match the rewritten untileable condition and keep their meaning.

🤖 Generated with Claude Code

The T6050 USB4 DisplayPort tunnel merges (#1268, #1270, #1271) gave the
display fabric up to four DP IN adapters per port (DCP_FABRIC_DPIN_MAX,
dcp_fabric_dpin_slot()), a per-DP IN tunnel clock on T6050, firmware 27
pipelines that never take a tile, and apple_dp_tunnel_routes_port() to
find a connector's display routes off port 3. The extracted production
bodies no longer built against these fixtures, and tunnel-route read
past its two-entry dpin[] array.

Model the new code rather than stubbing it out:

- t6030-clock: the route records its tunnel_rate; the T6050 PHY clock
  call is a recording stub that only a T6050 machine may reach. A new
  case checks DP IN n runs tunnel clock n + 1 and that the route keeps
  its rate only when the clock started.
- t6030-wiring: extract apple_dp_tunnel_routes_port() as production
  (the extractor now keeps a return type on its own line) and take
  DCP_FABRIC_DPIN_MAX from the header. New cases: routes on port 2
  beside a USB4 router on port 3, four named DP INs on a five-output
  crossbar, DP IN 2/3 on a three-output crossbar, and DP IN 2/3 without
  a DP IN 0/1 pair.
- tunnel-route: dpin[] and the crossbar are sized from the header.
  DP IN 2/3 on a three-output crossbar and DP IN 4 stay refused; new
  checks cover four- and five-output crossbars, named and legacy.
- tiled-split: extract dcp_fabric_dpin_slot() and enum
  dcp_firmware_version. The readiness-judged, any-external-untileable
  and dcpext-tileable mutants match the new untileable condition with
  the same meaning. New firmware 27 cases (DP IN 1 alone, with a tile
  hint, DP IN 3 in DP IN 1's slot) and mutants (fw27-tileable,
  dpin3-primary-slot).

No existing case changed its expected result, and no driver change was
needed: every failure was a stale fixture.

Signed-off-by: Diljit Singh <hey@djdev.me>
…tion

Since the T6050 DP tunnel merges, dcp_typec_route_deactivate() retires
queued DP IN events (dcp_tb_events_retire()), asks whether its crossbar
is the T8142 layout, and leaves a fixed-CRTC connector's possible_crtcs
alone (dcp_typec_fixed_crtcs()); dcp_typec_ordered_dual_stream() also
asks for apple,t6050. DPTX SetLinkRate takes the UHBR10/20 rates and
refuses a failed tunnel clock on firmware 27 too.

The transaction units extract dcp_tb_events_retire() as production, with
its own lock in the pthread variant and a recorded work cancel; the M1/M2
crossbar is not the T8142 layout and has no fixed-CRTC connectors; the
machine stub accepts the apple,t6050 query (still never that machine).
The normal SAFE case now also checks that deactivation clears queued
tunnel events. The rate harness defines the UHBR rates and firmware 27
before the SetLinkRate handler that uses them.

This fixes actual-dcp-*, provider-order-releases-failed-lease,
failed-safe-allows-new-dp-admission, altmode-safe-skips-quiescence,
concurrent-prepare-set-stale-quiescence, mux-release-stages and
publication-hpd. No expectation changed.

Signed-off-by: Diljit Singh <hey@djdev.me>
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