Repository navigation
drm/apple: iomfb: firmware 27.2: the AP link's release is A550 - #2063
DjDeveloperr merged 1 commit into
Conversation
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>
|
Data point for T6050 on firmware 27.3, confirming this PR's A550. It comes from the J716s's own 27.3 DCP image (
So A550 holds on T6050 27.3 as well, not only T8142 27.2. The other literals the J714s 27.0 sleep sends through
On my fork, a per-firmware tag table replaces those literals: 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. |
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>
04e2203
into
aurora-silicon:integration/aurora
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>
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_2has no entry fordcpep_unnamed_500. Sodcp_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'srefused: 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:
mov w9, #0x3030; movk w9, #0x4135, lsl #16('A500'), thenorr w8, w9, #0x1('A501') and the compares.#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: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