Repository navigation
media: apple: ave: per-device debugfs/workqueue names and T6041 ave1 node - #2778
RyanTheTide merged 2 commits into
Conversation
|
The driver half looks right and the ave1 description matches ave0 shifted by 0x2000000 with interrupts +12. Two questions on the DT and one on the rename:
Testing: a boot on any AVE machine at this head showing the renamed debugfs directory and workqueue, plus one encode, would cover the driver change; the DT half stays inert until the nodes are enabled. Assisted-by: LLM (Claude:Opus 5.5) |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Pre-PR checklist review (§1–§6) against 3303014fe377a0cf6c4a120b1146e66bfa2f09f8:
Blockers
-
Code bug / §1 & §5 blocker —
WQ_NAME_LENoverflow and kernel warning on M3, M4, and M5 Pro/Max (drivers/media/platform/apple/ave/ave-v4l2.c:1528):alloc_ordered_workqueue("apple-ave-%s", WQ_MEM_RECLAIM, dev_name(ave->dev))exceedsWQ_NAME_LEN(32, i.e., 31 chars + NUL;kernel/workqueue.c:130,5924-5928), triggeringpr_warn_once("workqueue: name exceeds WQ_NAME_LEN. Truncating to: %s ", wq->name)on boot for every SoC whose AVE node is namedvideo-encoder@<addr>(drivers/of/device.c:303):- T6041 (
video-codec@283100000/285100000):"apple-ave-283100000.video-codec"= 31 chars (fits by 1 byte). - M3 (
t8122,boot_qualified = true), M3 Pro/Max/Ultra (t6030/t6031/t6032), M4 (t8132):"apple-ave-315100000.video-encoder"= 33 chars >= 32 (truncated + boot warning). - M5 Pro/Max (
t6050,boot_qualified = true, dual-encoder):"apple-ave-2283100000.video-encoder"= 34 chars >= 32 (truncated + boot warning on every M5 Pro/Max boot).
- T6041 (
- Fix: Use a shorter prefix such as
"ave-%s"(max4 + 24 = 28 < 32) or pass"%s"directly withdev_name(ave->dev)(matchingave-ipc.c:820'srequest_irq()).
-
§3 (Safety) — Record J616c ADT
pmgrblock index & offsets forVENC1_SYS..VENC1_ME1(arch/arm64/boot/dts/apple/t6041.dtsi:505-565):- While
0x2a0..0x2c8occupies the exact 6-slot gap int6040-pmgr.dtsi&pmgr_auxbetweenps_fab_afr(0x298) andps_fab1_soc(0x2d0),ave0places onlyVENC0_SYSinpmgr_aux(0x278) andVENC0_DMA..ME1inpmgr_venc(0x502808000,t604x-pmgr.dtsi:657-707), andt8140-pmgr.dtsiplacesVENC1_DMA..ME1inpmgr_venc(0x8028..0x8048). - Echoing @RyanTheTide: please include the J616c ADT
pmgrblock index and register offsets forVENC1_SYS..VENC1_ME1in the commit message so these offsets are provably verified beforeave1is ever enabled.
- While
-
§5 (Evidence) & CI still incomplete:
- No live hardware boot/encode verification posted yet (PR is non-draft). After fixing the workqueue name length, please post a boot + encode check on the updated head confirming: (a) renamed debugfs dir
/sys/kernel/debug/apple-ave-<dev>and non-truncated workqueue name with 0WQ_NAME_LENwarnings, (b)aurastill hands overave0cleanly with disabledave1present (noteaura'sdt_set_aves()iterates allapple,t6041-avenodes and checks/chosen/aurora,ave-{text,data}-crc32, whileave0has ADTsoc-id t6040vsave1'ssoc-id t6041), and (c) regression row (0 SELinux denials,0 failed units,0 new kernel errors). - Live CI on
3303014fe377:host-testsSUCCESS,dt-checksstill IN_PROGRESS (hold for greendt-checks).
- No live hardware boot/encode verification posted yet (PR is non-draft). After fixing the workqueue name length, please post a boot + encode check on the updated head confirming: (a) renamed debugfs dir
Minor / Verified
- Commit / PR text: Mention in commit 1 that the debugfs rename (
apple-ave->apple-ave-<dev>) applies to all SoCs (not only dual-encoder ones), and update the PR body which references a non-existentt6041-pmgr.dtsi(power states are int6041.dtsi). Confirmed all in-tree doc/README references to/sys/kernel/debug/apple-ave/were updated andchar dir_name[64]safely fitsapple-ave-<dev>(max 35 bytes). - DTS consistency:
ave1(+0x2000000regs,+12IRQ stride matchingave0andt8140) and its DARTs/PMGR nodes staystatus = "disabled", matchingt604x-pmgr.dtsisafety rules andDocumentation/devicetree/bindings/media/apple,t8140-ave.yaml. - §4 / §6: Both commits (
11949b5bd538,3303014fe377) carry human author/committer + humanSigned-off-by:only (zero AI trailers in commits),Assisted-by:is disclosed in the PR body, and naming is clean.
Assisted-by: LLM (Gemini 4 Neon)
When a SoC exposes more than one AVE encoder instance (such as ave0 and ave1 on T6041), registering both instances with the fixed "apple-ave" debugfs directory name causes the second debugfs_create_dir() call to fail with -EEXIST. Qualify both the debugfs directory name and the ordered workqueue name with dev_name(ave->dev) so multiple AVE instances coexist cleanly. The debugfs root becomes apple-ave-<dev> on every SoC, not only on the dual-encoder ones, so scripts using /sys/kernel/debug/apple-ave/ need updating; the in-tree documentation is updated here. The workqueue uses the shorter "ave-" prefix to stay within WQ_NAME_LEN (32 including the NUL): the longest in-tree AVE device name is "2283100000.video-encoder" (24 characters, T6050), giving 28. Signed-off-by: AxxzyWasTaken <[email protected]>
Describe the M4 Max's second video encoder (ADT /arm-io/ave1, soc-id t6041), its two DARTs (/arm-io/dart-ave1), and its six PMGR power domains, verified against the J616c ADT. Unlike ave0, whose VENC0_DMA..VENC0_ME1 sit at 0x8000..0x8020 of the first PMGR block (pmgr_venc, 0x502808000), all six VENC1 power states are in the same 0x2xx range as VENC0_SYS. The J616c ADT /arm-io/pmgr devices entries (ps-groups index 0 -> pmgr reg[0], 0x302800000 size 0x1e0000, i.e. pmgr_aux at 0x502800000 after the /arm-io ranges): name id group offset parent VENC1_SYS 72 0 0x2a0 FAB0_SOC (33), as VENC0_SYS VENC1_DMA 73 0 0x2a8 VENC1_SYS (72) VENC1_PIPE4 74 0 0x2b0 VENC1_DMA (73) VENC1_PIPE5 75 0 0x2b8 VENC1_DMA (73) VENC1_ME0 76 0 0x2c0 VENC1_DMA (73) VENC1_ME1 77 0 0x2c8 VENC1_ME0 (76) They fill the gap between FAB_AFR (0x298) and FAB1_SOC (0x2d0). The FAB0_SOC parent is left implicit, as for ps_venc0_sys. Leave all nodes disabled by default, matching ave0 until bootloader firmware handoff and qualification for ave1 are in place. Signed-off-by: AxxzyWasTaken <[email protected]>
3303014 to
22112f0
Compare
|
Updated to
Live J616C dual-AVE boot/encode proof is queued next. |
|
All points from my last comment are handled at 22112f0:
Testing: besides the J616C row you have queued, one boot on an existing single-AVE machine showing Assisted-by: LLM (Claude:Opus 5.5) |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Re-review against pre-pr-checklist.md (§1–§6) at 22112f0f4a21d01386b5665570bf7b99dbd2e7c2: REQUEST_CHANGES.
Prior Wave 14 blockers — verified fixed
- Workqueue
WQ_NAME_LENoverflow (drivers/media/platform/apple/ave/ave-v4l2.c:1528): Resolved cleanly. Switching to"ave-%s"keeps the workqueue name withinWQ_NAME_LEN(32 incl. NUL, max 31 chars) across every in-tree AVE node on all SoCs: longest is T6050 (ave-2283100000.video-encoder, 28 chars), M3/M4video-encoder@is 27 chars, and T6041video-codec@is 25 chars. Commit 1 (12402d0cef54) also now documents the cross-SoCapple-ave-<dev>debugfs rename, and all in-tree doc/README references are updated. - §3 (Safety — raw J616c ADT
pmgrblock & offsets forVENC1_SYS..VENC1_ME1): Resolved cleanly. Commit 2 (22112f0f4a21) records the raw J616c ADT/arm-io/pmgrtable (ps-groups0 ->pmgr reg[0]/pmgr_aux, offsets0x2a0..0x2c8filling the unoccupied 6-slot gap betweenps_fab_afrat0x298andps_fab1_socat0x2d0, with parent chainFAB0_SOC -> VENC1_SYS -> VENC1_DMA -> {PIPE4, PIPE5, ME0 -> ME1}), and allave1nodes staystatus = "disabled".
- §1 / §2 / §4 / §6: Clean (human author/committer + human
Signed-off-by:only on both commits, zero AI trailers in commits). CIhost-testsis SUCCESS.
Remaining blockers before approval
- §5 (Evidence — live hardware boot/encode proof still owed): No live hardware boot/encode run has been posted yet on
22112f0f4a21while the PR is non-draft. Please post the exact-head J616C (or AVE-enabled Mac) boot + encode row confirming:- renamed debugfs root
/sys/kernel/debug/apple-ave-<dev>and non-truncatedave-<dev>workqueue with0WQ_NAME_LENwarnings; aurastill hands overave0cleanly with disabledave1present in DT, and an H.264/HEVC encode succeeds;- regression row:
0 SELinux denials,0 failed units,0 new kernel errors.
(Or convert the PR to draft until the hardware run is posted.)
- renamed debugfs root
- CI still running:
dt-checksis currentlyIN_PROGRESSon22112f0f4a21; hold for greendt-checks.
Minor note
- PR body item 2 has a small typo (
in t6041.dtsi / t6041.dtsi).
Assisted-by: LLM (Gemini 4 Neon)
|
J616C (M4 Max 16c/32g) exact-head boot & live Commit-1 verification at
|
DjDeveloperr
left a comment
There was a problem hiding this comment.
Re-review against pre-pr-checklist.md (§1–§6) at 22112f0f4a21d01386b5665570bf7b99dbd2e7c2: APPROVE.
Verified
- Prior code & §3 blockers resolved:
alloc_ordered_workqueue("ave-%s", ...)keeps workqueue names withinWQ_NAME_LEN=32across every in-tree AVE node (max 28 chars on T6050); Commit 1 (12402d0cef54) documents the cross-SoCapple-ave-<dev>debugfs rename and updates all in-tree docs/READMEs; Commit 2 (22112f0f4a21) records the J616c ADT PMGR table (pmgr_aux0x2a0..0x2c8, parent chainFAB0_SOC -> VENC1_SYS -> VENC1_DMA -> {PIPE4, PIPE5, ME0 -> ME1}) with allave1codec/DART/PMGR nodes keptstatus = "disabled". - CI: 2/2 green on
22112f0f4a21(dt-checksSUCCESS,host-testsSUCCESS). - §5 (Evidence): Exact-head J616C (
7.3.0-j616c-pr2778+) verification posted (11:14:40Z):- Exact-head DTB boots cleanly with
/proc/device-tree/video-codec@285100000(ave1) present andstatus = "disabled"(FAILED_UNITS=0, 0 errors). - Live Commit-1 run on
283100000.video-codecconfirms/sys/kernel/debug/apple-ave-283100000.video-codec/creation, non-truncated[kworker/R-ave-283100000.video-codec]with 0WQ_NAME_LENwarnings, and 1080p30 H.264 HW encode (60 frames in 0.67s, 2.92x realtime, clean decode exit 0, 0apple_ave/DART errors,FAILED_UNITS=0).
- Exact-head DTB boots cleanly with
- §1 / §2 / §4 / §6: Clean (both commits carry human author/committer + human
Signed-off-by:only, zero AI trailers in commits).
Non-blocking notes
- The
11:14:40Zlog did not explicitly print the SELinux denial count alongsideFAILED_UNITS=0/ 0 errors; no regression expected from these changes. - Wiring
VENC1-SOC-VMAX(perfpower domain) stays for theave1enablement follow-up on top of #2751.
Ready to queue for merge.
Assisted-by: LLM (Gemini 4 Neon)
|
Merge-train adversarial review (MERGETRAIN-LINUX3) at 22112f0: no blockers. Merges clean on integration/aurora 85e255d. Checked against the code: the per-device workqueue names stay under the 32-byte limit for every in-tree encoder node (longest 28) and the debugfs name fits its buffer; error, remove and suspend/resume paths are untouched; the ave1 node's addresses, IRQs, DART order and VENC1 power offsets match the J616c ADT; no chip/board gates, no module params or delays; both commits carry a human Signed-off-by only. Follow-ups before ave1 is enabled (not blockers here, ave1 stays status = "disabled")
Missing rows: only the J616c (ave0) boot + encode is posted. One boot on any other Mac with a video-encoder node (M1 Pro, M2, J615, J713, Neo J700) showing no workqueue/debugfs name warning would cover the rename on the shared path. |
933a43f
into
aurora-silicon:integration/aurora
Prepare the Apple Video Encoder (
apple-ave) driver for dual-encoder SoCs and describe the second encoder (ave1) on T6041 (M4 Max, keptstatus = "disabled"until brought up):apple-aveper-device names (12402d0cef54): Use per-deviceapple-ave-<dev>for the debugfs root (across all SoCs; in-tree docs updated) andave-<dev>for the ordered workqueue (longest in-tree node is T6050ave-2283100000.video-encoder, 28 chars, withinWQ_NAME_LEN=32) so multipleapple-aveinstances coexist cleanly without-EEXISTor name truncation.arm64: dts: apple: t6041: describe the second video encoder (ave1)(22112f0f4a21): Add J616c ADT-verifiedave1(status = "disabled"), its DARTs, and its sixpmgr_auxpower domains (VENC1_SYS..VENC1_ME1at0x2a0..0x2c8) int6041.dtsi.Testing
scripts/checkpatch.pl --strict: 0 errors, 0 warnings, 0 checks.CHECK_DTBS=yacross T6041 DTBs and CI (dt-checks,host-tests): green.22112f0f4a21is queued next (single-AVE SoC boot/encode check also welcome).Assisted-by: LLM (Anthropic:Claude Opus 5.5)