Repository navigation
media: apple: jpeg: T8112 (M2) encode, enable both M2 engines; T6000 layout (refused) - #1226
Merged
Merged
Conversation
Select register maps, reset images, DMA widths and completion masks through immutable compatible match data. T8112 shares the wide64 profile; describe the compact legacy32 map and enforce its address bounds without truncation. Add disabled engine/DART nodes, binding examples and KUnit coverage. The clean register contract omits the exact sparse T6000 scratch reset entries. Keep that variant refused at probe until its reset image is complete. Document this limitation and the remaining recovery and board qualification requirements. Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> Assisted-by: LLM
Shorten nested assertions and align continuation lines reported by strict checkpatch in the buildbox validation run. Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> Assisted-by: LLM
Store builder errors before checking them so the rejection cases remain readable under the strict line-length check. Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> Assisted-by: LLM
Take the T8112 wide64 and T6000 legacy32 layout work onto current integration. Integration already describes the T8112 and T6000 JPEG engines and their DARTs (disabled) in the per-SoC peripherals files, and its binding already covers both compatibles with the apple,jpeg fallback, so keep integrations binding and DT files and drop the branchs duplicate nodes. Keep the single-buffer NV12/NV16 wording from #1072. Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> Assisted-by: LLM
The T8112 JPEG engines now have wide64 match data. Enable both engines and their DARTs for every M2 board; they are SoC blocks with no board-specific wiring. T6000 stays disabled (incomplete reset image). Tested on the M2 (J413, fleet33 + this driver, DT enabled at runtime): both engines identify as HWREV 0xe0008 and bind; NV12 encodes at 3840x2160/1920x1080/1280x720/640x480 decode with ffmpeg at 41.6-43.4 dB PSNR (q75) on both engines; GStreamer -e drains (3/3 per size); three s2idle cycles with both engines bound, encoding after every resume; no DART or JPEG faults. Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> Assisted-by: LLM
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.
Adds T8112 (M2) JPEG encode and enables both M2 engines. Also adds the T6000 (M1 Pro) legacy32 register layout, which stays refused at probe until its reset image is complete.
apple-jpeg: register layouts, reset images, DMA widths and completion masks come from per-compatible match data. T8112 uses the wide64 layout shared with T6041/T8140. T6000 gets the compact legacy32 map with 32-bit address bounds (never truncated). KUnit covers the layouts and job programming.*-peripherals.dtsifiles, and its binding already covers both compatibles with theapple,jpegfallback. So this branch keeps integration's binding and nodes and drops its own duplicates. The driver keeps media: apple: jpeg: take NV12/NV16 in one buffer, keep CAPTURE size, fix drain #1072's single-buffer NV12/NV16.t8112.dtsi: enablesm2_jpeg0/1and their DARTs for all four M2 boards (SoC blocks, no board wiring).Test: M2 J413, fleet33 kernel + this driver
DT enabled at runtime (RAM only, overlay that sets
status = "okay"), with gstv4l2jpegencand ffmpeg. Same script as the Neo check for #1072.-eEOS drainvideotestsrcalone runs at 474 fps at 1080p, so those rows are limited by the source. With the cheap black pattern, engine 0 does 656 fps at 1080p and 181 fps at 4K.rtcwake -d rtc1 -m freeze) with both engines bound: 3/3 resumed, and both engines encoded after every resume.rmmod apple_jpegalone is clean.macOS reference: not measured on the M2. Its macOS has FileVault and needs a console login, and no one was at the machine. For comparison, our earlier runs on other Macs: Neo Linux 4K 188 / 1080p 623 fps (#1072); macOS on the Neo-class engine 4K 150 / 1080p 556 fps.
Not measured: a perf (PMP) vote for JPEG on T8112.
pmp_report_jpgis disabled pending #1064, so these numbers have no performance request.T6000: probe returns
-EOPNOTSUPPuntil the legacy32 sparse scratch defaults are specified (tracked as Daybreak t-5786). The M1 Pro nodes stay disabled.Gates: KUnit apple-jpeg 12/12 (arm64 QEMU), W=1 out-of-tree build against fleet34 with 0 warnings, j413/j415/j473/j493 DTBs build.
Assisted-by: LLM
Signed-off-by: Ryan Murray 81541646+RyanTheTide@users.noreply.github.com
🤖 Generated with Claude Code