Repository navigation
t6041-j575c: hardware video encoding (M4 Max AVE firmware) and JPEG - #1677
Merged
RyanTheTide merged 2 commits intoNov 13, 2026
Merged
Conversation
The J575c (Mac Studio, M4 Max) has the M4 Pro's first encoder (ADT ave0, soc-id t6040), but iBoot 25G83 preloads it with a different build of AppleAVE2FW 9003.78.0: TEXT 0x14c000 as on the M4 Pro, DATA 0x130000 instead of 0x12c000. Probe stopped at "unexpected firmware segment sizes". The build also has no fixed TEXT CRC: the loader writes one 32-bit word at TEXT 0x4224 that differs on every boot (two dumps: 0x00dd0000, 0x007d0000; everything else equal), so the loader CRC changed with each boot (727b63c0, 4708feec, 0ed5df70). With that word zeroed both boots give 0x9a080cad. Let the T6041 variant accept the second DATA size and, when its TEXT CRC is not a known build, retry the CRC with the boot word zeroed. Known CRCs, the M4 Pro's included, are kept as they are, so the M4 Pro path does not change. The build speaks the 9003.78.0 command layout, as the M4 Pro's. Add a KUnit case for the zeroed-word CRC. Tested on a J575c (linux-aurora 7.3.0, module built against 1943af8; DT with the encoder nodes enabled), fresh boot, module loaded first: H.264 Main and HEVC Main 1080p30 at 8 Mb/s, 300/300 frames, PSNR 43.7 and 44.5 dB; HEVC Main 10 from P010 (v4l2-ctl), 60/60 frames, decodes as yuv420p10le with 10-bit steps kept; back-to-back sessions; encoding after an s2idle resume. The KUnit case compiles (W=1); not run, the encoder is a module in this kernel and the ABI tests need it built in. Signed-off-by: Roberto Dantas <[email protected]> Assisted-by: LLM (Claude Code) Co-Authored-By: Claude Opus 5.5 <[email protected]>
Enable the first video encoder (ADT ave0), its two DARTs and its six power domains, and both JPEG engines with their DARTs and power domain, as t604x-j614-j616.dtsi does for the J614c/J616c. The J575c ADT has the preloaded encoder firmware (ave0 pre-loaded, segment-names __TEXT;__DATA). The second encoder (ave1, soc-id t6041) stays undescribed. Tested on a J575c (linux-aurora 7.3.0, the live J575c tree plus only these nodes, one-shot trial boots): - JPEG: both engines probe (HWREV 0x100008); a 1920x1088 NV12 frame gives a valid JFIF, PSNR 47.6 dB at quality 90 and 38.2 dB at 50, both engines byte-identical, same output after s2idle. - Encoder: probes with "media: apple: ave: accept the M4 Max encoder firmware"; without it the driver refuses the firmware at probe. - AVD decode unchanged (H.264, HEVC, VP9 bit-exact); s2idle resume OK. - dt-validate (this tree's bindings): no warnings before or after. Signed-off-by: Roberto Dantas <[email protected]> Assisted-by: LLM (Claude Code) Co-Authored-By: Claude Opus 5.5 <[email protected]>
RyanTheTide
reviewed
Nov 12, 2026
RyanTheTide
left a comment
Contributor
There was a problem hiding this comment.
The known-CRC path returns before the retry, so the M4 Pro build is untouched. We confirmed apple-ave still probes and encodes on a J616s with this change. The J575c results are thorough. Looks good.
Contributor
|
Ran this on our J616s (M4 Pro, T6040), merged on integration e661192 together with the other PRs in this round, as a one-shot test kernel.
|
RyanTheTide
merged commit Nov 13, 2026
7d148dd
into
aurora-silicon:integration/aurora
2 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Written with an AI assistant (Claude) on @7robertodantas's behalf; every hardware step was run and checked on the owner's J575c.
t6041-j575c: hardware video encoding (M4 Max AVE firmware) and JPEG
The J575c (Mac Studio, M4 Max) DT left the video encoder and both JPEG engines disabled, unlike the J614c/J616c and J773s. With them enabled the JPEG engines work as they are, but
apple-averefused the encoder firmware at probe (unexpected firmware segment sizes).Cause. The M4 Max's first encoder is the M4 Pro's kind (ADT
ave0,soc-idt6040), but iBoot 25G83 preloads it with a different build of AppleAVE2FW 9003.78.0 (version string in TEXT):Two read-only dumps of the preloaded TEXT from two boots (checked against the loader's
aurora,ave-text-crc32) differ in one byte: the 32-bit word at TEXT 0x4224 is 0x00dd0000 on one boot and 0x007d0000 on the other. With that word zeroed both give 0x9a080cad. DATA differs only in a small header; the driver already keeps its own pristine copy checked againstaurora,ave-data-crc32.Change.
fw_data_size_alt), and a TEXT CRC that is not a known build is retried with the word at 0x4224 zeroed (text_boot_word). Known CRCs, the M4 Pro's included, are kept as they are, so the M4 Pro path does not change. 0x9a080cad selects the 9003.78.0 command layout, as the M4 Pro build does, and gets an unqualified MCTF entry like it. A KUnit case covers the zeroed-word CRC.ps_venc0_*,ave0_dart0/1,ave,ps_jpg,jpeg0/1and their DARTs, ast604x-j614-j616.dtsidoes. The second encoder (ave1, soc-id t6041) is not described.Tested on a J575c (linux-aurora 7.3.0; the driver change built as a module against 1943af8, loaded first on a fresh boot; DT = the live J575c tree plus only these nodes, one-shot trial boots):
/dev/video3apple-ave, H.264/HEVC from NV12/P010h264_v4l2m2m)hevc_v4l2m2m)v4l2-ctl; ffmpeg's wrapper only offers NV12)dt-validate(this tree's bindings), checkpatch --strictNot tested: the KUnit case (compiles with W=1; the ABI tests need
VIDEO_APPLE_AVE=y, this kernel has it as a module); the second encoder; other M4 Max boards (J616c/J614c with an M4 Max get the same variant, but their firmware was not seen); constant-quality mode beyond a smoke run; long or concurrent encodes. The MCTF entry stays unqualified, as the M4 Pro's.Notes:
firmware data is not in its boot state) until the next boot. That is the existing check, unchanged.🤖 Generated with Claude Code