Repository navigation
media: apple: scaler: add the M2 Pro, Max and Ultra engines - #2252
RyanTheTide wants to merge 1 commit into
Conversation
The scaler matched T8103, T6000, T8112 and the M4/A18 Pro engines, but not T6020, T6021 or T6022. Their device trees describe the MSR engines (one on M2 Pro, two on M2 Max, four on M2 Ultra) and keep them disabled because nothing would bind. The driver needs two things from a variant: the number of register ranges and whether the engine has the MSR20 control block (M4 and later). The T602x nodes have the T8112 register map: three ranges of 0x28000, 0x4000 and 0x4000 bytes at +0, +0x210000 and +0x204000, two DART streams, and the "apple,scaler" fallback. The scaler binding already puts apple,t6020/t6021/t6022-scaler in the same constraint group as apple,t8112-scaler. They are M2-generation engines, before MSR20. Use the T8112 data for them. Enable the engines and their DARTs in the T6020, T6021 and T6022 peripheral trees, so every board with the SoC gets them. The DARTs name the MSR domain of their own die (commit 4109497, "arm64: dts: apple: t602x: give the scaler and external DCP DARTs their power domains"), so the DART's first register read finds its block powered. The engines additionally vote the T602x media fabric domain (ps_afr), which the driver links through its power-domain list. T8103, T6000/T6001/T6002 and T8112 device trees are unchanged. Signed-off-by: Ryan Murray <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Blockers: 1.
The code itself looks sound. I checked that the T602x nodes (
The DT enable lands on every T602x board, but nothing has run on T602x hardware yet. Until it does, a wrong register map shows up only as a 500 ms job timeout, because probe does no ID check. HW row: M2 Pro or M2 Max (and an M2 Ultra if one is available) on this head. Each engine should give one probe line with its Assisted-by: LLM (Claude:Opus 5.5) |
|
Replaced by #2793: the same changes with the commit trailers fixed, on the current integration/aurora. |
Problem
The scaler (MSR) driver did not list the M2 Pro, Max and Ultra engines (T6020/T6021/T6022), so those Macs had no hardware scaler. d34ed1e left T602x out, and c91d838 described the T602x nodes as disabled until a driver qualified them.
Change
Match
apple,t6020-scaler,apple,t6021-scalerandapple,t6022-scalerwith the T8112 variant data. Enable the engines and their DARTs int6020-peripherals.dtsi,t6021-peripherals.dtsiandt6022-peripherals.dtsi: one engine on M2 Pro, two on M2 Max, four on M2 Ultra. The T602x nodes use the T8112 register map: three ranges at the same offsets and sizes, two DART streams and theapple,scalerfallback.apple,scaler.yamlalready groups these compatibles withapple,t8112-scaler.Testing
make W=1 drivers/media/platform/apple/scaler/(arm64, LLVM): no warnings before or after.statuslines.Still to run
An M2 Pro/Max/Ultra owner: one probe line per engine with no DART faults,
v4l2-compliance -son the scaler node, and a 1080p NV12 to BGRxv4l2convertpipeline that reaches EOS. Please also report the engineidvalue (J413 reads 0x10c000a).Per-SoC detail
ps_afr). The probe reads only the ID, running and IRQ status registers, with the engine powered, and a job that does not complete is caught by the 500 ms watchdog.Assisted-by: LLM (Claude:Opus 5.5)