Skip to content

soc: apple, arm64: dts, drm/apple: enable T6031 internal display on firmware 27.2 - #4049

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

DjDeveloperr merged 4 commits into
mainfrom
feat/t6031-v27-2-display

Conversation

@Acelogic

@Acelogic Acelogic commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

What: Enable native internal display bringup on T6031 (M3 Max) Macs running macOS 27.2 (26B123) firmware, paired with merged aurora-silicon/aura#654 (5c38202f1715):

  • Admit the T6031 27.2 PMP firmware UUID (5135AF78-00F4-3217-9DA3-B33A2B9CCA70) via pmp_uuid_alt on gate_t6031 in drivers/soc/apple/display-gate.c, update the gate_t6031 comments for both 14.x and 27.2 images, and add gate_t6031_pmp_image_27_2 in display-gate-test.c.
  • Drop the stale apple,t6031-dcp exemption from Documentation/devicetree/bindings/display/apple,dcp.yaml so dtbs_check enforces apple,bw-scratch on T6031 internal DCP.
  • Wire apple,bw-scratch = <&pmgr_dcp 0 5 0x1208>; on dcp: dcp@386c00000 in arch/arm64/boot/dts/apple/t6031-dcp.dtsi (PTD bandwidth request entry 577 in disp-5, immediately preceding T6031 dcpext0 at 0x1210).
  • On apple_dcp_hw_t6031 in drivers/gpu/drm/apple/dcp.c, enable afk_name_fallback = true (matching T6030 drm/apple: dcp: enable AFK init-prop name fallback on T6030 internal DCP #3768 so SYSTEM_ENDPOINT ep:20 services bind under DCP_FIRMWARE_V_27_0) and only_120hz_modes = true, gating only_120hz_modes in drivers/gpu/drm/apple/iomfb.c (dcp_mode_settable()) on DCP_FIRMWARE_V_27_0 so firmware 27.2 stays safely on its boot refresh rate while 14.7 fixed modes remain unaffected. Add the 14.7 non-regression check to parser_internal_v27_only_120hz (parser-test.c) and update the apple-dcp boot.py host stub.

Tested:

  • Exact-head bare-metal J516c row at 1ef7a8e1b8fa7f6f910d28db313480a28d810f41 (16-inch MacBook Pro, M3 Max, apple,j516c / apple,t6031, macOS 27.2 26B123 stub, Aura Stage 1 1.0.0b19, Stage 2 1.0.0b19-7-g0e94e259 from aura#654, boot_id a0e305ba-f3f3-4e8c-b8bf-4f69269dcbfc, Linux 7.3.0-t6031-disp27+, Image SHA-256 da3c22f4d47e..., t6031-j516c.dtb SHA-256 a6d1bfce52f4..., boot.bin SHA-256 31e6e9a76408...):
    • apple-t6031-display: admitted PMP 5135AF78-00F4-3217-9DA3-B33A2B9CCA70, copied 88 values from /chosen/asahi,t6031-pmp onto /soc/pmp@290700000, completed pmp_report (report@10 display + report@21 storage).
    • apple_pmp / apple-pmp-report: PMP firmware and endpoint ready, PMP started, PMP ready: PTD status 0x1 request 0x200010000 ack 0x200010400.
    • apple-dcp: AFK[ep:20]: new service system on channel 1, AFK[ep:20]: new service powerlog-service on channel 3 (0 failed to extract init props errors), Using Dashboard 2903d1208, DCP booted, Initialized apple 1.0.0 for display-subsystem on minor 1, set_digital_out_mode(color:1 timing:2) "3456x2160": 120 -> finished:8500, boot scanout retired by displayed swap 5, fb0: appledrmfb.
    • modetest -M apple -c: eDP-1 connected, 346x223 mm, 1 mode advertised (3456x2234 120.00 Hz, preferred/driver) — non-120 Hz fw-27 crash path closed.
    • /sys/class/backlight/apple-panel-bl: live brightness step verified (140 -> 220 -> 140, actual_brightness matches, max=500, bl_power=0, DCP brightness_changed logged).
    • Wi-Fi (wld0) and Thunderbolt (thunderbolt0) up; 0 priority 0–3 display/PMP/DCP/AFK/DART kernel errors; 0 failed systemd units.
  • KUnit (arm64 QEMU, LLVM):
    • Standalone apple-display-gate: 77/77 PASS (apple-display-gate-t6031 20/20 incl. gate_t6031_pmp_image_27_2, t6030 6/6, t8122 28/28, t6041 1/1, t6041-max 14/14, t8132 8/8).
    • dcp-display (drivers/gpu/drm/apple/tests/display.kunitconfig): 309/310 pass, 1 skip, 0 fail (all 24 suites PASS, incl. apple-display-parser 48/48 with updated parser_internal_v27_only_120hz).
  • Host tests & style: dcp-bw-scratch-window-tests.py, dcpext26-startup-tests.py, t6030-display-admission-tests.py, dcp14-panel-tests.py, dcp-ext-repower-tests.py PASS; apple-dcp selftests boot 6/6 (incl. v27-panel-handoff) & edid 4/4 PASS; scripts/checkpatch.pl --strict 0 errors, 0 warnings, 0 checks across all 4 commits.

Risk: two-way · T6031 (M3 Max) internal display and PMP handoff on firmware 27.2, plus 14.7 T6031 (wiring apple,bw-scratch 0x1208 lets 14.7 T6031 probe past dcp_get_bw_scratch_reg() where main currently refuses probe; only_120hz_modes and afk_name_fallback are both gated on DCP_FIRMWARE_V_27_0 so 14.7 fixed modes and AFK paths stay unchanged). T6030, T8122, T6034, T6050, and other SoCs are unchanged.

Not yet:

@RyanTheTide RyanTheTide 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.

Review at 2b77bf3 (checked against the T6031 J516c/J514c 26.6.2 + 27.2 ADTs, names only). Nothing blocks; one point affects the Risk text.

  • Medium: 14.7 T6031 changes too. t6031-dcp.dtsi now gives the T6031 DCP apple,bw-scratch. On main that node has none, and dcp_get_bw_scratch_reg() has no fallback, so the T6031 DCP currently fails probe ("failed to find display registers") on every firmware. With this PR a 14.7 T6031 also gets past that point, and its firmware is handed that PTD slot. The slot is only shown working on 27.2. If 14.7 numbers that entry differently, bandwidth votes would land on another device's entry. Please either run a 14.7 J516c row (Naeem's 14.7 J516c could) or say in the Risk line that 14.7 T6031 changes.
  • Low: apple,dcp.yaml still exempts apple,t6031-dcp from the required apple,bw-scratch. The driver can't probe without it, so dropping the exemption lets dtbs_check enforce it.
  • Low: the gate_t6031 comment still says only the 14.7 image is admitted.
  • Dj's concern (the UUID alone): apple_pmp_start_check_layout() checks the handed-over ptd-range against apple_pmp_offsets_t6031 and the seeded ANS record (report@21) before starting the PMP, so a wrong offset or ANS index fails safe. report@10 (display) isn't seeded, so its only evidence is the boot where the PMP acked the display request. The iop-pmp0-nub property set is the same in 26.6.2 and 27.2, the soc-device table splits into the 35 records the comment states, and J514c matches J516c.
  • Error paths fine: the gate's UUID check frees its node reference, bw-scratch index 5 is inside the 6 disp-N windows and bounds-checked, and afk_name_fallback is firmware-27-only as on T6030. T6034 includes the dtsi but its node stays disabled, and the gate runs only on apple,t6031. T6030/T8122 untouched. git merge-tree is clean against #4037 (8660886) and main.
  • Before it leaves draft: the PR says non-120 Hz modes crash the 27.2 DCP, yet all 6 modes are advertised. A compositor that switches rate or turns on VRR will hit that, so limit the mode list to what works until it's fixed.

Admit the T6031 PMP firmware UUID from system firmware 27.2 (26B123),
5135AF78-00F4-3217-9DA3-B33A2B9CCA70, via pmp_uuid_alt on gate_t6031.
Its PTD range map keeps PMP-STATUS (0x1), SOC-DEV-PS-REQ (0x200) and
SOC-DEV-PS-ACK (0x208) at the 14.7 offsets and preserves ID-ordered
soc-device entries (DISPINT at 0x10, ANS at 0x21).

Add the corresponding KUnit test case gate_t6031_pmp_image_27_2 and
update the gate_t6031 comments for both 14.x and 27.2 images.

Signed-off-by: Acelogic <miguelc4600@gmail.com>
Drop the stale apple,t6031-dcp exemption from the apple,bw-scratch
requirement now that t6031-dcp.dtsi wires the internal DCP bandwidth
scratch slot.

Signed-off-by: Acelogic <miguelc4600@gmail.com>
Add apple,bw-scratch = <&pmgr_dcp 0 5 0x1208> to the T6031 internal
DCP node, pointing at PTD bandwidth request entry 577 in the disp-5
update window (0x2903d1208, matching T6030 internal slot layout and
immediately preceding T6031 dcpext0 at 0x1210). Firmware 27.2 requires
this dashboard slot to initialize the internal Liquid Retina XDR panel.

Signed-off-by: Acelogic <miguelc4600@gmail.com>
…T6031

Firmware 27.2 on the T6031 internal DCP announces AFK infrastructure
services on SYSTEM_ENDPOINT (ep:20) without EPIC identity properties,
matching T6030 (#3768). Enable afk_name_fallback on apple_dcp_hw_t6031
so those services bind by announced name under DCP_FIRMWARE_V_27_0.

Also set only_120hz_modes on apple_dcp_hw_t6031 and gate the
only_120hz_modes check in dcp_mode_settable() on DCP_FIRMWARE_V_27_0,
with a 14.7 non-regression check in parser_internal_v27_only_120hz.
Switching away from the 120 Hz boot timing crashes firmware 27.2 DCP
during ALPM/link teardown, while 14.7 fixed modes stay unaffected.

Signed-off-by: Acelogic <miguelc4600@gmail.com>
@Acelogic
Acelogic force-pushed the feat/t6031-v27-2-display branch from 2b77bf3 to 1ef7a8e Compare December 3, 2026 04:36
@Acelogic
Acelogic marked this pull request as ready for review December 3, 2026 04:36
@Acelogic
Acelogic requested review from a team as code owners December 3, 2026 04:36
@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) blast:m5 Macs affected, from Merge risk (bot) ci-failing A check failed at the PR head (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Dec 3, 2026
@github-actions

github-actions Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Merge readiness at 1ef7a8e1: not ready yet

Check Detail
CI at head running running: apple-build, dt-checks, host-tests, KUnit plan
Review ok approved by RyanTheTide
Requested changes ok none
Hardware row at head ok in the PR body at 1ef7a8e1
Conflicts ok none
PR text ok Risk: two-way · T6031 (M3 Max) internal display and PMP handoff on firmware 27.2, plus 14.7 T6031 (wiring apple,bw-scratch 0x1208 lets 14.7 T6031 probe past dcpgetbwscratchreg() where main currently refuses probe; only120hzmodes and afknamefallback are both gated on DCPFIRMWAREV270 so 14.7 fixed modes and AFK paths stay unchanged). T6030, T8122, T6034, T6050, and other SoCs are unchanged.

Areas: area:display, area:platform

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

@github-actions github-actions Bot removed the ci-failing A check failed at the PR head (bot) label Dec 3, 2026

@RyanTheTide RyanTheTide 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.

Approving at 1ef7a8e. All four review points are addressed: the t6031 bw-scratch schema exemption is gone; the Risk line now covers 14.7 T6031 probing past bw-scratch; the gate comments name both images; and only_120hz_modes is on T6031 with a new firmware-27 gate in dcp_mode_settable(), plus a KUnit case that 14.7 keeps every fixed rate. The T6050 profile is always firmware 27, so it is unaffected. Because #3693's paced rates key on only_120hz_modes plus firmware 27, T6031 will pick them up when that lands. Merge still needs the exact-head J516c boot row, and a 14.7 J516c row would settle the 0x1208 slot there.

@github-actions github-actions Bot removed the needs-review No approving review from Core or Omarchy Mac yet (bot) label Dec 3, 2026
@Acelogic

Acelogic commented Dec 3, 2026

Copy link
Copy Markdown
Member Author

Follow-up on 14.7 T6031 apple,bw-scratch reachability:

Verified against drivers/gpu/drm/apple/dcp.c: DCP_FIRMWARE_V_14_7 never reads apple,bw-scratch:

  • dcp.c:8999-9003: probe check already exempts DCP_FIRMWARE_V_14_7 (fw_compat != DCP_FIRMWARE_V_14_7 && ...).
  • dcp.c:7880-7905: dcp_comp_bind() returns early via iomfb_v14_7_bind(dcp) for DCP_FIRMWARE_V_14_7, before dcp_get_disp_regs(dcp) (dcp.c:7920 -> dcp_get_bw_scratch_reg() at dcp.c:6827) is reached.
  • iomfb_v14_7*.c has zero references to apple,bw-scratch or disp_bw_scratch (the only other reader in drivers/ is iomfb_m4.c:2683).
  • Both afk_name_fallback (afk.c:2065) and only_120hz_modes (iomfb.c:3903) are gated on DCP_FIRMWARE_V_27_0.

So this PR is completely inert on 14.7 T6031 and only takes effect on firmware 27.2 T6031.

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) blast:m5 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants