Skip to content

drm/apple: dts: apple: t6031: fix disp-0..disp-4 ADT layout and enable dcpext0 on 27.2 - #4359

Merged
DjDeveloperr merged 2 commits into
mainfrom
feat/t6031-v27-2-dcpext
Dec 4, 2026
Merged

DjDeveloperr merged 2 commits into
mainfrom
feat/t6031-v27-2-dcpext

Conversation

@Acelogic

@Acelogic Acelogic commented Dec 4, 2026

Copy link
Copy Markdown
Member

Fix the T6031 display register window mapping (disp-0..disp-4) to match the T6031 ADT, and enable the first external display processor (dcpext0, 306c00000.dcp) on T6031 (M3 Max) when running the pinned macOS 27.2 (26B123) DCP image alongside a handed-over internal panel.

Companion bootloader PR: aurora-silicon/aura#675
Related issue: #4021

Summary

  1. arm64: dts: apple: t6031-dcp: match ADT disp-0..disp-4 register windows
    • In the T6031 ADT, /arm-io/disp0 and /arm-io/dispext0 expose 5 register windows (disp-0 unsplit 0x4000000, disp-1..3, and disp-4 = 0x2903d0000 for the PMP bandwidth update window). t6031-dcp.dtsi had a split disp-0/disp-1 (0x690000 each) copied from T6030, shifting disp-4 to 0x386800000 and apple,bw-scratch to index 5.
    • Firmware 27.2 queries D003 and then maps reg index 4 via D411 (map_reg[4]); writing the bandwidth slot offset during active-link teardown (power on -> off) hit 0x3X6801208/0x3X6801210 (confirmed in the CasC crashlog register) and triggered an EL1h fabric SError (ESR=0xffffffffbe000000).
    • Align t6031-dcp.dtsi with the T6031 ADT (disp-0..disp-4, apple,bw-scratch index 4).
  2. drm/apple: dts: apple: t6031: enable dcpext0 external display on 27.2
    • Document apple,t6031-dcpext-firmware-ready in apple,dcp.yaml.
    • Add apple_t6031_dcp_v27_2() and apple_t6031_dcpext_v27_2() pinned to the 26B123 DCP UUID in include/linux/soc/apple/display.h.
    • Admit T6031 dcpext0 in display-gate.c (enabling report@11, raising dispext0_fe/dispext0_cpu min-state to active, keeping the 3-port ATC crossbar array sized for T6031, propagating the inherited scanout alias window).
    • Add apple_dcp_hw_t6031_dcpext and firmware-27 admission / clock-table / failsafe / 41-bit DMA support in dcp.c.
    • Wire dcpext0 and USB-C Type-C DP routes (typec0..2) in t6031-dcp.dtsi and t6031-j516c.dts, keeping apple,dma-range on display-subsystem.
    • Update tools/testing/selftests/drivers/gpu/apple-dcp/boot.py with the T6031 display.h helpers.

Tested:

  • Host selftests: python3 tools/testing/selftests/drivers/gpu/apple-dcp/run.py 103/103 PASS; make W=1 drivers/soc/apple/display-gate.o drivers/gpu/drm/apple/dcp.o 0 warnings.
  • Bare-metal J516c (M3 Max, apple,t6031, macOS 27.2 / 26B123 stub, companion aura#675, LG 32" 4K USB-C DP monitor on typec0):
    • Cold-boot 3840x2160@60: 30/30 event-paced flips PASS (60.00 Hz) + simultaneous eDP-1 3456x2234@120 (10/10) + DP-1 4K60 (10/10).
    • Active-link DPMS off (2560x1440@60 -> OFF): PASS (completeLink(), ioav i/f is now closed!).
    • DPMS on -> 3840x2160@60: 30/30 flips (59.91 Hz).
    • Live mode switches 4K60 -> 2560x1440@60 -> 1920x1080@120 -> 3840x2160@60: 30/30 flips each (59.88 / 119.87 / 59.94 Hz).
    • s2idle (rtcwake -m freeze -s 8) under plasmalogin: PASS, both eDP-1 and DP-1 restored cleanly, post-resume 20/20 flips on DP-1 4K60 and 20/20 on eDP-1 120 Hz.
    • 0 DCP crashes, 0 DART faults, 0 PMP faults across all runs.

Risk: two-way · T6031 (M3 Max) — scoped to T6031 dcp/dcpext0 DT and display-gate/appledrm 27.2 admission (leaves T6031 dcpext0 disabled without the aura#675 firmware-ready marker and leaves T8122/T6030 paths unchanged).

In the T6031 ADT, /arm-io/disp0 exposes five display register windows
(disp-0 as a single 0x4000000 aperture, disp-1..disp-3, and disp-4 at
0x2903d0000 for the PMP bandwidth update window). t6031-dcp.dtsi split
disp-0 into two 0x690000 windows as on T6030, shifting disp-4 to
0x386800000 and apple,bw-scratch to index 5.

Firmware 27.2 queries D003 (rt_bandwidth) and then maps reg index 4 via
D411 (map_reg[4]); with index 4 pointing at 0x386800000 instead of
0x2903d0000, writing the bandwidth dashboard offset during active-link
power-off hit an invalid fabric address and raised an EL1h SError
(ESR=0xffffffffbe000000).

Align dcp reg/reg-names with the T6031 ADT and point apple,bw-scratch
at disp-4 (index 4).

Signed-off-by: Acelogic <miguelc4600@gmail.com>
Enable the first external display processor (dcpext0, 306c00000.dcp) on
T6031 (M3 Max) when running the pinned macOS 27.2 (26B123) DCP firmware
image alongside a handed-over internal display:

- dt-bindings: document apple,t6031-dcpext-firmware-ready on apple,dcp.
- include/linux/soc/apple/display.h: add apple_t6031_dcp_v27_2() and
  apple_t6031_dcpext_v27_2() pinned to the 26B123 DCP image UUID.
- display-gate: admit T6031 dcpext0 through the shared-image gate when
  the boot loader marks apple,t6031-dcpext-firmware-ready, enabling its
  PMP report entry (report@11), raising dispext0_fe/dispext0_cpu min
  state to active, keeping the 3-port ATC crossbar array sized for
  T6031, and propagating the inherited display scanout window.
- appledrm: add apple_dcp_hw_t6031_dcpext and firmware-27 admission /
  clock-table / failsafe / 41-bit DMA setup matching T8122 dcpext.
- dts (t6031-dcp.dtsi, t6031-j516c.dts): keep apple,dma-range on
  display-subsystem, describe dcpext0 using its 5-window ADT layout
  (disp-0..disp-3 + disp-4 bw-scratch at 0x1210), and wire USB-C
  Type-C DP routes on typec0/typec1/typec2.
- selftests: include the T6031 display.h helpers in apple-dcp/boot.py.

Signed-off-by: Acelogic <miguelc4600@gmail.com>
@Acelogic
Acelogic requested review from a team as code owners December 4, 2026 20:56
@github-actions github-actions Bot added area:display Area from CODEOWNERS (bot) area:platform Area from CODEOWNERS (bot) blast:m3 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Dec 4, 2026
@github-actions

github-actions Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Merge readiness at 3917a28b: ready to merge

Check Detail
CI at head ok 11 checks passed
Review ok approved by DjDeveloperr
Requested changes ok none
Hardware row at head ok comment at 3917a28b
Conflicts ok none
PR text ok Risk: two-way · T6031 (M3 Max) — scoped to T6031 dcp/dcpext0 DT and display-gate/appledrm 27.2 admission (leaves T6031 dcpext0 disabled without the aura#675 firmware-ready marker and leaves T8122/T6030 paths unchanged).

Areas: area:display, area:platform
Merge: gh pr merge 4359 --merge (Owners and Core through the bypass: add --admin).

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: MERGE at 3917a28

Checked: The T6031 gate requires the internal handoff, the loader's reservation marker and the matching firmware image before any changeset is applied. The compiled J516c tree leaves dcpext0 disabled by default and resolves its three Type-C routes, CPU and front-end power states, mailbox, DARTs and PMP report entry to the intended suppliers. Verified that the hardware descriptions select the route topology and that the bandwidth scratch index matches the register ordering.

The exact J516c DTB compiled and passed the affected schema checks. The readiness schema accepts 1 and 2 and rejects 3. Both T6030 comparison DTBs are byte-identical to base. The submitted admission and handoff fixtures passed, and I replayed the admission checks against T6031 to confirm the pinned image is accepted while missing, mismatched and legacy firmware is refused. Review was offline.

Follow-ups: The two T6030 comparison trees emit the same pre-existing disabled-node schema diagnostics at base and head.

@Acelogic

Acelogic commented Dec 4, 2026

Copy link
Copy Markdown
Member Author

Hardware verification at exact head 3917a28b:

Head Board Kernel / Firmware Result
3917a28b J516c (MacBook Pro 16" M3 Max, T6031) 7.3.0-t6031-dcpext+, macOS 27.2 (26B123), aura#675 PASS — internal eDP-1 + external USB-C DP dcpext0 (DP-1 3840x2160@60 Hz) active, 0 DCP crashes, 0 DART faults, clean s2idle freeze/wake

@github-actions github-actions Bot removed the needs-hw-row No hardware row at the PR head (bot) label Dec 4, 2026

@DjDeveloperr DjDeveloperr left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 3917a28b13ad. The T6031 gate requires the internal display handoff, the loader's reservation marker, and the pinned 27.2 image before applying the external display changeset. The J516c DT leaves the external DCP and its routes disabled until that gate opens. The T8122 14.7 path still uses its PIODMA window, and the T8122 27.2 path still takes the alias from the internal DCP.

All six host boot fixtures passed at this head, including panel handoff and T8122 27.2 admission. The seven PR files are byte-identical in the clean integration tree on d3e72a1b7901. The J516c hardware receipt is in place. The J613 shared-path hardware receipt is still due before merge.

The current landing tree on Linux main 3ee509d6a44a is a2d29c81d820 and still preserves all seven PR blobs. For the outstanding J613 comparison, use that main as control and the clean landing tree as candidate, with the same merged Aura #675 Stage 2, stub and external display. Check visible external output and an off/on transition where supported, record both kernel identities and any DCP or DART errors, and verify stock return. The readiness comment credits the J516c result. This J613 shared-path result remains the merge gate.

@github-actions github-actions Bot added ready-to-merge Meets the merge policy: merge it (bot) and removed needs-review No approving review from Core or Omarchy Mac yet (bot) labels Dec 4, 2026
@satchlj

satchlj commented Dec 4, 2026

Copy link
Copy Markdown
Member

Tested J613 (T8122, macOS 27.2 / 26B123) shared-path control row at exact heads:

  • Kernel (aurora-silicon/linux#4359): 3917a28b13adbcd3c47c970f81f136fefe7b4fae (7.3.0-1-4359-ARCH+, default kernel command line)
  • Stage 2 (aurora-silicon/aura#675): 9b1d40b81964a35ffaddd097f66a14e62e7e8891 (1.0.0b19-g9b1d40b8, merged as 193dcca34054)

Results

  • Shared Stage 2 + display-gate bring-up: PASS
    • Reserved dcpext-tables@103ffe* + dcp firmware/oslog regions cleanly and populated apple,t8122-dcpext-firmware-ready, apple,typec-dptx-phys, and apple,typec-mux-indices on /soc/dcp@31ac00000.
    • apple-t8122-display enabled both /soc/dcp@28ec00000 (built-in panel) and /soc/dcp@31ac00000 (Type-C routes, DARTs, mailbox, 2 display crossbars, /soc/iommu@319304000, CPU power floor, and PMP DISPEXT request).
  • DRM / apple-dcp bind: PASS
    • 28ec00000.dcp and 31ac00000.dcp both acknowledged PMP display requests, initialized RTKit v12, brought up disp0-service + AppleDCPDPTXController, and bound cleanly to apple-drm display-subsystem.
    • card1-eDP-1: connected, enabled (2560x1664); card1-DP-1 and card1-DP-2: registered (disconnected, disabled).
    • 0 failed systemd units, 0 DCP crashes, 0 DART/IOMMU faults, 0 kernel warnings/errors.
  • Suspend / resume: PASS — 2× 12 s deep sleeps (rtcwake -d /dev/rtc1 -m mem -s 12, success=2 fail=0); card1-eDP-1 remained connected/enabled, card1-DP-1/card1-DP-2 clean, 0 failed units, 0 new DCP/DART errors.
  • Untested on hardware: No physical external DisplayPort display was attached during this control run, so live external DP hotplug/modeset on J613 was not exercised.

@DjDeveloperr
DjDeveloperr merged commit 11306b4 into main Dec 4, 2026
14 checks passed
@DjDeveloperr
DjDeveloperr deleted the feat/t6031-v27-2-dcpext branch December 4, 2026 23:31
IronsideXXVI pushed a commit to IronsideXXVI/linux that referenced this pull request Dec 5, 2026
The 120 Hz-only mode lock (.only_120hz_modes = true) on apple_dcp_hw_t6031
worked around DCP crashes when switching away from the iBoot panel timing
on firmware 27.2. Commit 11306b4 ("Merge pull request aurora-silicon#4359 from
aurora-silicon/feat/t6031-v27-2-dcpext") fixed t6031-dcp.dtsi's missing
5-window disp-0..disp-4 ADT layout, which was the underlying cause of
mode-set instability on T6031.

Drop .only_120hz_modes from apple_dcp_hw_t6031 (leaving T6030 and T6050
unchanged), update the comment in iomfb.c, and assert the T6031 profile
exposes all fixed rates in dcp-firmware-test.c.

Verified on J516c (MacBook Pro 16" M3 Max, T6031, macOS 27.2 / 26B123)
with dual-display DP-1 4K60 active: live modesets across 120, 60, 59.94,
50, 48, and 47.95 Hz, DPMS OFF -> ON at 60 Hz, and 60 -> 120 Hz return
all succeed with 0 DCP crashes, 0 SErrors, and 0 DART faults.

Signed-off-by: Acelogic <miguelc4600@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:display Area from CODEOWNERS (bot) area:platform Area from CODEOWNERS (bot) blast:m3 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) ready-to-merge Meets the merge policy: merge it (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants