Skip to content

kboot_display_handoff: hand off the T6034 dcpext0 for external displays (stacked on #28, overlaps #21) - #29

Draft
BTNG-studio wants to merge 2 commits into
omacom:chris/j514m-t6034-20261105from
BTNG-studio:t6034-dcpext
Draft

BTNG-studio wants to merge 2 commits into
omacom:chris/j514m-t6034-20261105from
BTNG-studio:t6034-dcpext

Conversation

@BTNG-studio

Copy link
Copy Markdown

Summary

Draft. Hand off the T6034's external display processor dcpext0 (firmware memory, then its display DART), so the kernel can drive an external display on a J516M. Tested with an Apple Studio Display at 5120x2880@60.

Opt-in, as on T6030: chosen.asahi,t6034-dcpext=1 (memory) or chosen.asahi,t6034-dispext=1 (memory and display DART). Without one of them nothing changes.

Overlaps #21. digital-brew's #21 does the same for the T6031 with a per-SoC table of its own (dcpext6_socs[]). This PR's struct dcpext_soc is the same idea. Whichever lands first, the other should adopt its table, and I'm happy to rebase onto #21 so the T6034 is one more entry there.

Stacked on #28 (J516M defaults), which is stacked on #24. It targets #24's branch, so only the last commit is this PR.

  • Per SoC (struct dcpext_soc): the /chosen flags, the image UUID, the PMGR base of the dispextN_cpu states, the DART and power-state compatibles, and the processor list. T6030's entry holds its existing values.
  • T6034 dcpext0, from the J516M ADT (arm-io ranges applied): blocks 0x8000_0000 below the panel's DCP, dart-dispext0 on interrupt 1047 (shared with dart-dcpext0, as on T6030), and DISPEXT0_CPU at PMGR 0x292800000 + 0x4a8. Its nub has the T6030 four-segment layout, names the panel's image F493F03E-… and shares the panel's __TEXT.
  • The T6034 AIC takes four interrupt cells, so the display DART's interrupts gets die 0 when the parent has four cells. With three cells it's unchanged.
  • The markers and scanout names stay the T6030 ones: they name the handoff protocol the kernel checks, not the SoC.
  • test_t6030_dispext_dependencies.py builds dcpext6_handoffs() against a stub profile. It now checks that T6034 reads only its own flags and hands off only its own processors, and that a SoC without a profile hands nothing off.

Kernel side: omacom/linux-aurora#406.

Evidence

Hardware: my J516M (Mac15,11), OS firmware 14.7, chosen.asahi,t6034-dispext=1.

  • What ran: this change on Add normal J514M/T6034 graphics handoff #24's head as local m1n1-aurora 1.6.1.aurora22-103, with the kernel side (local -107). Attempts and fixes:
    • -102: memory handoff OK, display DART refused (m1n1 required a 3-cell AIC; T6034 has 4). Fixed here.
    • -103: both handoffs published (dcpext0-data/-heap and dispext0-pt0/pt4 reserved). The kernel's gate enabled dcpext0 with display DART iommu@305304000.
    apple-t6034-display: enabled dcpext0 (/soc/dcp@306c00000) with PMP DISPEXT0 request, CPU power floor, display DART /soc/iommu@305304000 and its Type-C routes
    apple-dcp 306c00000.dcp: dcpext verified asc-firmware: 0x000001000023c000 + 0x604000 at 0x10040000000
    apple-dcp 306c00000.dcp: dcpext verified dcp_data: 0x00000108d0d8c000 + 0x300000 at 0x10080000000
    apple-dcp 306c00000.dcp: dcpext verified heap: 0x00000108cfd8c000 + 0x1000000 at 0x100c0000000
    
    End result with the kernel side: the Studio Display at 5120x2880@60 (DSC).
  • Difference from what booted: the booted build also turned every refusal in dispext6_publish() into a line-numbered log message, which I used for debugging. That's left out here; the refusals return -1 as before.
  • Tests: pytest tests/python: 452 passed. The 2 test_loadobjs.py cases fail the same on Add normal J514M/T6034 graphics handoff #24's unmodified head on this machine. tests/run-t6030-display.sh passes (T6030 unchanged).
  • Build: a clean make builds, with the same warnings as Add normal J514M/T6034 graphics handoff #24's head (stack usage, Rust dead code) and none new.
  • Not tested: dcpext1..3 (not described for T6034), the memory-only flag on its own, the J514M (same SoC, but no dcpext nodes in its kernel tree).

Merge Danger

Door: two-way

Blast Radius: T6034 with chosen.asahi,t6034-dcpext or -dispext set, plus the T6030 path's refactor

T6030 keeps its flags, UUID, PMGR base and compatibles, now read from its table entry, and run-t6030-display.sh passes. On T6034 nothing happens without the opt-in line.

🤖 Generated with Claude Code

The 16" binned M3 Max MacBook Pro (J516M) carries the same T6034 die as
the J514M: its ADT names the same DCP image (F493F03E-...) and the same
G15C GPU firmware layout, and the display handoff registers checked for
the J514M match. Admit apple,j516m wherever the T6034 path is scoped to
the J514M: the m3_max14 default board list, the T6034 DCP handoff
boards, and t6034_board().

Owner choices are unchanged: chosen.asahi,t6034-gpu=0, -dcp=0 and
asahi,m3-defaults=0 opt out as on the J514M, and a lost config drops
the defaults. The tests that pinned the J516M as a board without
defaults now expect the T6034 defaults for it, and keep that coverage
with an unknown T6034 board (apple,j999) instead.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Philip Wallage <philip@btng.studio>
On the T6034 (J516M) m1n1 hands off only the panel's DCP, so the
kernel's display gate refuses the external display processors and no
external display works. Run the T6030 dcpext handoff on T6034 for
dcpext0, opt-in by chosen.asahi,t6034-dcpext=1 (memory) or
chosen.asahi,t6034-dispext=1 (memory and display DART), as on T6030.

What differs per SoC moves into struct dcpext_soc: the /chosen flags,
the image UUID, the PMGR base of the dispextN_cpu states, the DART and
power state compatibles, and the processor list. The T6034 dcpext0
values come from the J516M ADT (arm-io ranges applied): its blocks sit
0x8000_0000 below the panel's DCP, dart-dispext0 shares interrupt 1047
with dart-dcpext0 as on T6030, and DISPEXT0_CPU is PMGR 0x292800000 +
0x4a8. Its nub has the T6030 four-segment layout, names the panel's
image (F493F03E-...) and shares the panel's __TEXT.

The T6034 AIC takes four interrupt cells (type, die, irq, flags), so
the display DART's interrupts are written with die 0 when the parent
has four cells. The markers and scanout names stay the T6030 ones:
they name the handoff protocol the kernel checks, not the SoC.

The dependency test builds dcpext6_handoffs() against a stub profile,
and checks that T6034 reads only its own flags and that a SoC without
a profile hands nothing off.

This overlaps omacom#21, which brings the same handoff to the
T6031 with a per-SoC table of its own; whichever lands first, the
other should adopt its table.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Philip Wallage <philip@btng.studio>
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