Repository navigation
drm/apple: select the pinned dual-stream policy by the processors' match data - #2417
RyanTheTide wants to merge 5 commits into
Conversation
… compatibles
The T6030 display paths were selected by the root compatible
(of_machine_is_compatible("apple,t6030")):
- dcp-fabric.c: the tunnel pixel clock sources a route may use
(dcp_route_tunnel_clock_blocked(), dcp_route_clock_rate(),
dcp_tunnel_set_rate()) and the explicit crossbar link-up of a direct
output (dcp_direct_crossbar_link());
- atc.c: the T8122-generation tunnel clock (apple_atc_tunnel_t8122_clock())
and the matching stop before a mode change (atcphy_configure()).
What these follow is hardware: the T6030 display crossbars, where a
selected output is only routed until its link is brought up and only
external sources 0 and 2 reach the ATC PHY's tunnel pixel clocks, and
the T6030 ATC PHY, which clocks both DP IN outputs from its own AUSPLL
tunnel clock. Every display processor behind those crossbars is an
apple,t6030-dcp or apple,t6030-dcpext, and every such PHY an
apple,t6030-atcphy.
Select them by those compatibles, through match data: a t6030_fabric
flag for the two T6030 processors, read by dcp_is_t6030_fabric(), and a
t8122_tunnel_clock flag for the PHY, set in a new apple,t6030-atcphy
entry (the T8122 PHY data plus the flag) and in the T8132 PHY data. The
PHY's mode change reads the same flag; a T8132 PHY never reaches that
path (atcphy_configure_t8132()), so it is the condition it had.
No functional change on any in-tree device tree: the T6030 machines
(J514s, J516s) carry exactly these compatibles, and no other SoC does
(T6031/T6034 use apple,t6031-*, T8122 apple,t8122-*). Whether the T8122
and T6031 PHYs, of the same generation, want the same tunnel clock
sequence is not known and is not changed here.
The host fixtures that replay these functions model the match data the
way they modelled the machine check, and the ATC USB3 host test now
resolves the new apple,t6030-atcphy entry.
Fixes: 6a6ee2a ("thunderbolt, phy, soc: apple: T6030 USB4/Thunderbolt, Type-C and DP tunnel support")
Fixes: 9e03c19 ("drm/apple: reserve the T6030 HDMI processor with source-aware tunnel clocks")
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…s unused The PHY host fixtures in phy.py define of_machine_is_compatible() for the ATC functions they extract. Since the T6030 tunnel clock stop in atcphy_configure() reads the PHY's match data instead of the machine, no extracted function calls the mock any more, and the units fail to build under -Werror=unused-function. Mark the two mocks unused, as the fixtures do for other optional stubs. Fixes: 6cb4c3e ("drm/apple, phy: apple: atc: select the T6030 display fabric by its IP compatibles") Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…tch data dcp_typec_ordered_dual_stream() decides whether dual-stream Type-C routes go through the ordering pass that pairs streams with pipelines. It skipped that pass when the root compatible was apple,t6030 or apple,t6050, whose external processors are interchangeable, so that a route stays with the processor that owns it on any DP IN. That is a property of the display fabric, which the processors' compatibles name. Add a pinned_dual_stream flag to the match data of the T6030 (apple,t6030-dcp, apple,t6030-dcpext) and T6050 (apple,t6050-dcp, apple,t6050-dcpext) processors. A processor with the flag marks the fabric pinned when it registers its Type-C routes, before any of them is counted as a dual-stream route, so the policy reads the same as before whenever a dual-stream route exists; with none it was "not ordered" either way. The core helper's argument is renamed to match. No functional change on any in-tree device tree: only the T6030 and T6050 machines carry these processors. The transaction selftest, which models an M1/M2 port, now models no pinned processor instead of the machine check. Fixes: bb0ad1c ("drm/apple: support both T6030 Thunderbolt dock display streams") Fixes: b5b3e96 ("drm/apple: Enable T6050 USB4 DisplayPort tunnels and paired shutdown") Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Blockers: 1.
What I checked in the last commit (75a623c), which is sound:
Nit (not blocking): dcp_typec_fixed_crtcs() (dcp-fabric.c:~413) and dcp_route_clock_rate() (:~483) still test HW row: on the rebased head, a T6050 (J714s) or T6030 (J514s/J516s) with a Thunderbolt dock driving two displays: 2/2 displays, each stream stays on its processor across 5/5 replugs, the same as the base kernel; plus 0 AVC, 0 failed units and no new kernel errors. Also boot-clean on M1 Pro, M2 and J616s, where Assisted-by: LLM (Claude:Opus 5.5) |
Conflicts: dcp-fabric.c (dcp_direct_crossbar_link: keep dcp_is_t6030_fabric() plus integration's dcp_t6041_ext_v27()), dcpext26-crossbar-union-tests.py (extract both dcp_t6041_ext_v27 and dcp_is_t6030_fabric). Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Conflicts: dcp.c (apple_dcp_hw_t6050_dcpext: keep both pinned_dual_stream and integration's dptx_endpoint = DPTX_ENDPOINT_V2); integration/aurora comes in through the updated hack/drm-board-gates-b (81af464). Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
The conflict is gone after the rebase through #2359's new head, so this now waits for #2359 to land first, then a quick re-review of the merge. Still needed: a J714s or J514s/J516s row with a Thunderbolt dock driving two displays (2/2 lit, each stream stays on its processor across 5 replugs) and clean boots on M1 Pro, M2 and J616s. |
|
Status 12-05: parked. This branch carries #2359's commits, and #2359 was folded into #2457. A merge of main (f02bd68) conflicts in dcp-fabric.c, dcp.c, atc.c and three host tests, for the same reasons as #2457: main reworked |
|
Second-pass assessment 12-05 against main @ef8a1bf8. Stays PARKED; nothing pushed. This branch carries #2457's commits (6cb4c3e, 76da970) plus its own 75a623c. On main the policy lives in |
Problem
dcp_typec_ordered_dual_stream()(drivers/gpu/drm/apple/dcp-fabric.c ~351) decides whether dual-stream Type-C routes go through the ordering pass that pairs streams with pipelines. It skipped that pass when the root compatible wasapple,t6030orapple,t6050. On those SoCs the external processors are interchangeable, so a route stays with the processor that owns it on any DP IN. This came from bb0ad1c ("drm/apple: support both T6030 Thunderbolt dock display streams") and b5b3e96 ("drm/apple: Enable T6050 USB4 DisplayPort tunnels and paired shutdown").That is a property of the display fabric, and the processors' compatibles name it. This is stream ordering, not a sleep gate.
Change
pinned_dual_streamflag inapple_dcp_hw_data, set forapple,t6030-dcp,apple,t6030-dcpext,apple,t6050-dcpandapple,t6050-dcpext.dcp_register_typec_routes()before any of its routes is counted as dual-stream. Ansmp_wmb()there pairs with ansmp_rmb()indcp_typec_ordered_dual_stream().dcp_fabric_ordered_dual_stream()'s argument is renamed fromt6030topinned. The transaction selftest, which models an M1/M2 port, now models no pinned processor instead of mocking the machine check.This is stacked on #2359 (hack/drm-board-gates-b): its two commits appear here too and go in with it; review only the last commit, which adds
t6030_fabricto the same T6030 match data.Why every SoC is safe: only the T6030 and T6050 machines carry these processors, and every external processor of those fabrics has the flag. Everything else keeps
pinned = false, as the machine check gave it.Testing
tunnel-routeandt6030-wiringpass.dcp_fabric_ordered_dual_stream()is unchanged in meaning and was compiled, not run (arm64-only suite).Still to run
No lab Mac is a T6030 or T6050. On an M3 Pro J514s/J516s with a Thunderbolt dock carrying two displays, both streams come up and each stays on its processor across a replug, the same as on the base kernel (2/2 displays on 5/5 replugs on both kernels). The J616s (T6040), M1 Pro and M2 are unaffected:
pinnedstays false.Hardware rows (combined test kernel, 2026-11-20)
This change was booted in a combined test kernel: integration/aurora 0abc2f3 plus the open gate-sweep drafts plus this and the related drafts (7.3.0-aurora-hk2/pwr1/hk3). It ran once on each lab Mac (M1 Pro J316s, M2 J413, J616s, Neo J700) and was compared against the production kernel on the same Mac, using the same silent row script:
M1 Pro, M2 and J616s matched production on every row, apart from the new counters and lines the drafts add. The Neo row found the old-DTB display regression that #2358's follow-up commit fixes.
This PR: No lab Mac reaches these paths (T6030/T6050); boot-clean regression rows only.