Skip to content

media: apple: prores: T6050 (M5 Pro/Max) ProRes engine, enabled on the J714s (on #1260) - #1586

Merged
RyanTheTide merged 3 commits into
integration/aurorafrom
m5-media/t6050-prores
Nov 12, 2026
Merged

RyanTheTide merged 3 commits into
integration/aurorafrom
m5-media/t6050-prores

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Adds the T6050 (M5 Pro/Max) ProRes engine to apple-prores and enables it on the J714s (MacBook Pro 14" M5 Pro).

Based on #1260 as merged (2733218): built-in init rows per variant, the per-machine APRI file as an optional override, and a42e907's quiet no-file path. Three commits.

What macOS does (macOS-HV MMIO trace of AppleProResHW on this J714s, macOS 27.0 26A428, one ProRes 422 export)

apr0 comes up the way T6041's does:

  • read-modify-write tables for the SCODEC-system (aux) window, the core and the wrapper: 82, 80 and 62 rows, media: apple: prores: load T6041 APRI init tables #1260's APRI v1 counts;
  • then the driver's existing sequence: MODE off, the 128 KiB ring, the statistics area at 0x38c/0x70c, MODE 0xd, IRQ enable 3, the DC-scale and quantiser tables;
  • per frame: RING_HEAD += 0x180, then the completion IRQ and a W1C of IRQ_STATUS.

T6050 also writes a fourth table, 12 rows to the SCODEC control window (the ADT's fourth apr0 window, 0x48d070000), between the system and core tables.

Changes

  1. dt-bindings: T6050 takes reg-names and the power-state reset; its firmware name is documented next to T6041's.
  2. driver, in media: apple: prores: load T6041 APRI init tables #1260's shape:
    • The variants get a fourth row set, SCODEC control, applied between the system and core rows. A per-machine file replaces all of a variant's sets, as on T6041.
    • The APRI parser takes a per-SoC layout. T6041's 3-block, 2,728-byte container is unchanged, and so are its tests. T6050's apple/prores-t6050-init.bin is the same container with soc 0x6050 and the control block as block 4 (2,880 bytes).
    • The T6050 values aren't built in; on the J714s they come from apple/prores-t6050-init.bin. Without the file the engine isn't used: one info line and -ENODEV (a42e907), so no boot-log error.
    • The driver gets the T6041 descriptor, statistics and single interrupt. KUnit covers the T6050 container and checks that neither SoC accepts the other's.
  3. DT:
    • apr0 gets its five ADT windows named, its SCODEC power state as reset, and its DART's ADT window (vm-base 0x10000000000, vm-size 0x30000000000).
    • The J714s enables apr0, its DART and SCODEC. SCODEC's parent fab7-soc also feeds the display pipeline (DISP_SYS), so it stays firmware-owned, as fab0-piogw already is.

Validation on a J714s

Before the rebase (slot p1, 2026-11-11 15:00; lab boot of 7.3.0-m5-intg2 with this branch's J714s DTB, chainloaded; the PR's apple-prores.ko; this Mac's own init file):

  • Probe: apple-prores 48d000000.prores: ProRes encoder, id 0x40018, with no DART fault and no SError. scodec and its DART are runtime-active while encoding, and fab7-soc is untouched.

  • Encode: one 1920x1080 NV16 frame of a photo at each 4:2:2 profile, 10 jobs each. Every output is a complete ProRes frame (icpf, header 148, 4:2:2, progressive), byte-identical across the 10 jobs, 0.3-0.6 ms per job.

  • Independent decode: libavcodec's ProRes decoder decodes every frame at 1920x1080 yuv422p10le. PSNR against the 8-bit source (10-bit scale):

    Profile Bytes Y Cb Cr
    Proxy 133,172 48.28 60.79 60.44
    LT 384,370 54.97 63.85 63.52
    422 660,722 60.43 66.50 66.31
    HQ 890,610 64.71 69.09 69.13

    1280x720 bars at 422: Y 69.75 dB.

  • Restore: after a KIS reset the M5 was back on its default set, with apr0 disabled in the running DT.

After the rebase onto merged #1260:

  • apple-prores builds with W=1 and no warnings as an out-of-tree module against the M5's 7.3.0-m5-intg3 kernel.
  • The J714s DTB built from the default kernel's tree (7.3.0-m5-intg3) differs from the default DTB only in the nodes above.
  • Regression boot on the J714s (slot pr1c, 2026-11-12 01:45). Lab boot of the default kernel 7.3.0-m5-intg4 with its J714s DTB plus this branch's nodes, chainloaded; this head's apple-prores.ko loaded from a file:
    • No init file: no apple/prores-t6050-init.bin and no built-in rows, engine not used at info level, and no video device.
    • The file truncated by one byte: error -EINVAL: invalid apple/prores-t6050-init.bin, the probe fails, and there's no video device.
    • This Mac's own file: initialization rows from apple/prores-t6050-init.bin, then ProRes encoder, id 0x40018.
    • p1's encodes (Proxy, LT, 422, HQ at 1080p, and 422 at 720p, 10 jobs each) are byte-identical to p1's output for all 5 streams, and identical across the 10 jobs.
    • No DART fault, oops or SError. The M5 was back on its default set after a KIS reset.

Not covered: 4:4:4 and 16-bit input, and decode (encode only, as on T6041 and T8140).

🤖 Generated with Claude Code

@RyanTheTide

Copy link
Copy Markdown
Contributor

#1260 is being reworked so the T6041 init rows are built into the driver and apple/prores-t6041-init.bin becomes an optional override (a present but invalid file still fails the probe). The selection code is on prores/t6041-builtin-wip (fab6411): per-variant aux_tunables, engine_tunables and wrapper_tunables, replaced as a set when the file parses. The T6041 rows will come from an MMIO trace of the J616s's own macOS, as yours did on the J714s.

Could T6050 take the same shape? The 82/12/80/62 rows from your J714s trace as built-in tables (the control block as a fourth set applied between system and core), with apple/prores-t6050-init.bin kept as the override. Then #1586 rebases on the reworked #1260 and needs no file to encode.

@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Rebased onto prores/t6041-builtin-wip (fab6411) in the same shape, with SCODEC control as a fourth row set; the T6050 values aren't built in, so the J714s takes them from apple/prores-t6050-init.bin.

T6050's ProRes engine takes a per-machine initialization table like
T6041's, and the driver maps its windows by name: core, wrapper, aux
(SCODEC system) and the SCODEC control windows. Allow reg-names and the
power-state reset on T6050, and document the firmware name.

Signed-off-by: Diljit Singh <[email protected]>
macOS brings up the T6050 engine as it brings up T6041's: SCODEC-system,
core and wrapper read-modify-write tables (82, 80 and 62 rows), then the
same ring, statistics, quantiser and DC-scale programming. T6050 also
writes a fourth table of 12 rows to a SCODEC control window, the ADT's
fourth apr0 window, between the system and core tables.

Give the variants a fourth row set, SCODEC control, applied between the
system and core rows, and generalise the APRI parser to a per-SoC
layout. T6041 keeps its 3-block, 2,728-byte container unchanged. T6050
takes apple/prores-t6050-init.bin, the same container with soc 0x6050
and the control block as block 4 (2,880 bytes). T6050 has no built-in
rows, so without the file its engine refuses to probe.

Signed-off-by: Diljit Singh <[email protected]>
Name apr0's five ADT windows (core, wrapper, aux, ctrl, ctrl1), give it
its SCODEC power state as reset, and give its DART the ADT translation
window (vm-base 0x10000000000, vm-size 0x30000000000).

On the J714s, enable apr0, its DART and the SCODEC power state. SCODEC's
parent fab7-soc also feeds the display pipeline, so it stays
firmware-owned, as fab0-piogw already is.

Signed-off-by: Diljit Singh <[email protected]>

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regression run of the apple-prores driver at 86d6f5b against the current fleet kernels. I swapped the module at runtime with nothing else changed, and encoded the same 11 rows on each Mac: NV16 Proxy/LT/422/HQ, P216 HQ, NV24 4444/XQ and P416 4444 at 1080p, plus NV16 422/HQ and NV24 4444 at 2160p, 8 testsrc2 frames per row.

  • M1 Pro (T6000): all 11 outputs are byte-identical to the current driver, ffmpeg decodes 8/8 frames per row, and the speed is the same (1080p HQ 1576 vs 1579 fps, 2160p 4444 279 vs 279 fps).
  • A18 Pro (T8140): all 11 outputs are byte-identical, 8/8 frames decode per row, and the speed is the same (1080p HQ 1663 vs 1658 fps, 2160p 4444 287 vs 287 fps).

No DART faults and no driver errors on either Mac. The existing T6000 and T8140 paths are unchanged.

Approving the T6050 part on that basis. It depends on #1260 landing first, and the T6041 built-in rows are still to come.

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebased head c329050, apple-prores A/B against the stock module: 11 encode rows (1080p and 4K, 422 and 4444 profiles), 8 frames each, byte-identical output and equal fps on the M1 Pro (fleet67) and the Neo (fleet64), every frame decodes with ffmpeg, no DART faults.

@RyanTheTide
RyanTheTide merged commit 8351fea into integration/aurora Nov 12, 2026
8 checks passed
@RyanTheTide
RyanTheTide deleted the m5-media/t6050-prores branch November 16, 2026 05:09
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