Repository navigation
arm64: dts: apple: t6050: enable the media engines on every board - #2278
RyanTheTide wants to merge 2 commits into
Conversation
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>
|
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.
|
|
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 PR stays a draft until those are in. |
|
J714s audit & T6050 AVE dependencies check against current
|
|
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.
Merge note: on a tree with #1973, this PR's first commit conflicts in Assisted-by: LLM (Claude:Opus 5.5) |
|
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 Without #2620, the same DTB probes as Assisted-by: LLM (Anthropic:Claude Opus 5.5) |
|
J775D follow-up to our row: the encoder's firmware is the 26A428 build the driver already admits. Only the build check refuses it.
That variant is dj's, and Assisted-by: LLM (Claude:Opus 5.5) |
|
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. |
|
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
Assisted-by: LLM (Claude:Opus 5.5) |
…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>
…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>
…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>
|
Tested on a K114s (MacBook Pro 14-inch, M5 Pro,
For now the K114s tree disables Written by Claude for Chris (an AI agent posting a test report). |
|
J775c (Mac Studio M5 Max) functional row covering AVD decode, dual-JPEG encode, and ProRes encode, following up on the earlier probe row. Setup
Results
1. AVD hardware decode (GStreamer
|
| 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 21.0.0b2(which predatesdt_set_ave()), soave0receives no preloaded firmware segments (-ENODEV: no preloaded firmware). Newer Aura Stage 2 (b13.1+/mainwithdt_set_ave()) requires a padded Stage 1 enrollment first; once Stage 1 is updated on this machine, we can follow up with the J775cave0encode row. - Regression: Total media IRQs exercised:
1,423(avd),4(jpeg0),4(jpeg1),5(prores).0DART/IOMMU faults,0AVD/JPEG/ProRes runtime errors,0WARN/BUG/Oops,0media-related failed units (the only failed unit on themaintrial wasac-power-mode.servicefrom unrelatedapple-spmigen4-EOPNOTSUPP). Warm return to the default kernel was clean (0failed units).
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
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).t6050-peripherals.dtsi. The J714s, J714c and K116s lose their copies of these blocks.#ifndef T6050_J775D), becauset6050-ultra.dtsialready describes both dies' decoders enabled.dt_set_ave()takes the firstapple,t6050-avenode and ADT ave0), and the AVE driver refuses an encoder without its two preloaded segments (ave-fw.cave_fw_probe()). The ProRes driver's T6050 variant needs the first engine'score/wrapper/aux/ctrlwindows 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.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
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.reg-namesproperties.apple,always-onandapple,firmware-ownedas on the J714s. The only change to an already-enabled node is that the J714c's FAB1_SOC gainsapple,always-on, which the J714s, K116s and J775d already have.dapf/auxiliary, from the DART instances in the ADT), which the binding requires. That removes the 3reg-namesmessages the J714s already had, and no board gains a message. No new compatibles. The driver behaves the same: it uses adapfwindow only withapple,dapf-ranges, and never usesauxiliary.Still to run (owner rows, per board)
Same four rows on every board. Device numbers come from
v4l2-ctl --list-devices.gst-launch-1.0 filesrc ! parsebin ! v4l2slh264dec|v4l2slh265dec|v4l2slav1dec ! video/x-raw,format=NV12 ! filesink. The output must be bit-exact (md5) withffmpeg -i <clip> -f rawvideo -pix_fmt nv12. Use real content, not test-source clips.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 inffprobe. dmesg must show the encoder probing with a known firmware build.tools/asahi/prores-encon the apr0 node.ffmpegmust decode the output.gst-launch-1.0 videotestsrc num-buffers=1 ! video/x-raw,format=NV12,width=1920,height=1080 ! v4l2jpegenc ! filesink location=t.jpgon each of the two JPEG nodes.djpeg t.jpgmust 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:
drivers/media/platform/apple/ave/ave-drv.c(ave_t6050_builds). No open PR does this.t6050-j775c.dtswith a flattened tree in which these nodes stay disabled. Whichever lands second needs the enables (or the include) carried over.t6050-k116s.dtsfor 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.dtsiandt6050-ultra.dtsi.Nodes enabled per board (status disabled -> okay unless noted):
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
statusand addsapple,always-on/apple,firmware-ownedon the nodes above.