Skip to content

arm64: dts: apple: t6050: enable the media engines on every board - #2278

Draft
RyanTheTide wants to merge 2 commits into
mainfrom
dtfill-t6050/media
Draft

RyanTheTide wants to merge 2 commits into
mainfrom
dtfill-t6050/media

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 19, 2026 •

Copy link
Copy Markdown

Problem

The video encoder (ave0), the first ProRes engine (apr0) and both JPEG engines are enabled only on the J714s. The video decoder (avd0) is enabled only on the J714c, J714s, J775d and K116s. Every T6050 board's ADT has these engines at the same addresses, with the same interrupts, DART streams and power states. So the J716c, J716s, J775c, J873s, K114c, K114s, K116c and K116s have no hardware video decode, and no board but the J714s has hardware encode, ProRes or JPEG.

Change

  • New t6050-media.dtsi: the J714s enables for the decoder, encoder, ProRes and JPEG engines, their DARTs and power states (pmgr4, FAB1_SOC always-on, AVD_SYS, FAB0_PIOGW and FAB7_SOC firmware-owned, SCODEC, FAB1_PIOGW firmware-owned, FAB0_SOC always-on, VENC0_*, JPG).
  • Every T6050 board includes it after t6050-peripherals.dtsi. The J714s, J714c and K116s lose their copies of these blocks.
  • J775d: the decoder part is skipped (#ifndef T6050_J775D), because t6050-ultra.dtsi already describes both dies' decoders enabled.
  • Every DART enabled here carries its engine's power state: dart-ave0 (both instances) VENC0_SYS, dart-apr0 SCODEC, dart-jpeg0 JPG, dart-avd0 AVD_SYS.
  • ave1 and apr1 (the M5 Max's second encoder and ProRes engine) stay disabled. The boot loader hands over only the first T6050 encoder's preloaded firmware (aura dt_set_ave() takes the first apple,t6050-ave node and ADT ave0), and the AVE driver refuses an encoder without its two preloaded segments (ave-fw.c ave_fw_probe()). The ProRes driver's T6050 variant needs the first engine's core/wrapper/aux/ctrl windows and SCODEC rows. apr1 is in the PRORES power state with a different window layout, and no variant describes that. The new file says this in a comment.
  • The AVE firmware preload is handed over by compatible, not by board, so no loader change is needed for the new boards. AVD uses the open firmware file (apple/avd-fw-v5-t2.bin). ProRes and JPEG need no firmware.

The J714s blocks were written by DjDeveloperr, the J714c decoder block by Eduard Moldovan, and the K116s decoder block by Jens Axboe.

Testing

  • Full kernel tree make dtbs CHECK_DTBS=y (dtschema) for every T6050 DTB on this branch: builds clean, no dtc warnings, and no schema message that integration/aurora does not already have.
  • DTBs built for all 11 T6050 boards with kbuild's cpp and dtc flags. No dtc warnings before or after.
  • J714s: byte-identical DTB with the first commit; the second commit adds only the three reg-names properties.
  • All other boards changed. On every board, each media node now has the same status, apple,always-on and apple,firmware-owned as on the J714s. The only change to an already-enabled node is that the J714c's FAB1_SOC gains apple,always-on, which the J714s, K116s and J775d already have.
  • dt-validate: the second commit names the second register window of dart-ave0 (both instances) and dart-jpeg0 (dapf / auxiliary, from the DART instances in the ADT), which the binding requires. That removes the 3 reg-names messages the J714s already had, and no board gains a message. No new compatibles. The driver behaves the same: it uses a dapf window only with apple,dapf-ranges, and never uses auxiliary.

Still to run (owner rows, per board)

Same four rows on every board. Device numbers come from v4l2-ctl --list-devices.

  1. Decode: H.264, HEVC and AV1 clips through gst-launch-1.0 filesrc ! parsebin ! v4l2slh264dec|v4l2slh265dec|v4l2slav1dec ! video/x-raw,format=NV12 ! filesink. The output must be bit-exact (md5) with ffmpeg -i <clip> -f rawvideo -pix_fmt nv12. Use real content, not test-source clips.
  2. Encode: gst-launch-1.0 videotestsrc num-buffers=600 ! video/x-raw,format=NV12,width=1920,height=1080,framerate=60/1 ! v4l2h264enc ! h264parse ! mp4mux ! filesink location=ave.mp4. Expect a 10 s file with 600 frames in ffprobe. dmesg must show the encoder probing with a known firmware build.
  3. ProRes: one frame through tools/asahi/prores-enc on the apr0 node. ffmpeg must decode the output.
  4. JPEG: gst-launch-1.0 videotestsrc num-buffers=1 ! video/x-raw,format=NV12,width=1920,height=1080 ! v4l2jpegenc ! filesink location=t.jpg on each of the two JPEG nodes. djpeg t.jpg must decode.

Owners: J714s DjDeveloperr (no-regression only). J714c Eduard Moldovan. J716c erikwb. J716s rolotrealanis98. J775c DjDeveloperr. J775d funkzy. K114c joshuaswarren. K116s axboe. J873s, K114s and K116c have no owner yet.

Dependencies:

  • Encode needs a boot loader with the T6050 AVE handoff (aura main has it), on a boot whose iBoot preload is a build the driver admits. The driver admits macOS 27.0 (26A428) and 27.3 beta 1 (26C5035). A board running a 27.2 stub needs the 27.2 T6050 build admitted in drivers/media/platform/apple/ave/ave-drv.c (ave_t6050_builds). No open PR does this.
  • J775c: arm64: dts: apple: support M5 Max Mac Studio (J775c) #2102 replaces t6050-j775c.dts with a flattened tree in which these nodes stay disabled. Whichever lands second needs the enables (or the include) carried over.
  • K116s: T6050: firmware-driven deep sleep on the K116s (16-inch M5 Pro, firmware 27.2) #2201 enables FAB1_PIOGW, FAB0_SOC and VENC0_SYS at the end of t6050-k116s.dts for deep sleep. The values match this file. The text conflicts with the removed decoder block, and resolving it is trivial.
Per-board values and DTB diffs

Values: every board's ADT has avd0/dart-avd0, ave0/dart-ave0, apr0/dart-apr0, jpeg0/jpeg1/dart-jpeg0 with the same reg, interrupts, power and clock gates as the J714s (compared across all 11 boards). The node descriptions themselves are unchanged in t6050-peripherals.dtsi and t6050-ultra.dtsi.

Nodes enabled per board (status disabled -> okay unless noted):

  • J714s: none (byte-identical).
  • Common set (call it E): ave0, dart-ave0 x2, apr0, dart-apr0, jpeg0, jpeg1, dart-jpeg0. FAB7_SOC, FAB1_PIOGW (firmware-owned), FAB0_SOC (always-on), SCODEC, JPG, VENC0_SYS/DMA/PIPE4/PIPE5/ME0/ME1.
  • J714c: E, FAB0_PIOGW (firmware-owned), and FAB1_SOC gains always-on.
  • J716c: E, plus pmgr4, FAB1_SOC (always-on), AVD_SYS, avd, dart-avd0. FAB0_PIOGW was already enabled.
  • J716s, J775c, J873s, K114c, K114s, K116c: as J716c, plus FAB0_PIOGW (firmware-owned).
  • J775d: E and FAB0_PIOGW (firmware-owned). The decoders were already enabled by t6050-ultra.dtsi.
  • K116s: E. The decoder and FAB0_PIOGW were already enabled.

ave1, dart-ave1 x2, VENC1_*, apr1, dart-apr1 and PRORES stay disabled on every board.

DTB diffs (decompiled, phandles normalised) are in the branch's build evidence. Each one only flips status and adds apple,always-on/apple,firmware-owned on the nodes above.

The video encoder (ave0), the first ProRes engine (apr0) and both JPEG
engines were enabled only on the J714s, and the video decoder (avd0) only
on the J714c, J714s, J775d and K116s. Every T6050 board's ADT has these
engines at the same addresses, with the same interrupts, DART streams and
power states, so describe their enables once.

Add t6050-media.dtsi with the J714s enables for the decoder, encoder,
ProRes and JPEG engines, their DARTs and their power states, and include it
from every T6050 board after t6050-peripherals.dtsi. The J714s, J714c and
K116s lose their copies of these blocks. The J775d keeps the decoders that
t6050-ultra.dtsi describes enabled; the shared file leaves them alone there.

Every DART enabled here already carries its engine's power state
(dart-ave0 both instances: VENC0_SYS, dart-apr0: SCODEC, dart-jpeg0: JPG,
dart-avd0: AVD_SYS). The encoder's firmware preload is handed over by the
boot loader by compatible, so it needs no per-board change.

The second encoder (ave1) and the second ProRes engine (apr1) of the M5
Max stay disabled: the boot loader hands over only the first encoder's
preloaded firmware, which the AVE driver requires, and the ProRes driver's
T6050 variant only describes the first engine's window layout.

DTBs: the J714s is byte-identical. The J714c gains apple,always-on on
FAB1_SOC, as the J714s, K116s and J775d already have. Every other board
gains whichever of these engines it lacked, so all eleven now enable the
same media nodes as the J714s.

The J714s blocks were written by DjDeveloperr, the J714c decoder block by
Eduard Moldovan and the K116s decoder block by Jens Axboe.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…DARTs

The apple,dart binding requires reg-names once a DART has two register
windows. ave0_dart, ave0_dart1 and jpeg0_dart have two each but no names,
so every board that enables them fails dtbs_check.

Name them after the DART instance each window is in the board's ADT:
ave0_dart's second window is its address filter ("dapf"); ave0_dart1's
second window and jpeg0_dart's (a shared gateway page) are neither a
DAPF nor a GAPF, so they are "auxiliary".

No functional change: the driver reads a "dapf" window only together
with apple,dapf-ranges, which these nodes do not have, and it does not
use "auxiliary" windows.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@satchlj

satchlj commented Nov 19, 2026

Copy link
Copy Markdown
Member

Claude Fable 5.2 on @satchlj's behalf. J775c (Mac Studio M5 Max) probe row for this PR at head 93af6fd, one one-shot boot, nothing installed. OS firmware 27.0 (26A428), system firmware 27.2. 0 failed units.

How it was booted, since it is not the PR tree as-is: the trial used a bootable J775c DTB carrying this PR's media bindings and enable properties, with references remapped to the board tree, and all four media drivers built in. The SD-card-reader PCI probe was skipped on the command line to get past a separate early boot failure in that path that we reproduce independently on the current integration tip.

Block Platform device Probe result
Decoder (AVD) 2309080000.avd probed; missing apple/avd-fw-v5-t2.bin (-2); unbound
Encoder (AVE) 2283100000.video-encoder probed; no preloaded firmware (-19); unbound
ProRes (APR0) 48d000000.prores bound, hardware ID 0x40018, video12
JPEG 0 and 1 2281000000.jpeg, 2281060000.jpeg both bound, hardware revision 0x110010, video10 and video11
  • The encoder never reached its firmware build admission check because the loader handed it no preloaded image, so this row says nothing about which encoder builds are admitted.
  • New media lines against our default boot: the AVD firmware-load failure, the resulting AVD probe failure, and the AVE no-preload failure. A few other trial-only lines (three CPU feature masks, one AOP probe failure -61) came with a different kernel and DTB and cannot be attributed to this change.
  • Not run: any decode or encode workload, and a boot on the 27.2 handoff.
  • Console recorded; warm return to the default was clean.

@RyanTheTide

Copy link
Copy Markdown
Author

Thanks @satchlj for the J775c row. It shows the media nodes this PR enables are described well enough to probe on the J775c: ProRes (apr0) and both JPEG engines bind and register their video nodes, and the decoder and encoder reach their drivers.

Still open for the J775c:

  • The decoder stopped at its missing firmware file (apple/avd-fw-v5-t2.bin), and the encoder got no preloaded image from the loader, so neither ran. A boot through aura main with the decoder firmware installed would get both further.
  • The DTB was remapped onto the board tree rather than built from this branch as-is, and arm64: dts: apple: support M5 Max Mac Studio (J775c) #2102 replaces the J775c tree (whichever lands second carries the enables over). A boot on the final J775c tree is still needed.
  • The four workload rows from the description (decode md5, 600-frame encode, one ProRes frame, JPEG on both nodes) have not run on any board yet, and the other boards' owners have not posted.

The PR stays a draft until those are in.

@DjDeveloperr

Copy link
Copy Markdown

J714s audit & T6050 AVE dependencies check against current integration/aurora (a84637dca209):

  1. DTB verification (clean, no rebase needed):

    • Clean 3-way merge (git merge-tree) of 93af6fdc9d68 onto integration/aurora a84637dca209.
    • All 11 t6050-*.dtb boards compile with 0 dtc warnings.
    • t6050-j714s.dtb decompiled diff vs integration/aurora is strictly the 3 reg-names properties ("dart", "dapf" on ave0_dart, "dart", "auxiliary" on ave0_dart1 and jpeg0_dart). In drivers/iommu/apple-dart.c (apple_dart_dapf_parse()), "dapf" without apple,dapf-ranges returns 0 immediately and leaves the loader's DAPF setup untouched.
    • All 10 other T6050 boards (j716s, j873s, j714c, j716c, j775c, k114s, k116s, k114c, k116c, j775d) flip ave0 (video-encoder@2283100000) from disabled to okay; ave1 stays disabled.
  2. Row drm/apple: release a stale DPTX link before borrowing a Type-C route #2 (framerate=60/1, no B-frames) note for testers:

  3. macOS 27.2 (26B123 and 26B8125) T6050 AVE firmware builds:

    • Checked AppleAVE2FW_H17D segment sizes and __TEXT CRC32 across the public macOS 27.0 and 27.2 restore bundles:
      • 26A428 (27.0, already admitted): TEXT 0x154000, DATA 0x134000, TEXT CRC 87279429
      • 26B123 (27.2 — j714s/j716s/j873s/j714c/j716c/j775c/j775d, not yet admitted): TEXT 0x158000, DATA 0x134000, TEXT CRC d33ed3b4
      • 26B8125 (27.2 — k114/k116, not yet admitted): TEXT 0x158000, DATA 0x134000, TEXT CRC 1e27a926
      • 26C5035r (27.3b1, already admitted): TEXT 0x158000, DATA 0x134000, TEXT CRC c25b4ddb
    • Because 26B123, 26B8125, and 26C5035r all share the exact same 0x158000/0x134000 segment sizes, admitting the 27.2 T6050 builds in ave_t6050_builds[] also depends on media: apple: ave: T8142: admit the macOS 27.2 (26B123) encoder firmware #1900's (text_size, data_size, text_crc) build-table disambiguation (plus a live hardware encode row on a 27.2 T6050 stub to confirm ave_layout_26a428 vs ave_layout_26b123).

@funkzy

funkzy commented Nov 22, 2026

Copy link
Copy Markdown

J775D (M5 Ultra Mac Studio) row on 93af6fd, with #2422: the engines probe, and the encoder is refused at probe.

Setup: the 27.0 stub, a read-only root. Linux is integration/aurora cacf355 (2026-11-21) with #1650, #1973 and the J775D's test set, plus this PR, #2422 and #2291. The boot loader is aura main dc2313f8 plus #333 and one commit outside the media path. Three boots with this PR, and one baseline of the same kernel without it.

  • ProRes and JPEG: apple-prores 48d000000.prores: ProRes encoder, id 0x40018 and both apple-jpeg ... JPEG encoder, HWREV 0x110010, with video nodes. ProRes and JPEG encodes were not run.

  • Decoders: unchanged. Both of the J775D's AVD nodes bind as before.

  • Encoder: the boot loader hands ave0 over with its firmware segments reserved. The driver then refuses it: apple-ave 2283100000.video-encoder: error -ENODEV: unsupported firmware (text CRC 26a46d96). There is no encoder node, so the encode rows could not run.

  • The checksums change on every boot. The TEXT/DATA CRCs the boot loader exported differ on all four boots of this window:

    • 26a46d96/e2fff326 and d5fa98b3/8fba324d, two boots of the same kernel and boot loader;
    • 62ba33d7/0a0f1c75 and 04d65f21/b14a624e on the other two.

    So the preloaded segments do not hold a stable image when the boot loader reads them on this machine. The driver's refusal is the right outcome, and admitting one of these CRCs would be wrong. Whether no image is there on this boot path, or something overwrites it before the handoff, is not known yet. We'll look at the segment contents at the boot loader next.

  • Power: five VENC0 power states report sync_state() pending due to 2283100000.video-encoder, because the encoder never binds.

  • Regression: apart from the encoder line, no kernel error line is new against the baseline (the Type-C usb 3-1 line also shows on earlier boots without these PRs). 1 failed unit on each boot, the read-only root's networkd persistent-storage unit, as on the baseline. WARN/BUG/Oops 0. ALARM has no SELinux, so there are no AVCs to count.

Merge note: on a tree with #1973, this PR's first commit conflicts in t6050-j775d.dts. Both add an include at the end of the file (t6050-media.dtsi here, t6050-j775d-gpu.dtsi there). Keeping both resolves it, and that is how we tested.

Assisted-by: LLM (Claude:Opus 5.5)

@satchlj

satchlj commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Claude Opus 5.5 on @satchlj's behalf. J775c functional row for this PR's ProRes part. It follows the probe row of 2026-11-19.

Setup: lobata's flattened J775c DTS with this PR's apr0 changes applied: apr0, its DART, scodec okay, and fab7-soc/fab0-piogw firmware-owned. The kernel is cand-15 with #2620 merged; default cmdline, one-shot boots.

Result: apr0 probes as ProRes codec, id 0x40018, with encode and decode nodes. Decode gives SHA 6/6, unchanged after s2idle, plus encode, an 800-frame ring wrap, and s2idle with jobs in flight. No DART fault, failed units 0. Details: #2620 (comment).

Without #2620, the same DTB probes as ProRes encoder: the encode node appears and there is no decode node. Encode was not run on that boot. So the J775c DT part here is enough to probe the engine, and decode also needs #2620.

Assisted-by: LLM (Anthropic:Claude Opus 5.5)

@funkzy

funkzy commented Nov 22, 2026

Copy link
Copy Markdown

J775D follow-up to our row: the encoder's firmware is the 26A428 build the driver already admits. Only the build check refuses it.

  • With the T6041 variant's text_boot_word applied, TEXT's CRC on the J775D is 87279429 (AVE_FW_TEXT_CRC_T6050_26A428) on both boots we checked.
  • ave_t6050 sets no text_boot_word, so ave_fw_text_id() compares the unmodified CRC, and that does not match the admitted CRC on the J775D.
  • Setting text_boot_word on the T6050 variant, as on T6041, would select the admitted build here. A boot where that word is already zero gives the same CRC with or without it.

That variant is dj's, and text_boot_word is 7robertodantas's T6041 mechanism, so we've left the change to them. We'll add the J775D encode row once a kernel has it.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Author

Probe rows are in on the J775c and J775D, and ProRes encode and decode pass on the J775c together with #2620. Still needed before this leaves draft: a decoder md5 row and a JPEG encode row on a board built from this branch, and an encoder row once the T6050 encoder firmware check is fixed in the driver.

@funkzy

funkzy commented Nov 22, 2026

Copy link
Copy Markdown

J775D (M5 Ultra Mac Studio) rows on a kernel built from this branch: JPEG encode works on both engines, the J775D's decoder (which this PR does not change) decodes the same with and without it, and the encoder is still refused at probe.

Kernel: kit pr2278-1 (window pr2278@0757) is integration/aurora 85e255d plus this PR at 93af6fd, and nothing else. The baseline, kit pr2278-1b (window pr2278@0757), is the same base alone. Both use integration's defconfig plus asahi.config. The boot loader is aura main at dff1235d, unmodified, on the 27.0 stub. One one-shot boot per kit, read-only root, and two full decode passes on each.

Row This PR (kit pr2278-1) Base alone (kit pr2278-1b)
JPEG engines both bind (HWREV 0x110010) absent
JPEG encode, 768x512 photo, q75 / q95 41,640 / 116,685 bytes, PSNR Y 40.06 / 45.92 dB, djpeg decodes no node
JPEG encode, 1920x1080 test pattern, q75 / q95 82,195 / 149,777 bytes, PSNR Y 42.91 / 55.08 dB, djpeg decodes no node
H.264, JVT-AVC_V1 (135 streams): bit-exact, equal to the reference md5 72, 72 on both passes 72, 72 on both
HEVC, JCT-VC-HEVC_V1 (147) 142, 143 on both 142, 143 on both
AV1, AV1-TEST-VECTORS + Chromium 8-bit (253 in 4:2:0) 246, 245; 245, 244 245, 244; 246, 245
VP9, VP9-TEST-VECTORS (303 in 4:2:0) 201, 176 on both 202, 177; 201, 176
ProRes binds, id 0x40018 absent
Encoder (ave0) refused at probe, no node not enabled
Failed units / new err lines / WARN, BUG, Oops 2, as base / the encoder line only / 0 2 / - / 0
  • What the decode rows cover. The J775D's decoders are outside this PR (#ifndef T6050_J775D), and their nodes are identical in the two kits' DTBs. So the decode rows are a no-regression check: they show that the shared media power states this PR enables on the J775D don't disturb the decoders. A decode row for a board whose avd0 this PR enables still has to come from one of those boards.

  • Decode method. Every stream goes through the V4L2 stateless request API on the AVD node: ffmpeg with -hwaccel vaapi -hwaccel_output_format vaapi and a hwdownload filter, on the v4l2-request VA driver. If the hardware path does not initialise, there are no hardware frames to download and the run fails, so a software fallback cannot pass. Each frame's md5 is compared with ffmpeg's software decode, and the whole output with the suite's reference md5. "Bit-exact" means every frame is equal. All counted streams raised AVD interrupts.

  • Same with and without the PR. No stream passes on both passes of one kernel and fails on both passes of the other. Four streams vary between passes, on both kernels:

    • AV1 quantizer-05 gave 1 of 2 frames on one base pass.
    • AV1 svc-L1T2 gave 7 of 8 frames on one PR pass.
    • VP9 skip-01 passed on one base pass only.
    • VP9 aq2 fails on every pass, with 2 to 14 equal frames out of 100.

    VP9 skip and skip-01 stop with AVD frame timeouts on both kernels in this window: 4 on the PR boot and 3 on the base, one per failed pass. In an earlier window of the same kits with a different boot loader build, skip passed on all three passes and skip-01 on two of three.

  • Where the rest are.

    • H.264: 62 streams never reach the hardware (0 interrupts). 49 are interlaced (field, PAFF, MBAFF), which the driver refuses. 12 are Baseline (not Constrained Baseline) or Extended profile, which the VA driver refuses before decoding; GStreamer decoded one of them, BA3_SVA_C, bit-exact. FM2_SVA_C gives no frames in software either. One decodes and differs: CVFC1 (frame cropping).
    • HEVC: TSUNEQBD (unequal luma and chroma bit depth) is not taken. CONFWIN_A (conformance window) and RPS_E (274 of 300 frames) differ. On SAODBLK_A/B the hardware output equals the reference md5 and ffmpeg's software decode does not, so they count as equal to the reference but not as bit-exact.
    • AV1: the four film-grain streams (the VA path does not apply grain), mfmv (3 of 4 frames) and sizeup (a resolution change).
    • VP9: 60 streams with a side under 64 pixels are not offered to the hardware. 37 resolution-change streams differ, and ffmpeg's software decode misses the reference on all of them as well. Also segkey_adpq, svc_1280x720_3, and the aq2, skip and skip-01 streams above.
  • GStreamer. The body's pipeline (parsebin ! v4l2slh264dec|v4l2slh265dec|v4l2slav1dec ! video/x-raw,format=NV12 ! filesink) ran on a 24-stream sample in the earlier window. 17 are md5-equal with ffmpeg's software NV12. Three wrote more bytes than the picture size (AMP_A, AMP_B, AMVP_C), so they were not compared. One failed inside GStreamer (BA1_FT_C), and three are the film-grain and size-change streams above.

  • JPEG. v4l2-ctl fed full-range NV12 to each node (v4l2jpegenc is not on our root). PSNR is measured against the NV12 that went in. Both engines gave byte-identical files, the same bytes as in the earlier window. For comparison, libjpeg-turbo's cjpeg at the same quality, from the same picture, gives 41,907 / 118,043 bytes at 40.06 / 45.90 dB for the photo and 81,828 / 148,334 bytes at 42.34 / 49.66 dB for the pattern. The photo is image 23 of the Kodak test set; the pattern is ffmpeg's testsrc2.

  • Encoder. apple-ave 2283100000.video-encoder: error -ENODEV: unsupported firmware (text CRC dfc34c28). On this base the T6050 variant still sets no text_boot_word, as our earlier comment here noted. Five VENC0 power states report sync_state() pending on the encoder. We'll add the encode row once the driver's check is fixed.

  • Regression. The only new kernel error line is the encoder's. The base boot also showed a Type-C usb 3-1 enumeration error, which has appeared on earlier boots without this PR. During the decode runs, both kernels log the same AVD lines: VP9 frame timeouts followed by a recovery, and stream stopped after 1 failed frames. Failed units are the same on both: iwd, because integration's config leaves out the crypto user-API options it needs (CONFIG_CRYPTO_USER_API_HASH and others), and the read-only root's networkd persistent-storage unit. 0 DART faults. ALARM has no SELinux, so there are no AVCs to count.

  • Streams. Fluster's suite definitions: the ITU-T JVT and JCT-VC conformance bitstreams, AOM's AV1 test vectors, the WebM project's VP9 vectors and the ChromiumOS AV1 vectors. Each was checked against the suite's checksum.

Assisted-by: LLM (Claude:Opus 5.5)

funkzy added a commit to funkzy/linux that referenced this pull request Nov 23, 2026
…word

On the Mac Studio (J775D) the encoder's TEXT CRC differs on every boot,
so probe refuses it as "unsupported firmware". The firmware is the
26A428 build the T6050 variant already admits: two boots' TEXT differ
only within one word, and with that word zeroed the TEXT CRC is the
admitted one on every boot checked.

The T6041 and T8132 variants already handle the same word, with a
text_boot_word on the variant: a TEXT CRC that is not a known build is
retried with that word zeroed. The word belongs to a firmware build,
though, not to a chip. On T6050 a variant-wide offset would also apply
to the 26C5035 build, whose TEXT is 0x4000 larger and which has not
been checked for such a word. So move text_boot_word into struct
ave_fw_build and set it on the builds that have it: 26A428 on T6050,
and the builds T6041 and T8132 already retried. 26C5035 keeps exact
matching. T6041 and T8132 now list their builds (sizes, CRC and word)
instead of variant-wide sizes, which also replaces T6041's second DATA
size, fw_data_size_alt, with its second build. A known CRC is still
taken as it is.

The KUnit case that pins the offsets checks them per build, including
that 26C5035 has none.

On the J775D this takes effect together with aurora-silicon#2278,
which enables that board's encoder node; without it the encoder is not
probed there.

Tested on a J775D (Mac Studio, M5 Ultra).

Signed-off-by: Jeff Queisser <funkzy@users.noreply.github.com>
funkzy added a commit to funkzy/linux that referenced this pull request Nov 23, 2026
…word

On the Mac Studio (J775D) the encoder's TEXT CRC differs on every boot,
so probe refuses it as "unsupported firmware". The firmware is the
26A428 build the T6050 variant already admits: two boots' TEXT differ
only within one word, and with that word zeroed the TEXT CRC is the
admitted one on every boot checked.

The T6041 and T8132 variants already handle the same word, with a
text_boot_word on the variant: a TEXT CRC that is not a known build is
retried with that word zeroed. The word belongs to a firmware build,
though, not to a chip. On T6050 a variant-wide offset would also apply
to the 26C5035 build, whose TEXT is 0x4000 larger and which has not
been checked for such a word. So move text_boot_word into struct
ave_fw_build and set it on the builds that have it: 26A428 on T6050,
and the builds T6041 and T8132 already retried. 26C5035 keeps exact
matching. T6041 and T8132 now list their builds (sizes, CRC and word)
instead of variant-wide sizes, which also replaces T6041's second DATA
size, fw_data_size_alt, with its second build. A known CRC is still
taken as it is.

The KUnit case that pins the offsets checks them per build, including
that 26C5035 has none.

On the J775D this takes effect together with aurora-silicon#2278,
which enables that board's encoder node; without it the encoder is not
probed there.

Tested on a J775D (Mac Studio, M5 Ultra).

Signed-off-by: Jeff Queisser <funkzy@users.noreply.github.com>
funkzy added a commit to funkzy/linux that referenced this pull request Nov 24, 2026
…word

On the Mac Studio (J775D) the encoder's TEXT CRC differs on every boot,
so probe refuses it as "unsupported firmware". The firmware is the
26A428 build the T6050 variant already admits: with the build's per-boot
word zeroed, the probe's TEXT CRC matches the admitted 26A428 CRC on
every J775D boot tested.

The T6041, T8132 and T8112 26B123 variants already handle the same word,
with a text_boot_word on the variant: a TEXT CRC that is not a known
build is retried with that word zeroed. The word belongs to a firmware
build, though, not to a chip. On T6050 a variant-wide offset would also
apply to the 26C5035 build, whose TEXT is 0x4000 larger and which has
not been checked for such a word. So move text_boot_word into struct
ave_fw_build and set it on the builds that have it: 26A428 on T6050, and
the builds T6041, T8132 and T8112 26B123 already retried. 26C5035 keeps
exact matching. Those variants now list their builds (sizes, CRC and
word) instead of variant-wide sizes, which also replaces T6041's second
DATA size, fw_data_size_alt, with its second build. A known CRC is still
taken as it is.

The KUnit cases that pin the offsets check them per build, including
that 26C5035 has none.

On the J775D this takes effect together with aurora-silicon#2278,
which enables that board's encoder node; without it the encoder is not
probed there.

Tested on a J775D (Mac Studio, M5 Ultra).

Signed-off-by: Jeff Queisser <funkzy@users.noreply.github.com>
@chrisohearn

Copy link
Copy Markdown

Tested on a K114s (MacBook Pro 14-inch, M5 Pro, apple,k114s), 2026-11-24. The kernel is integration/aurora 0bbe021a plus this PR. The board tree includes t6050-media.dtsi, and the test was one boot through an Aura one-shot.

  • ProRes (48d000000.prores) bound to apple-prores.
  • Both JPEG engines (2281000000.jpeg, 2281060000.jpeg) bound to apple-jpeg.
  • The video encoder did not bind: apple-ave 2283100000.video-encoder: error -ENODEV: unsupported firmware (text CRC 1e27a926). This Mac runs macOS 27.2's encoder firmware, and the driver doesn't know that CRC yet. With the encoder unbound, its five VENC0 power states stay sync_state() pending, which holds them on.

For now the K114s tree disables ave0 and its two DARTs and keeps the VENC0 states enabled, so genpd turns them off as unused. Happy to test a driver change that accepts this firmware.

Written by Claude for Chris (an AI agent posting a test report).

@satchlj

satchlj commented Nov 24, 2026

Copy link
Copy Markdown
Member

J775c (Mac Studio M5 Max) functional row covering AVD decode, dual-JPEG encode, and ProRes encode, following up on the earlier probe row.

Setup

  • Kernel: aurora-silicon/linux main (39816b7d3b823) + #2881 (79c74a42daf6) + #2882 (29af2ca734b1), booted via one-shot trial with the default cmdline and no rootfs modifications.
  • DTB note: Remapped onto the bootable J775c board tree with this PR's media enables (avd0, apr0, jpeg0, jpeg1, ave0, DART reg-names/apple,dma-range, and PMGR power-domain enables); compiled with 0 dtc warnings. A boot on the final merged J775c tree is still needed once this PR is rebased onto it.
  • AVD firmware: Built open apple/avd-fw-v5-t2.bin from aurora-silicon/avd-fw@c5c9d7a7f8 (73,728 bytes, SHA-256 e3c3c3fa8f7945953342b3de9a58dee0a70faab3dea44827b3a71c416beca440) and embedded via CONFIG_EXTRA_FIRMWARE.

Results

Block Device / Node Result
AVD (2309080000.avd) /dev/video10, /dev/media0 Bound (hw version: 40020, open-queue transport, 15 frames in flight); all 4 codecs bit-exact
JPEG 0 & 1 (2281000000.jpeg, 2281060000.jpeg) /dev/video11, /dev/video12 Both bound (HWREV 0x110010); byte-identical output across both engines at 720p & 1080p, q75 & q95
ProRes (48d000000.prores) /dev/video13 Bound (id 0x40018); profiles 0–3 encoded and verified
AVE (2283100000.video-encoder) — Unbound (error -ENODEV: no preloaded firmware; see note below)

1. AVD hardware decode (GStreamer v4l2sl*dec, 90-frame 1280×720 real desktop capture, 124,416,000 B I420)

Codec Throughput IRQ delta (2309080000.avd) I420 MD5 vs ffmpeg SW decode
H.264 (v4l2slh264dec) 565.6 fps +90 Exact (4d54da33c658cb73ae5f258662463f50)
HEVC (v4l2slh265dec) 1,338.6 fps +90 Exact (055a18af2f129bc2d932c2f16de019db)
VP9 (v4l2slvp9dec) 1,050.7 fps +174 Exact (abe02e77084f7017f9612d5adf696232)
AV1 (v4l2slav1dec) 639.8 fps +178 Exact (15c435860247a5aea4f23cace2d80877)

2. Dual JPEG hardware encode (v4l2-ctl M2M full-range NV12 real photo -> JPEG, verified with djpeg + ffmpeg PSNR)

Resolution & Quality jpeg0 & jpeg1 bytes jpeg0 vs jpeg1 PSNR (Y / avg dB) cjpeg ref (bytes, Y / avg dB) IRQs (jpeg0 / jpeg1)
1280×720, q75 103,630 Byte-identical (8bcc8dbaf41f3f22) 38.62 / 38.94 103,565, 38.55 / 38.73 +1 / +1
1280×720, q95 251,575 Byte-identical (8636f68b4d6e8d71) 47.43 / 46.84 251,620, 46.90 / 45.07 +1 / +1
1920×1080, q75 203,989 Byte-identical (97c9f00ed68535d8) 40.36 / 40.43 203,996, 40.27 / 40.36 +1 / +1
1920×1080, q95 494,426 Byte-identical (2f3336a394bc7b5e) 48.56 / 47.94 499,052, 47.97 / 47.54 +1 / +1

3. ProRes hardware encode (tools/asahi/prores-enc, 1920×1080 NV16 real photo, decoded with ffmpeg -f image2 -c:v prores, 0 errors)

Profile Bytes IRQ delta (48d000000.prores) PSNR (Y / avg dB)
0 (Proxy) 186,755 +1 36.73 / 38.84
1 (LT) 409,659 +1 45.44 / 46.76
2 (422) 579,834 +1 49.46 / 50.45
3 (422 HQ) 931,530 +1 54.24 / 54.84

AVE (ave0) status & regression summary

  • AVE not yet live-tested here: This machine still runs an older unpadded Aura Stage 1 (1.0.0b2) paired with Stage 2 1.0.0b2 (which predates dt_set_ave()), so ave0 receives no preloaded firmware segments (-ENODEV: no preloaded firmware). Newer Aura Stage 2 (b13.1+ / main with dt_set_ave()) requires a padded Stage 1 enrollment first; once Stage 1 is updated on this machine, we can follow up with the J775c ave0 encode row.
  • Regression: Total media IRQs exercised: 1,423 (avd), 4 (jpeg0), 4 (jpeg1), 5 (prores). 0 DART/IOMMU faults, 0 AVD/JPEG/ProRes runtime errors, 0 WARN/BUG/Oops, 0 media-related failed units (the only failed unit on the main trial was ac-power-mode.service from unrelated apple-spmi gen4 -EOPNOTSUPP). Warm return to the default kernel was clean (0 failed units).

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.

5 participants