Repository navigation
media: apple: prores: T6050 (M5 Pro/Max) ProRes engine, enabled on the J714s (on #1260) - #1586
Conversation
8cb643a to
d921091
Compare
|
#1260 is being reworked so the T6041 init rows are built into the driver and 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 |
d921091 to
86d6f5b
Compare
|
Rebased onto |
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
left a comment
There was a problem hiding this comment.
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.
86d6f5b to
c329050
Compare
RyanTheTide
left a comment
There was a problem hiding this comment.
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.
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:
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
apple/prores-t6050-init.binis the same container with soc 0x6050 and the control block as block 4 (2,880 bytes).apple/prores-t6050-init.bin. Without the file the engine isn't used: one info line and -ENODEV (a42e907), so no boot-log error.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):
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:
no apple/prores-t6050-init.bin and no built-in rows, engine not usedat info level, and no video device.error -EINVAL: invalid apple/prores-t6050-init.bin, the probe fails, and there's no video device.initialization rows from apple/prores-t6050-init.bin, thenProRes encoder, id 0x40018.Not covered: 4:4:4 and 16-bit input, and decode (encode only, as on T6041 and T8140).
🤖 Generated with Claude Code