Skip to content

drm/apple: iomfb: firmware 27.2: the AP link's release is A550 - #2063

Merged
DjDeveloperr merged 1 commit into
aurora-silicon:integration/aurorafrom
sithglan:thomas/dcp-27.2-a550
Nov 17, 2026
Merged

DjDeveloperr merged 1 commit into
aurora-silicon:integration/aurorafrom
sithglan:thomas/dcp-27.2-a550

Conversation

@sithglan

Copy link
Copy Markdown
Contributor

Firmware 27.2 moved the AP link's release from A500 to A550. A firmware sleep is the only thing that sends that message, and 27.2 moved it together with the IOMFB calls around it. dcp_methods_27_2 has no entry for dcpep_unnamed_500. So dcp_s2r_capable() is false on 27.2, and the DCP's firmware stop never runs there. On the J813 that showed up as the sleep driver's refused: a bound display coprocessor is still running / dcp didn't stop: control 0x10 status 0xcc.

Evidence

The firmware does the comparison in code, not through a table:

  • t8142dcp 26A428 (27.0), 0x1de0dc: mov w9, #0x3030; movk w9, #0x4135, lsl #16 ('A500'), then orr w8, w9, #0x1 ('A501') and the compares.
  • t8142dcp 26B123 (27.2), 0x1df68c: the same instructions with #0x3530 ('A550', 'A551').

No other tag in either image is compared this way. The rest go through the method table.

Tested

On a J813 with the 27.2 stub, on top of #1941's DPMS-off firmware stop (appledrm.s2r_untested=1) and the #2043 sleep test kernel:

  • With this entry, the DCP's firmware stops on DPMS off.
  • The sleep driver's coprocessor check then passes ("7 coprocessors up and stopped").
  • Turning the panel back on restarts the DCP's firmware.

Without the entry, neither happens. The change is the one table line; it builds in that tree, and checkpatch is clean.

cc @Acelogic @DjDeveloperr @RyanTheTide @LiamRay10

Firmware 27.2 moved the unnamed A500, the AP link's release that only a
firmware sleep sends, to A550, together with the IOMFB calls around it:
t8142dcp 26B123 compares 'A550' and 'A550' | 1 at 0x1df68c, in the
dispatch whose 26A428 copy at 0x1de0dc compares 'A500' and 'A501'.

Without the entry dcp_s2r_capable() is false on 27.2, so the DCP never
stops for a sleep.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
@rolotrealanis98

Copy link
Copy Markdown
Contributor

Data point for T6050 on firmware 27.3, confirming this PR's A550. It comes from the J716s's own 27.3 DCP image (t605xdcp, 26C5035r):

  • The release is the same in-code compare as in your 27.2 T8142 image: mov w9,#0x3530; movk w9,#0x4135,lsl #16 at 0x41ad070, with orr w8,w9,#1 for 'A551'.
  • The T6050 27.0 image (26A428) has #0x3030 ('A500') at 0x41a6a48.
  • The 27.3 A550 handler is instruction-identical to the 27.0 A500 handler (one pointer offset differs). Both check w3 >= 4.

So A550 holds on T6050 27.3 as well, not only T8142 27.2.

The other literals the J714s 27.0 sleep sends through iomfb_v27_call() (dcp-v27-sleep.inc) map like this on T6050 27.3:

27.0 27.3 basis
A484 set_power_state A535 identical handler; also seen in a 27.3 DCP capture
A414 A464 capture
A489 A540 capture
A487 A538 identical handler; capture
A412 A462 identical handler; capture
A115 A115 handler likeness only
A442 A492 handler likeness only

On my fork, a per-firmware tag table replaces those literals: 83b3dafc746b on branch j716s-dcp-sleep-27.3. The J714s on 27.0 sends exactly what it sends today, and an unknown board or firmware sends nothing (which also covers what #2070 refuses). It hasn't run on hardware yet. Untested on 27.3: set_power_state(0), A550 itself, and the restart after a power-down.

If it would help, I can open it as a PR on top of this one once it has run on the J716s, or earlier as a draft.

gig3m pushed a commit to gig3m/linux that referenced this pull request Nov 17, 2026
hw.s2r stops the internal DCP's firmware and powers its domains off when
the display is turned off, and restarts it warm on DPMS on. Only T8140
had the data for it. This adds what T8142 needs:

- the power words and DART streams become a per-SoC layout
  (dcp_s2r_layout), with T8140's values unchanged and T8142's derived
  from the macOS 27.2.1 device tree and PMGR (DISP_SYS at 0x290,
  retention words 0x11cc/0x11f0, no exclave streams, no pmc-dcp);
- the firmware 27 sleep calls: set_power_state, D572 (powerUpDART) and
  the AP link's release, which 27.0 dispatches as A500 and 27.2 as A550
  (aurora-silicon#2063, the first commit of this series). A build whose table has no
  tag for the release (27.3 so far) is not offered the stop;
- T8142 has no DCP secure mailbox (no dcp-exclave-mailbox in the 27.0 or
  the 27.2.1 device tree of a J813), so the stop no longer requires one
  on this SoC (s2r_no_secure_port).

The stop stays off by default on T8142 (appledrm.s2r_untested=1 enables
it). On firmware 27.2 it also needs the DCP to run the firmware 27
interface there, which aurora-silicon#1683 ("drm/apple: dcp: T8142: Drive the macOS
27.2 firmware") adds; without it a 27.2 J813 runs H17P and the stop is
not offered.

This is a screen-off (DPMS) power saving. A SoC behind
appledrm.s2r_untested does not take the stop's system sleep path.

Tested on a J813 (MacBook Air 13" M5) with appledrm.s2r_untested=1:
- firmware 27.0, on this series with and without the option: DPMS off
  stops the firmware, DPMS on restarts it ("RTKit: Initializing") and
  the panel comes back at its brightness, 6 of 6 cycles. System power
  with the screen off (SMC PSTR, on battery, 12 and 15 samples): 2.72 W
  without the stop, 1.81 W with it.
- firmware 27.2 (t8142dcp 26B123), with the A550 entry: DPMS off logs
  "IOMFB: power on -> off" and "power_down_M3: disabling M3", DPMS on
  restarts the firmware ("RTKit: Initializing") and the panel comes back
  at its brightness, 3 of 3 cycles. Screen-off system power (SMC PSTR,
  on AC at the charge limit, 8 samples per cycle, 3 cycles each, the
  same boot setup with appledrm.s2r_untested=0 for the other side):
  4.84 W without the stop, 3.91 W with it.

m0d16l14n1 ran it on a J815 on firmware 27.2 with the A550 entry: 4 DPMS
cycles over 3 boots, the firmware stopped and restarted each time.

The driver part is from m0d16l14n1's J815 sleep work
(m0d16l14n1#1, 192a56c), without its hibernation and deep
sleep pieces; the secure mailbox change and the J813 test are new.

Assisted-by: Claude Opus 5.5
Assisted-by: Claude Fable 5.2
Signed-off-by: Kyle Arrington <kyle@arrington.co>
@DjDeveloperr
DjDeveloperr merged commit 04e2203 into aurora-silicon:integration/aurora Nov 17, 2026
1 check passed
gig3m pushed a commit to gig3m/linux that referenced this pull request Nov 17, 2026
hw.s2r stops the internal DCP's firmware and powers its domains off when
the display is turned off, and restarts it warm on DPMS on. Only T8140
had the data for it. This adds what T8142 needs:

- the power words and DART streams become a per-SoC layout
  (dcp_s2r_layout), with T8140's values unchanged and T8142's derived
  from the macOS 27.2.1 device tree and PMGR (DISP_SYS at 0x290,
  retention words 0x11cc/0x11f0, no exclave streams, no pmc-dcp);
- the firmware 27 sleep calls: set_power_state, D572 (powerUpDART) and
  the AP link's release, which 27.0 dispatches as A500 and 27.2 as A550
  (aurora-silicon#2063). A build whose table has no
  tag for the release (27.3 so far) is not offered the stop;
- T8142 has no DCP secure mailbox (no dcp-exclave-mailbox in the 27.0 or
  the 27.2.1 device tree of a J813), so the stop no longer requires one
  on this SoC (s2r_no_secure_port).

The stop stays off by default on T8142 (appledrm.s2r_untested=1 enables
it). On firmware 27.2 it also needs the DCP to run the firmware 27
interface there, which aurora-silicon#1683 ("drm/apple: dcp: T8142: Drive the macOS
27.2 firmware") adds; without it a 27.2 J813 runs H17P and the stop is
not offered.

This is a screen-off (DPMS) power saving. A SoC behind
appledrm.s2r_untested does not take the stop's system sleep path.

Tested on a J813 (MacBook Air 13" M5) with appledrm.s2r_untested=1:
- firmware 27.0, on this series with and without the option: DPMS off
  stops the firmware, DPMS on restarts it ("RTKit: Initializing") and
  the panel comes back at its brightness, 6 of 6 cycles. System power
  with the screen off (SMC PSTR, on battery, 12 and 15 samples): 2.72 W
  without the stop, 1.81 W with it.
- firmware 27.2 (t8142dcp 26B123), with the A550 entry: DPMS off logs
  "IOMFB: power on -> off" and "power_down_M3: disabling M3", DPMS on
  restarts the firmware ("RTKit: Initializing") and the panel comes back
  at its brightness, 3 of 3 cycles. Screen-off system power (SMC PSTR,
  on AC at the charge limit, 8 samples per cycle, 3 cycles each, the
  same boot setup with appledrm.s2r_untested=0 for the other side):
  4.84 W without the stop, 3.91 W with it.

m0d16l14n1 ran it on a J815 on firmware 27.2 with the A550 entry: 4 DPMS
cycles over 3 boots, the firmware stopped and restarted each time.

The driver part is from m0d16l14n1's J815 sleep work
(m0d16l14n1#1, 192a56c), without its hibernation and deep
sleep pieces; the secure mailbox change and the J813 test are new.

Assisted-by: Claude Opus 5.5
Assisted-by: Claude Fable 5.2
Signed-off-by: Kyle Arrington <kyle@arrington.co>
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.

3 participants