Skip to content

drm/apple: enable AFK name fallback on T6041 internal DCP - #4070

Open
allanclempe wants to merge 1 commit into
aurora-silicon:mainfrom
allanclempe:fix/t6041-dcp-afk-name-fallback
Open

allanclempe wants to merge 1 commit into
aurora-silicon:mainfrom
allanclempe:fix/t6041-dcp-afk-name-fallback

Conversation

@allanclempe

Copy link
Copy Markdown
Contributor

What: Set .afk_name_fallback = true on apple_dcp_hw_t6041 so the T6041 internal DCP on macOS 27.2 (26B123, DCP_FIRMWARE_V_27_0) accepts AFK ep:20 infrastructure announcements that omit EPIC identity properties instead of failing with AFK[ep:20]: failed to extract init props: -2.
Tested: J616c (MacBook Pro 16" M4 Max, macOS 27.2 / 26B123 stub) at a1218aef0: scripts/checkpatch.pl --strict --no-tree (0 errors, 0 warnings, 0 checks) and tools/asahi/dcpext26-startup-tests.py PASS; identical .afk_name_fallback = true change booted live on J616c (linux-aurora 7.3.0-1-3.1-ARCH, built on db6da7821954) with 0 err..emerg kernel messages, 0 failed systemd units, and 402e00000.dcp AFK ep:20 channel 1 (system) bound.
Risk: two-way door · T6041 Macs (apple,t6041-dcp internal DCP only; external dcpext and other SoCs untouched).
Not yet: Kernel rebuild and cold boot directly at rebased head a1218aef0 (live boot verification ran on db6da7821954 with the identical T6041 flag); J614c (14" M4 Max) and T6040 (M4 Pro) hardware runs.

Details

apple_dcp_hw_t6030, apple_dcp_hw_t6031, and apple_dcp_hw_t8122 already enable .afk_name_fallback = true for firmware-27 internal DCPs, while apple_dcp_hw_t6041 still omitted it. On J616c (402e00000.dcp) running 26B123 (DCP_FIRMWARE_V_27_0), afk_recv_handle_init() logged:

apple-dcp 402e00000.dcp: AFK[ep:20]: failed to extract init props: -2

on every boot and left ep:20 channel 1 (system) unbound, while the four external apple,t6041-dcpext instances already took the dcp_has_external_output() fallback and bound cleanly. Setting .afk_name_fallback = true on apple_dcp_hw_t6041 matches the other firmware-27 internal DCPs and keeps non--ENOENT parse errors untouched. Also updates the stale comment in drivers/gpu/drm/apple/afk.c.

Evidence
  • git format-patch -1 --stdout | perl scripts/checkpatch.pl --strict --no-tree -: 0 errors, 0 warnings, 0 checks, 16 lines checked
  • python3 tools/asahi/dcpext26-startup-tests.py:
    • PASS native AFK announcements through deferred OPEN
    • PASS native D121 through actual shared-memory command and ACK bodies
  • Live J616c (apple,j616c, apple,t6041, os-fw-version / system-fw-version 26B123) running 7.3.0-1-3.1-ARCH (db6da7821954 + .afk_name_fallback = true on apple_dcp_hw_t6041):
    • journalctl -k -b -p err..emerg: 0 lines (AFK[ep:20]: failed to extract init props: -2 gone)
    • systemctl --failed: 0 failed units
    • 402e00000.dcp internal display (3456x2234, notch shown) and external display outputs operate normally

On the MacBook Pro 16-inch M4 Max (J616c, apple,t6041-dcp) booting with
macOS 27.2 (26B123, DCP_FIRMWARE_V_27_0) firmware, the internal DCP's
AFK ep:20 announces infrastructure services without EPIC identity
properties. Without .afk_name_fallback set on apple_dcp_hw_t6041,
afk_recv_handle_init() rejects the -ENOENT parse result with:

  apple-dcp 402e00000.dcp: AFK[ep:20]: failed to extract init props: -2

leaving ep:20 channel 1 (system) unbound on every boot, whereas the four
external apple,t6041-dcpext instances already take the external-output
fallback and bind cleanly, and T6030/T6031/T8122 internal DCPs already
set .afk_name_fallback = true.

Enable .afk_name_fallback = true on apple_dcp_hw_t6041 and update the
matching comment in afk.c.

Signed-off-by: Allan Clempe <allan.clempe@gmail.com>
@allanclempe
allanclempe requested review from a team as code owners December 3, 2026 06:11
@github-actions github-actions Bot added area:display Area from CODEOWNERS (bot) blast:m4 Macs affected, from Merge risk (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 a1218aef: ready to merge

Check Detail
CI at head ok 4 checks passed
Review ok approved by RyanTheTide
Requested changes ok none
Hardware row at head ok in the PR body at a1218aef
Conflicts ok none
PR text ok Risk: two-way · T6041 Macs (apple,t6041-dcp internal DCP only; external dcpext and other SoCs untouched).

Areas: area:display
Merge: gh pr merge 4070 --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.

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

The flag only changes the missing-property fallback on the T6041 internal DCP under firmware 27. Existing firmware and other AFK parse errors keep their current handling. The J616c backport demonstrates the missing identity announcement now binds. Exact-head cold boot is still pending.

@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 3, 2026
@DjDeveloperr

Copy link
Copy Markdown
Contributor

Read at a1218aef: the flag only opens the missing-identity path for the T6041 internal DCP on firmware 27 (fw_compat == DCP_FIRMWARE_V_27_0), so 26.x and the external DCPs keep their path. It applies cleanly to main c09b61228e62.

One row before the merge, since binding ep:20 system is new on this DCP and main's firmware-27 sleep for it (#3687, #3861) was only run without it. J616c on 27.2 at this head: one cold boot (ep:20 channel 1 bound, 0 err lines), DPMS off/on, s2idle x1 and rtcwake -d rtc1 -m mem -s 20 x2 with the panel, backlight and external displays back. With that it merges.

This branch has not been deployed

No deployments
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) blast:m4 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