Repository navigation
arm64: dts: apple: t6001, t6002: enable every video encoder - #2295
RyanTheTide wants to merge 1 commit into
Conversation
The M1 Max has two video encoders and the M1 Ultra four, one pair per die. Only encoder 0 was enabled: the bootloader handed over only the first encoder's preloaded firmware. It now hands each encoder its own copy, matched to the encoder by address, and disables an encoder it cannot hand over, so enable encoder 1 on t6001 and encoders 1 to 3 on t6002 with their DARTs, the same way encoder 0 is. Describe them as encoder 0 is described: - The driver maps the "pmgr" range (reg index 3) to the firmware as the encoder's power-state block and refuses one that is not 16K aligned. Encoder 0's is pmgr_east + 0x8000 (its dma, pipe4, pipe5, me0 and me1 states, 0x24 bytes). Encoder 1's states sit at the same offsets in pmgr_south, so its range is 0x28e688000, 0x24 bytes, not 0x28e680260 with 0x7dc4 bytes. Die 1's encoder 3 uses the same die-local value. - Their DARTs are T6000 DARTs like encoder 0's; drop the apple,t8110-dart fallback compatible. The DMA fault reporters stay as they are, like encoder 0's. Fixes: 43b9d8c ("arm64: dts: apple: describe dormant M1 Pro, Max and Ultra resources") Signed-off-by: Ryan Murray <[email protected]>
|
Looks good; approve once aura#334 has merged and an M1 Max owner row is on this head. Checked at f3d7f0f. The new encoder 1 "pmgr" range, 0x28e688000 + 0x24 (t6001-peripherals.dtsi:233, t6002-peripherals.dtsi:349 and die 1's :953), is pmgr_south (t600x-dieX.dtsi:240, 0x28e680000) + 0x8000. That covers the ps_venc1_dma..ps_venc1_me1 controllers at 0x8000-0x8020 (t600x-pmgr.dtsi:1949-1985), matching encoder 0's pmgr_east + 0x8000 (t6000-peripherals.dtsi:462, and VENC_DMA/VENC_ME1 in the J316s ADT coverage). It also fits ave-drv.c's
HW row: M1 Max (J314c/J316c/J375c) owner, on this head plus aura#334. Both 40d100000 and 507100000 bound to apple-ave, a 300-frame 1080p v4l2h265enc on each /dev/video node with rc=0, 0 DART faults, no new pmgr/power-domain errors, 0 AVC, 0 failed units. The same with four encoders on a J375d when an owner has one. J316s unchanged-DTB smoke on the fleet HEVC row. Assisted-by: LLM (Claude:Opus 5.5) |
|
The boot loader change this waited for has landed (aura#420, which carries aura#334's encoder handoff). Still needed: an M1 Max row on f3d7f0f with encodes on encoders 1-3, or an ADT dump from an M1 Max showing VENC1_DMA at 0x28e688000. |
Problem
The M1 Max has two video encoders and the M1 Ultra four, one pair per die. Linux used only encoder 0. Encoder 1 on t6001 and encoders 1 to 3 on t6002 were described but disabled, because the bootloader handed over only the first encoder's preloaded firmware. Encoder 1's description also had a "pmgr" range the driver refuses.
Change
Testing
make dtbs W=1: no warnings. Only t6001-j314c, t6001-j316c, t6001-j375c and t6002-j375d change. t6000-j314s and t6000-j316s are byte-identical.Still to run
Old gate and why each board is safe
ave,ave_dart0andave_dart1, with the comment that only the die 0 encoder gets the bootloader handoff (c3e9035). The encoder 1 to 3 nodes came in with 43b9d8c ("describe dormant M1 Pro, Max and Ultra resources").DT diff (t6001-j316c)
ave1_dart1 and ave1_dart0: compatible "apple,t6000-dart", status okay. ave1: reg[3] <0x2 0x8e688000 0x0 0x24>, status okay. j375d adds the same changes for ave1, ave2 and ave3.
Hardware rows for the lead
dmesg | grep -i aveshows apple-ave bound at 40d100000.video-codec as before. The fleet HEVC row (v4l2h265enc 1080p, 300 frames) gives rc=0 at about the same fps as before.ls /sys/bus/platform/drivers/apple-ave/lists 40d100000.video-codec and 507100000.video-codec. Run one encode on each /dev/video node.