Skip to content

apple: t6041: firmware-27 XRGB alpha fix and #1954 follow-ups - #2492

Merged
DjDeveloperr merged 4 commits into
aurora-silicon:integration/aurorafrom
astaff:t6041/j616c-fw27-followups
Nov 20, 2026
Merged

DjDeveloperr merged 4 commits into
aurora-silicon:integration/aurorafrom
astaff:t6041/j616c-fw27-followups

Conversation

@astaff

@astaff astaff commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Follow-ups to #1954 for J616c (T6041) on macOS 27.2 firmware:

  • drm/apple (apple_drv.c): Extend xrgb_is_alpha on DCP_FIRMWARE_V_27_0 to apple,t6041-dcp and apple,t6041-dcpext. Like T8142 (43f89808a996), T6041 firmware 27 ignores is_premultiplied and blends byte 3 of DCP_FORMAT_BGRA (XRGB8888) as straight alpha; AGX PIPE_FORMAT_B8G8R8X8_UNORM leaves PBE Swizzle A at channel 0 (X = R), turning R = 0 blues and cyans black on the panel while screenshots look normal. Offering only alpha formats (ARGB8888 / ARGB2101010) fixes panel colors.
  • soc: apple: display-gate: Clarify the unapproved firmware-27 log message and KUnit case name in gate_t6041_max_run(), since gate_t6041_internal() already refuses an unapproved firmware-27 internal DCP.
  • accel/ane: Scope H16 ane_h16_dart_protection() refusal at MAP time (require_dart_unlocked) to the H16 27.2 26B123 profile while keeping DART protection logging on all H16 profiles.
  • soc: apple: aop: Check that the firmware bootarg table declares a single 8-byte ED0p entry (bootargs_has_ed0p()) before check_fw_regions() accepts a translated external data segment outside EC0p.

Testing

  • Hardware (J616c / T6041, macOS 27.2.1 26B131 DCP firmware): verified niri selects AR24 (ARGB8888) at 3456x2160@120 on eDP-1 with normal panel colors and 0 faults.
  • Host & build checks: aop-bootargs-tests.py, dcpext26-crossbar-union-tests.py, t6040-calibration-tests.py, apple-dcp/run.py (89/89), and ARCH=arm64 LLVM=1 C/Rust/KUnit builds.

Like T8142 on firmware 27 (43f8980), T6041 internal and external
display processors running macOS 27.2 firmware (DCP_FIRMWARE_V_27_0)
ignore is_premultiplied and blend the fourth byte of a DCP_FORMAT_BGRA
(XRGB8888) surface as straight alpha. On AGX, PIPE_FORMAT_B8G8R8X8_UNORM
leaves the 2-bit PBE Swizzle A selector at channel 0 (Red), storing
X = R in DRAM and multiplying every displayed pixel by R / 255 — turning
R = 0 blues and cyans black while screenshots look right.

Extend xrgb_is_alpha to apple,t6041-dcp and apple,t6041-dcpext on
DCP_FIRMWARE_V_27_0 so Wayland compositors select ARGB8888/ARGB2101010.

Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
gate_t6041_internal() already refuses an unapproved firmware-27 internal
DCP, so the guard in gate_t6041_max_run() does not leave an internal
display enabled; update the log message and KUnit case name to match.

Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
ane_h16_map() ran ane_h16_dart_protection(b, true) across all H16
profiles, including the 26.x profiles on apple,t6041-ane (T6040/T6041)
and apple,t8132-ane. Add require_dart_unlocked to struct ane_h16_profile
and enable it on the H16 27.2 (26B123) profile so all H16 boards still
log the three DART protection words at map time while 26.x profiles keep
their prior MAP admission.

Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
check_fw_regions() accepted a second translated memory-region on any
apple,t6041-aop or apple,t8132-aop board before probe checked whether
the firmware's bootarg table declared ED0p. Inspect the bootarg table
upfront with bootargs_has_ed0p() and pass allow_ed0p into
check_fw_regions() so a translated region outside EC0p is refused before
AopData::new() unless a single 8-byte ED0p entry is present.

Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
@DjDeveloperr

Copy link
Copy Markdown
Contributor

Review of b224fde against integration/aurora e0ee46a. It merges cleanly, and CI is green on this head. The three follow-up PRs are also being built together on today's base in #2532 (CI only), because integration has moved under ane_h16_backend.c and apple_drv.c since this PR's run.

Nothing here reaches the J700 (T8140) or the M5 Pro (T6050). The AOP change applies only to the fw_regions configs (T6040/T6041/T8132). The ANE change is limited to H16. The DCP change is limited to the T604x compatibles. The ANE change also answers what we raised on #1954 about the refusal on the 26.x H16 profiles and the T8132. Thanks.

Two notes. Neither blocks the merge:

  1. xrgb_is_alpha also reaches the M4 Pro. apple,t6041-dcp and apple,t6041-dcpext are also the T6040 compatibles (t604x.dtsi:660, t604x-extdisp.dtsi:11/49, t6040-j614s-extdisp-hdmi.dtsi:43). This change therefore also covers J614s/J616s/J773s once they run firmware 27. Since it is the same DCP firmware, that is probably right, but the commit message and the comment only mention T6041. Saying "T6040/T6041" there would match what the code does. A J616s row on 27.2 would confirm it.
  2. bootargs_has_ed0p() makes a malformed ED0p fatal on boards that don't need it. It runs on every probe of a fw_regions board, the M4 mini on 26.x included, and its error is fatal (?). A duplicate ED0p, or one that isn't 8 bytes, now fails probe even when no region is translated. Before, patch_bootargs() with ED0p = None skipped those checks. We don't know of any firmware with such a table. Calling it only once check_fw_regions() has found a translated region other than __ETEXT would keep the 26.x boards independent of it.

The M4 mini (T8132 AOP/ANE) gets a no-regression row after the merge.

@DjDeveloperr
DjDeveloperr merged commit f5931f9 into aurora-silicon:integration/aurora Nov 20, 2026
7 checks passed
@DjDeveloperr

Copy link
Copy Markdown
Contributor

Merged as f5931f9 (head b224fde onto integration/aurora e0ee46a).

Checks before the merge:

This code does not run on the J700 or the M5. The no-regression checks that follow are:

  • an AOP and ANE row on the M4 mini (T8132);
  • a firmware-27 panel-colour check on a T6040 once one runs 27.2, because xrgb_is_alpha reaches the M4 Pro through the shared compatibles.

A revert is ready if either check fails. The two notes in the review comment above still stand as follow-ups.

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.

2 participants