Skip to content

media: apple: prores: load T6041 APRI init tables - #1260

Merged
RyanTheTide merged 6 commits into
integration/aurorafrom
media/prores-t6041-apri
Nov 12, 2026
Merged

RyanTheTide merged 6 commits into
integration/aurorafrom
media/prores-t6041-apri

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The driver now picks its power-up rows per variant before it maps any register. Built-in SCODEC-system, core and wrapper tables are the default. A variant with a firmware name also accepts a per-machine APRI file, apple/prores-t6041-init.bin, which replaces all three tables.

  • T6000 and T8140 keep their built-in tables and apply them in the same order as before.
  • T6041 has no built-in rows yet. Without the file the driver logs one info line and returns -ENODEV before any register is mapped, so the boot log gets no error for a missing optional file. A variant with no firmware name and no rows still fails with an error.
  • A file that is present but malformed fails the probe and never falls back to built-in rows.
  • The APRI v1 parser checks magic, version, SoC, the exact 2,728-byte length, block order, the 82/80/62 counts, row bounds, alignment, uniqueness, masks and values. KUnit covers it with synthetic fixtures only.
  • The J616s ProRes node stays status = "disabled"; this PR changes no DTS.

Testing

  • Module build (fleet67 config, W=1): 0 warnings. checkpatch clean.
  • M1 Pro (T6000), fleet67 with the stock module vs this branch's module, 11 encode rows (1080p 422 Proxy/LT/422/HQ, P216 HQ, 4444/4444 XQ, P416 4444; 4K 422/HQ/4444), 8 frames each: output md5 identical on all 11, ffmpeg decodes 8/8 frames in every row, fps equal (1080p HQ 1574-1586 vs 1579-1586, 4K 4444 279.6 vs 279.7). 0 DART or ProRes errors, 0 AVC denials.
  • Neo (T8140), fleet64, same A/B and rows: md5 identical on all 11, ffmpeg decodes 8/8 frames in every row, fps equal (1080p HQ 1654-1672 for both, 4K 4444 285-287 for both). 0 DART or ProRes faults, 0 AVC denials.
  • J616s (T6041), fleet67 with a one-boot DTB that enables apr0, its DART and the fab1_soc/scodec power domains, no APRI file installed: the DART binds, and loading this module logs "no apple/prores-t6041-init.bin and no built-in rows, engine not used". No video node, no oops, no DART fault, journalctl -b -p 3 empty, and the module unloads cleanly.

T6041 needs a per-machine APRI initialization container. Document the fixed firmware name while retaining the firmware-free contract for the existing T6000 and T8140 paths.

Signed-off-by: Ryan Murray <[email protected]>

Assisted-by: LLM
Request the per-Mac APRI v1 container before mapping T6041 resources. Validate its complete shape and every row, copy the three fixed blocks, and apply them in SCODEC-system, core, wrapper order after MODE-off. Missing or malformed firmware fails probe before any hardware access.

Keep the compiled-in T6000 and T8140 paths unchanged. Cover the parser with a complete synthetic container and mutations for the header, block shape, bounds, alignment, uniqueness, masks, values, truncation, and trailing data.

Signed-off-by: Ryan Murray <[email protected]>

Assisted-by: LLM
@DjDeveloperr

Copy link
Copy Markdown
Contributor

@RyanTheTide, #1586 (T6050 ProRes on the MacBook Pro M5 Pro, J714s) is stacked on this PR and carries its two commits unchanged (same patch-ids as cdfcdba and 3464d5c). It ran the APRI loader on T6050 hardware, with the init table loaded as firmware:

  • apr0 probes (ProRes encoder, id 0x40018), with no DART fault and no SError.
  • 1920x1080 4:2:2 encodes at Proxy, LT, 422 and HQ, 10 jobs each, are complete ProRes frames and byte-identical across the 10 jobs.
  • ffmpeg's ProRes decoder decodes every frame.

Would you take #1260 out of draft and merge it, or are you OK with it landing through #1586? #1586 stays parked until one of those happens.

RyanTheTide and others added 4 commits November 12, 2026 12:11
Select the power-up rows per variant before mapping the hardware: the
built-in SCODEC-system, core and wrapper tables are the default, and a
variant with a firmware name may take a per-machine APRI file that
replaces all three. A file that is present but malformed still fails
the probe and never falls back. A variant with no core rows from either
source refuses to probe.

T8140 and T6000 keep their built-in tables and apply them in the same
order as before.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
T6041 has no built-in initialization rows yet, so without
apple/prores-t6041-init.bin its probe fails with -ENOENT before any
register is mapped. Say so in the Kconfig help and in t6041-apri.rst
instead of implying that built-in rows are used.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
A T6041 without apple/prores-t6041-init.bin has no rows to program,
because T6041 has no built-in rows yet. Its probe used to fail through
dev_err_probe(-ENOENT), which puts an error line in the boot log of every
such machine for a file that is optional.

Log one info line instead and return -ENODEV, which the driver core does
not report. A variant without a firmware name and without rows is still
a driver bug and keeps the error.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide
RyanTheTide marked this pull request as ready for review November 12, 2026 04:55
@RyanTheTide
RyanTheTide merged commit 2733218 into integration/aurora Nov 12, 2026
8 checks passed
@RyanTheTide
RyanTheTide deleted the media/prores-t6041-apri branch November 12, 2026 05:03
RyanTheTide added a commit that referenced this pull request Nov 12, 2026
media: apple: prores: T6050 (M5 Pro/Max) ProRes engine, enabled on the J714s (on #1260)
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.

2 participants