Skip to content

arm64: dts: apple: t8132-j773g: enable ProRes (engine from #1994) - #2650

Closed
DjDeveloperr wants to merge 3 commits into
mainfrom
djdev/t8132-prores
Closed

DjDeveloperr wants to merge 3 commits into
mainfrom
djdev/t8132-prores

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

What

Enables ProRes on the Mac mini M4 (J773g): the engine (apr) and its DART (dart_apr0), the same two nodes the J604 enables. The T8132 engine, its named windows and the driver landed on main through #1994. After the merge with main (aef03e24), this branch's diff against main is only this 13-line DT block. The driver binds the engine when apple/prores-t8132-init.bin is installed and stays off without it, as on the J604.

Tested

  • t8132-j773g.dtb built from the merge tree with the same dtc warnings as main. The only change is apr and dart_apr0 going from disabled to okay.
  • The J773g hardware row is still owed at aef03e24: ProRes binds with the init table installed, one encode and one decode run, and no new kernel errors.

Risk

two-way · J773g only. A DT-only change. Without the init table the driver leaves the engine off.

Not yet

  • J773g row at aef03e24.

DjDeveloperr and others added 2 commits November 20, 2026 20:36
The M4 has the ProRes engine (ADT /arm-io/apr, "apr,i0"), but the driver
has no T8132 match. macOS's AppleProResHW (27.2) brings it up in
activateDevice() as Linux brings up T6041:
- MODE off (core +0x8 = 0);
- SetScodecPSTunablesByDevID(): SCODEC system rows;
- SetProResTunablesByDevID(): core rows;
- SetAXI2AFTunablesByDevID(): wrapper rows;
- then the descriptor ring.
For chip 0x8132 the three setters apply its generated tunable tables:
- soc_subsystem0 scodec_sys: 82 rows at 0x2_810c_0000, the aux window;
- scodec_prores0: 80 rows at 0x2_8100_0000, the core window. This is the
  table the kext also gives T6041;
- scodec_af_scodecaxi2af: 48 rows at 0x2_8000_0000, the wrapper window.
The bases are the ones the kext's fixed-address appliers use.

The rows are taken from those tables as read-modify-writes, with the
kext's masks. The same reading of the kext's tables for T6041, T6050,
T8140 and T8142 matches the rows traced from macOS on those chips: same
offsets in the same order, values equal under the masks.

Add the variant: T6041's descriptors, statistics and windows, with the
T8132 rows built in and no per-machine file. The engine interrupt is DT
index 0. macOS registers its second interrupt (index 1) for DMA errors,
and only on some chips, so it is not requested.

Not yet run on hardware.

Signed-off-by: Diljit Singh <hey@djdev.me>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Name the three ProRes windows (core, wrapper, aux) for the driver.
Power the engine as on T6041: the SCODEC streaming domain, with SCODEC,
its parent, as the reset. The ADT's function-device_reset is ARST(0x32),
and PMGR device 50 is SCODEC.

On the Mac mini (J773g), enable the SCODEC domains, the ProRes DART and
the engine. The T8132 PMGR policy has no SCODEC entries, so a board that
leaves these domains without a status gets them disabled.

Signed-off-by: Diljit Singh <hey@djdev.me>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@RyanTheTide

Copy link
Copy Markdown
Contributor

Early note on this draft (no full review yet):

  1. drivers/media/platform/apple/prores/apple-prores-drv.c:983, :1068, :1151: the three T8132 row tables (aux, engine, wrapper) are values read out of the macOS kernel image, not measured on the machine. Register values taken from a vendor binary can't be carried here. Drop the tables and rebuild the T8132 rows from our own MMIO trace of the engine coming up on T8132 hardware (as the existing T6041/T8142 rows were made), or read them from the ADT if it carries them for this block.
  2. drivers/media/platform/apple/prores/apple-prores-drv.c:975-981 and :1281, arch/arm64/boot/dts/apple/t8132-peripherals.dtsi:442: these comments name the vendor driver, its functions and its internal table names, and describe how its binary was read. Rewrite them to describe only what the driver and DT do (which window each row set goes to, the order they're applied in, why only interrupt 0 is requested).
  3. Commit "media: apple: prores: add the T8132 (M4) engine" and the PR description: same problem. They name the vendor class, its methods and its tables and explain the values as read from the kernel image. Reword both to describe the code and our own hardware results only. Once the rows come from a trace, say which machine and build the trace was taken on.

Assisted-by: LLM (Claude:Opus 5.5)

@DjDeveloperr
DjDeveloperr marked this pull request as ready for review November 30, 2026 20:46
@DjDeveloperr
DjDeveloperr requested review from a team as code owners November 30, 2026 20:46
@github-actions github-actions Bot added area:bringup Area from CODEOWNERS (bot) area:media Area from CODEOWNERS (bot) merge-conflict Conflicts with the base branch (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) needs-template PR body lacks Tested or Risk (bot) labels Nov 30, 2026
@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Merge readiness at aef03e24: not ready yet

Check Detail
CI at head ok 6 checks passed
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head ok in the PR body at aef03e24
Conflicts ok none
PR text ok Risk: two-way · J773g only. A DT-only change. Without the init table the driver leaves the engine off.

Areas: area:bringup

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: REQUEST CHANGES at 7121443c

Blockers:

  1. Hard-rule break: vendor-binary-derived tunable tables and binary provenance. The PR description states "Every value comes from the macOS 27.2 (26B123) kernelcache; no trace was needed or possible here" and cites vendor binary methods (AppleProResHW::activateDevice(), SetScodecPSTunablesByDevID(), etc.) for the three T8132 register tables (aux, engine, wrapper) in drivers/media/platform/apple/prores/apple-prores-drv.c. Register values extracted directly from a vendor binary cannot be committed to a public repository.
  2. Branch is CONFLICTING with main and lacks hardware validation. Even aside from provenance, the branch conflicts with main and has zero T8132 J773g hardware test results.

Checked:

  • PR description, commits (15b50700, 7121443c), and 2026-11-21 early review note.
Evidence
  • 7121443c remains unchanged since the 2026-11-21 provenance blocker and conflicts with main.

@github-actions github-actions Bot added merge-conflict Conflicts with the base branch (bot) and removed merge-conflict Conflicts with the base branch (bot) labels Dec 1, 2026
main has the T8132 ProRes engine and its named windows through #1994,
enabled on the J604. Take main's driver and peripherals file, and keep
only this branch's J773g enable, now written as the J604's: the engine
and its DART. ps_scodec is on by default in main's PMGR file.

Signed-off-by: DjDeveloperr <hey@djdev.me>
@DjDeveloperr DjDeveloperr changed the title media: apple: prores: add the T8132 (M4) engine; enable it on the Mac mini arm64: dts: apple: t8132-j773g: enable ProRes (engine from #1994) Dec 2, 2026
@github-actions github-actions Bot added door:two-way Revertible or not, from Merge risk (bot) and removed area:media Area from CODEOWNERS (bot) merge-conflict Conflicts with the base branch (bot) needs-hw-row No hardware row at the PR head (bot) needs-template PR body lacks Tested or Risk (bot) labels Dec 2, 2026

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Verdict: FINISH, then merge at aef03e24
Blockers:

  1. Branch history. The diff against main is now only the 13-line J773g block, but a merge commit would also bring this branch's two older commits into main's history.

    • 15b50700 and 7121443c both end in an AI co-author trailer.
    • 15b50700's message names the macOS driver's class, methods and tables. It also adds T8132 register rows that it describes as read from the kernel image. Main replaced those rows with the apple/prores-t8132-init.bin file through #1994.

    Fix: put the block in one new commit on current main, with a message that describes only the DT change. Then either replace this branch with it (the author may force-push their own PR branch to fix commit history), or open it as a new PR and close this one. Do this before the J773g row, so the row runs at the final head.

Checked:

  • The block matches the J604's: dart_apr0 and apr go to okay. Both nodes are already in main's t8132-peripherals.dtsi on ps_scodec.
  • dt-checks pass at head, and the merge tree is main plus only this block. That settles the bot's 11-30 point about the tables for the diff itself, but not for the history above.

Row still needed: J773g, booted with and without apple/prores-t8132-init.bin. apr and dart_apr0 should bind only when the file is there, and one ProRes job should run. The readiness check counts the "still owed" line in the PR body as a row at head. It isn't one.

@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Replaced by #4002: the same 13-line block as one new commit on main, so the older commits here stay out of main's history. Closing this one; the J773g row moves there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:bringup Area from CODEOWNERS (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants