Skip to content

media: apple: ave: admit the T6050 26B123 encoder firmware build - #3395

Merged
DjDeveloperr merged 2 commits into
mainfrom
feat/ave-t6050-26b123
Dec 1, 2026
Merged

DjDeveloperr merged 2 commits into
mainfrom
feat/ave-t6050-26b123

Conversation

@erikwb

@erikwb erikwb commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

What: Admit the T6050 26B123 video encoder firmware build (TEXT 0x158000 CRC 0xd33ed3b4, DATA 0x134000, 26A428 command layout) in apple-ave so T6050 systems carrying that firmware build bind /dev/video*, encode H.264/HEVC in hardware, and gate venc0-sys to off-0 when idle.
Tested: J716c (16-inch M5 Max, T6050) at 0ecb9ae6c55b (paired with #3396 in batched trial kernel 3545ebecb76f; all 5 #3395 files blob-identical): all 6 devices bound (apple-dart x3, apple-jpeg x2, apple-ave firmware build 26B123, TEXT 0x158000 CRC d33ed3b4), all 8 /proc/iomem ranges present, 1080p30 H.264/HEVC v4l2m2m encodes pass (venc0-sys on -> off-0 6 s after close), 0 AVE/DART errors, initial boot smoke snapshot clean (1 failed system unit aurora-peripherals.service, same as baseline warm reboots; later checks recorded additional messages). Prior J716c encode and runtime-PM row at 56f475d3ccb8 and local checks at 0ecb9ae6c55b (QEMU KUnit 50/50, ave host 10/10, W=1 KCFLAGS="-Werror", checkpatch --strict) pass in Evidence.
Risk: two-way door · T6050 Macs carrying encoder firmware build 26B123 (J716c, J714s/c, K114/K116)
Revert: git revert -m 1 <merge-commit> removes the 26B123 entry from ave_t6050_builds[], ave_known_text_crc[], ave_layout_for_crc(), ave.h, and ave-abi-test.c, returning T6050 26B123 systems to -ENODEV; no persistent on-disk or firmware state is written.
Not yet: other T6050 boards (J714s/c, K114/K116) carrying 26B123 (affected peer hardware not in lab); companion upper-aperture DT mapping in #3396; hosted CI and review on the new head 0ecb9ae6c55b (prior review approved at 56f475d3ccb8 subject to #3396, an affected peer, and hosted CI).

Details

26B123 shares the 0x158000 TEXT / 0x134000 DATA sizes and zero text_boot_word (0, unlike 26A428's 0x4224) with 26C5035, and uses the same ave_layout_26a428 command layout. Adding its build table entry (ave_t6050_builds[]), known-CRC entry (ave_known_text_crc[]), and layout case (ave_layout_for_crc()) alongside 26B8125 (from #3447) enables hardware encode (ave_fw_find_build() disambiguates equal-size builds by TEXT CRC) and allows runtime PM to return venc0-sys, venc0-dma, venc0-pipe4/5, and venc0-me0/1 to off-0 after close.

Evidence
  • Local checks at 0ecb9ae6c55b (merged with origin/main 18058ea228e2, including #3447 26B8125):
    • git diff --check origin/main..HEAD: clean (0 errors)
    • git diff origin/main..HEAD | ./scripts/checkpatch.pl --strict -: 0 errors, 0 warnings, 0 checks (93 lines checked)
    • make LLVM=1 ARCH=arm64 W=1 KCFLAGS="-Werror" drivers/media/platform/apple/ave/ (defconfig + arch/arm64/configs/asahi.config, --disable RUST for C-only driver build): clean (0 errors, 0 warnings)
    • Arm64 QEMU KUnit apple-ave (./tools/testing/kunit/kunit.py run --arch=arm64 --make_options LLVM=1 --kunitconfig=drivers/media/platform/apple/ave/.kunitconfig): 50/50 passed (apple-ave-abi 24/24 including ave_t6041_text_boot_word covering 26A428, 26B123, 26C5035, and 26B8125)
    • Host tests (python3 -I tools/asahi/run-host-tests.py --only ave): 10/10 passed (ave-host, ave-recovery, ave-input, ave-ipc, ave-pm-tests, ave-probe-pm-tests, negative controls)
  • Review status: prior review approved at 56f475d3ccb8 with explicit landing gates: companion upper-aperture DT mapping in #3396, an affected peer, and hosted CI; hosted CI and review remain pending on 0ecb9ae6c55b.
  • Hardware verification at 0ecb9ae6c55b:
    • J716c (16-inch M5 Max, T6050, firmware 27.2, AC, default command line) in a one-shot batched trial kernel (origin/main b897ccb4e71c plus 18 open PR heads, commit 3545ebecb76f; all 5 #3395 files are blob-identical there): kernel image SHA-256 d56efde4c7232208bd29d5c4e5890319e0050595dd4f4b1c3844df6656a08312, one-shot Stage 2 SHA-256 b7d99286395ddd7dadccc6d9593f4bd55391d9e787af97c18b45f58688d9885d (default Stage 2 21edee972e1ff1718c6f41c32b91ee151afdc58cbb69f16f2f6a4d8d4c722170 and default kernel untouched):
    • Six bound devices: 2281020000.iommu, 22830a0000.iommu, 2283080000.iommu (apple-dart); 2281000000.jpeg, 2281060000.jpeg (apple-jpeg); 2283100000.video-encoder (apple-ave with firmware build 26B123 (TEXT 0x158000 CRC d33ed3b4, DATA 0x134000)).
    • Eight /proc/iomem ranges present: 2281000000-2281003fff, 2281020000-228102bfff, 2281060000-2281063fff, 2283050000-2283053fff, 2283080000-228308bfff, 22830a0000-22830abfff, 2283100000-228355bfff, 2283800000-2283ffffff.
    • Encode & PM: 1080p30 4 s ffmpeg -c:v h264_v4l2m2m and hevc_v4l2m2m encodes (120 frames each, ffprobe 1920x1080 30/1, ~3.12x / ~3x realtime, 4.0 MB each), venc0-sys on during each encode and off-0 6 s after (all venc0-* off-0 at idle), 0 AVE/DART errors.
    • 5-item smoke: display eDP-1 3456x2234@120 enabled; input Apple MTP keyboard, trackpad and SMC lid devices enumerated (not exercised remotely); networking wlan0 connected, 0% loss over 3 pings; permitted audio sink AppleJ716 + AppleJ716HPAI present with speakerguardd v2 active (no playback outside the linux#3085 row); GPU Borealis Apple M5 Max (G17C B1), renderD128, vkcube --c 180 --wsi wayland clean. 1 failed system unit (aurora-peripherals.service, same as baseline warm reboots; 0 new failed units), 0 failed user units, 0 LSM denials (no SELinux/AppArmor loaded), 0 Oops/BUG/fault lines; initial boot smoke snapshot err+ 40 lines against 55 on the default boot, none that the default boot lacks (apple-dcp ... unable to match service ..., systemd-gpt-auto-generator; later checks in the session recorded additional messages). Redacted dmesg excerpt: [ 1.250760] sn201202x 1-08: port controller ready; [ 2.677310] apple-ave 2283100000.video-encoder: firmware build 26B123 (TEXT 0x158000 CRC d33ed3b4, DATA 0x134000); [ 5.907044] apple-dcp 392e00000.dcp: RTKit: syslog message: ... fControllerPowerState 0 ...; [ 135.265810] PM: suspend entry (s2idle) / [ 140.691796] PM: suspend exit (pm_test=devices).
  • Prior J716c (16-inch M5 Max, T6050, default cmdline, with #3396) at 56f475d3ccb8 (before merging #3447 26B8125 from main):
    • apple-ave 2283100000.video-encoder: firmware build 26B123 (TEXT 0x158000 CRC d33ed3b4, DATA 0x134000)
    • ffmpeg -f lavfi -i testsrc2=size=1920x1080:rate=30:duration=1 -pix_fmt nv12 -c:v h264_v4l2m2m -b:v 4M <out.h264> (output path/args omitted in log): exit 0, output 540,034 B, speed 3.03x
    • ffmpeg ... -c:v hevc_v4l2m2m -b:v 4M <out.hevc>: exit 0, output 536,910 B, speed 2.40x
    • pm_genpd_summary after close: venc0-sys, venc0-dma, venc0-pipe4, venc0-pipe5, venc0-me0, venc0-me1 all off-0
    • Realtime 1080p60 H.264 encode (unplugged): 8,360 mW SW libx264 -> 4,858 mW HW AVE (-3,502 mW; heatpipe 3,752 -> 1,226 mW)

The T6050 26B123 encoder firmware build (TEXT 0x158000, DATA 0x134000,
TEXT CRC 0xd33ed3b4) matches the 26C5035 segment sizes and speaks the
26A428 command layout. Add AVE_FW_TEXT_CRC_T6050_26B123 to the T6050
build table, known-CRC list, command-layout matcher, and AVE ABI KUnit
expectations so the encoder binds, encodes H.264 and HEVC, and lets
venc0-sys runtime-suspend when idle.

Signed-off-by: Erik Bourget <[email protected]>
@erikwb
erikwb requested review from a team as code owners November 27, 2026 14:40
@erikwb
erikwb requested review from Acelogic and malik-na November 27, 2026 14:40

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The two builds with equal segment sizes are disambiguated by the second, CRC-qualified lookup in ave_fw_probe(). Both entries have the same TEXT normalization and command layout. I checked that reservation mapping, the loader's checksum comparison and unknown-build rejection are still enforced, and that the selection does not depend on a board name. The reported KUnit run and J716c H.264/HEVC results support code approval. Keep held until the companion upper-aperture DT mapping is resolved in #3396, with an affected peer and hosted CI before landing.

@github-actions github-actions Bot added area:media Area from CODEOWNERS (bot) blast:m5 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 Nov 27, 2026
@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Merge readiness at 0ecb9ae6: not ready yet

Check Detail
CI at head running running: pr-text / pr-text, KUnit isp, KUnit jpeg, KUnit prores, KUnit scaler, KUnit macsmc
Review ok approved by DjDeveloperr
Requested changes ok none
Hardware row at head ok in the PR body at 0ecb9ae6
Conflicts ok none
PR text ok Risk: two-way · T6050 Macs carrying encoder firmware build 26B123 (J716c, J714s/c, K114/K116) Revert: git revert -m 1 <merge-commit> removes the 26B123 entry from ave_t6050_builds[], ave_known_text_crc[], ave_layout_for_crc(), ave.h, and ave-abi-test.c, returning T6050 26B123 systems to -ENODEV; no persistent on-disk or firmware state is written.

Areas: area:media

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

@github-actions github-actions Bot added the merge-conflict Conflicts with the base branch (bot) label Nov 28, 2026
@erikwb

erikwb commented Nov 28, 2026

Copy link
Copy Markdown
Contributor Author

Merged origin/main (18058ea228e2, including #3447 26B8125) into feat/ave-t6050-26b123 at 0ecb9ae6c55b, resolving the conflicts in drivers/media/platform/apple/ave/ave-layout.c and drivers/media/platform/apple/ave/ave-abi-test.c so 26B123 (0xd33ed3b4), 26C5035 (0xc25b4ddb), and 26B8125 (0x1e27a926) coexist in ave_t6050_builds[] (build_count == 4), ave_known_text_crc[], ave_layout_for_crc() (&ave_layout_26a428), and ave_t6041_text_boot_word.

Local verification at 0ecb9ae6c55b:

  • git diff --check origin/main..HEAD clean and git diff origin/main..HEAD | ./scripts/checkpatch.pl --strict - passed (0 errors, 0 warnings, 0 checks).
  • make LLVM=1 ARCH=arm64 W=1 KCFLAGS="-Werror" drivers/media/platform/apple/ave/ (defconfig + arch/arm64/configs/asahi.config, --disable RUST for C-only driver build) compiled cleanly.
  • Arm64 QEMU KUnit (drivers/media/platform/apple/ave/.kunitconfig): 50/50 passed (apple-ave-abi 24/24).
  • Host tests (python3 -I tools/asahi/run-host-tests.py --only ave): 10/10 passed.

Hardware verification at 0ecb9ae6c55b:

  • J716c at 0ecb9ae6c55b (paired with #3396 in batched trial kernel 3545ebecb76f, where all 5 #3395 files are blob-identical): all six devices bound (2281020000.iommu, 22830a0000.iommu, 2283080000.iommu apple-dart; 2281000000.jpeg, 2281060000.jpeg apple-jpeg; 2283100000.video-encoder apple-ave with firmware build 26B123 (TEXT 0x158000 CRC d33ed3b4, DATA 0x134000)), all eight /proc/iomem ranges present, 1080p30 4 s ffmpeg -c:v h264_v4l2m2m and hevc_v4l2m2m encodes (120 frames each, ffprobe 1920x1080 30/1, about 3x realtime, 4.0 MB each), venc0-sys on during each encode and off-0 6 s after (all venc0-* off-0 at idle), 0 AVE/DART errors; initial boot smoke snapshot clean (1 failed system unit aurora-peripherals.service, same as baseline warm reboots; later checks recorded additional messages). Prior J716c 56f475d3ccb8 encode and runtime-PM row is retained in the PR body.

Landing gates from the prior approval at 56f475d3ccb8 remain: companion upper-aperture DT mapping in #3396, an affected peer board (J714s/c, K114/K116 carrying 26B123), and hosted CI (plus review) on 0ecb9ae6c55b.

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: FINISH at 0ecb9ae6c55b

Blockers: Please confirm public provenance for the new firmware-identification metadata. Keep #3396, an affected peer and hosted CI open.

Checked: The reported J716c target and KUnit results are useful. All five AVE file blobs changed across the merge, so I checked the current diff rather than carrying the old approval forward.

Evidence

Compared the current head, prior review and current PR receipts.

@github-actions github-actions Bot added ci-failing A check failed at the PR head (bot) and removed merge-conflict Conflicts with the base branch (bot) labels Nov 29, 2026
@erikwb

erikwb commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor Author

Provenance of the identification metadata this PR adds at 0ecb9ae6c55b. Every value is something Linux reads from the machine at probe time, or a label that public sources already use.

Value Where Linux gets it Public citation
TEXT size 0x158000, DATA size 0x134000 The two apple,asc-mem reserved-memory regions in the encoder's memory-region (read by ave_fw_segment()), which the loader builds from the ADT ave0 segment-ranges J716c ADT ave0 segment-ranges: TEXT 0x158000 at IOVA 0x0, DATA 0x134000 at IOVA 0x158000 (ADT values are hardware facts). Live DT on the J716c: asc-firmware@10000e98000 reg size 0x158000, asc-firmware@1000253c000 reg size 0x134000, both iommu-addresses on the encoder DART. Same sizes as the merged 26C5035 and 26B8125 entries (#3447 cites the K114s ADT for them).
TEXT CRC 0xd33ed3b4 Our own CRC32 of the preloaded TEXT region (ave_fw_crc()), cross-checked against the loader's /chosen aurora,ave-text-crc32 before it is used The loader property is documented in Documentation/admin-guide/media/apple-ave.rst and the DT binding, and exported by aura's AVE hand-off (tests/python/test_ave_handoff.py). J716c /chosen aurora,ave-text-crc32 = d33ed3b4 on the current default kernel and on both PR rows (56f475d3ccb8, 0ecb9ae6c55b). It is a checksum we compute on the user's machine, not data copied from the image.
text_boot_word 0 (no per-boot word) Follows from the above: the loader's whole-region CRC and the driver's identification CRC are the same value, so no word changes per boot Same d33ed3b4 on every J716c boot recorded since the first row, across cold and warm boots.
26A428 command layout Qualified on hardware, the way every other entry in ave_layout_for_crc() was H.264 and HEVC 1080p30 encodes at 0ecb9ae6c55b and 56f475d3ccb8 (rows in the PR body), 0 AVE/DART errors.
Build label 26B123 Only the string printed by dev_info(); selection uses size and CRC, never the label The public build label the public aurora-installer docs already list for J716c. main already uses the same label for the 26B123 builds of T8112, T8122, T8132 and T8142 in this driver, and for the T6050 Neural Engine (ane_t6050_platform_26b123 in drivers/accel/ane/ane_fw_platform.c) and the T6050 GPU's V26B123_M5 variant (drivers/gpu/drm/asahi/hw/t6050.rs).

The driver change is a table entry: no board, chip or firmware-version gate decides anything. Any T6050 whose loader hands over TEXT/DATA of these sizes with this CRC binds; any other CRC still gets -ENODEV.

One caveat on the label: a 27.2.1 (26B131) install may carry the same encoder image. If it does, it will match this entry and log 26B123 (as ave.h already records for the T8142 26B123 build); if it differs, its CRC differs and it is refused as before. The label is cosmetic either way.

Remaining gates unchanged: #3396 (approved at its head e82ed13d64e7, hosted checks green, still needs the team review GitHub requires), an affected peer board, and the hosted KUnit jobs still queued at 0ecb9ae6c55b.

@github-actions github-actions Bot removed the ci-failing A check failed at the PR head (bot) label Nov 30, 2026
@tully-8888

Copy link
Copy Markdown
Contributor

Companion J714s hardware data point for T6050 firmware 26B123 (TEXT 0x158000 CRC d33ed3b4, DATA 0x134000 CRC 12266f5a):

  • Machine: 14-inch MacBook Pro M5 Pro (apple,j714s, apple,t6050), asahi,os-fw-version: 27.2, asahi,system-fw-version: 27.2.
  • Kernel tested: linux-aurora 7.3.0-17.v272-24-ARCH (carrying the downstream probe-only 26B123 patch with apple_ave.ave_t6050_27_2_layout=1, which selects the 26A428 command layout — note: this is not a kernel compiled directly from 0ecb9ae6c55b, so it is a companion firmware/layout verification rather than an at-head row for this PR).
  • Workload: 120-frame 1920x1080 NV12 synthetic moving pattern encoded twice per codec via ffmpeg (h264_v4l2m2m / hevc_v4l2m2m, 4 Mbps, 30 fps):
    • H.264: 120/120 frames, 7.95x realtime (0.49 s), 345,549 bytes, deterministic MD5 ac955ee9d0f0a7ece227e87f8fcffe63 across both runs, ffprobe reports h264 Main 1920x1080 nb_read_frames=120.
    • HEVC: 120/120 frames, 7.50x realtime (0.52 s), 253,056 bytes, deterministic MD5 279844de2a331eed8e7d03967d6750c0 across both runs, ffprobe reports hevc Main 1920x1080 nb_read_frames=120.
  • Kernel log / PM: 0 DART or AVE faults (DART0/DART1: 16 streams, 2 live, 0 unsafe before and after start), clean runtime PM return to suspended.

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

Approved. The 26B123 entry has the same TEXT and DATA sizes as 26C5035 and 26B8125, and ave_fw_probe() chooses between same-size builds by TEXT CRC, so the other T6050 builds still match their own entries. Only a T6050 running 26B123 reaches the new entry, and the J716c row at this head covers it. CI is green.

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

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: MERGE at 0ecb9ae6c55b

Converts this App's earlier review at the same head to an approval under the 12-01 merge bar (better than before and doesn't break; block only on a shown failure). No code blocker was found in it. The merge gate (a row on one Mac at this head + fast CI) is tracked by pr-readiness, not held here.

Checked: The reported J716c target and KUnit results are useful. All five AVE file blobs changed across the merge, so I checked the current diff rather than carrying the old approval forward.

Follow-ups (not blocking): confirm public provenance of firmware-ID metadata, #3396, hosted CI (peer not required)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:media Area from CODEOWNERS (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