Skip to content

accel/ane: run vendor-compiled camera programs: long HWX names, several outputs, wide LOAD - #2647

Closed
m0d16l14n1 wants to merge 1 commit into
aurora-silicon:integration/aurorafrom
m0d16l14n1:j815/ane-apple-programs
Closed

m0d16l14n1 wants to merge 1 commit into
aurora-silicon:integration/aurorafrom
m0d16l14n1:j815/ane-apple-programs

Conversation

@m0d16l14n1

@m0d16l14n1 m0d16l14n1 commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

This lets the H16/H17 ANE driver run vendor-compiled camera programs with several outputs. One example is the person/skin segmentation program that the camera effects plugin in aurora-silicon/camera-denoise#16 loads from the user's own macOS install. No Apple files are added here.

Scope: one commit, c39ec3c9, on integration/aurora 17075e3. The ISP MLVNR endpoint (the former Part 2) was dropped from this PR after review. It will come back separately, rewritten from a hypervisor trace and its write-up (see the review thread).

Changes

  • HWX parsing: surface names up to 64 bytes, and procedure names other than main.
  • Programs:
    • several outputs per program;
    • a BAR slot table of any size;
    • ANE_H16_LOAD_WIDE, for programs of up to 16 surfaces. Plain H16_LOAD refuses more than 4 with -E2BIG before anything loads, since its arrays cannot report them.
  • uapi driver minor 2: plain H16_LOAD also takes a program with several outputs, where minors 0 and 1 refuse one. ane_accel.h says what minor 2 adds.
  • Test tooling: h16-sections.py builds the sections of a program with several outputs.
  • Stack use:
    • the parser's large temporaries are on the heap;
    • so are the KUnit tests' parsed programs and snapshots, because ANE_H16_SURFACES = 16 made struct ane_h16_hwx too large for a test's stack.

Provenance

This was worked out from the user's own program file (its HWX layout) and from runs on the J815. It does not use the macOS kernelcache reading that the dropped MLVNR part was based on.

Testing

  • KUnit (arm64, QEMU, tools/config/ane.kunitconfig, fresh build dir) at c39ec3c9: 298 tests, 297 pass, 1 skipped (apple_g17_rx_util_min_test, needs CONFIG_UCLAMP_TASK), 0 compiler warnings.
  • Hardware, J815 (M5, H17), 2026-11-21, with the same change on another kernel: the segmentation program (two outputs) ran on every frame. That was 150 segmentations in 150 frames at a 29.98 fps preview, about 4 ms per frame in the segmentation stage.
  • Owed at this head, on the default command line:
    • J815: an existing single-output program loads and runs; the two-output segmentation program runs through H16_LOAD_WIDE; plain H16_LOAD of a program with more than 4 surfaces returns -E2BIG.
    • The regression line: 0 SELinux denials, 0 failed units, 0 new kernel errors.
    • Non-regression: M4 Pro J616s, M4 Air J713 and A18 Pro. Ryan offered the M4 Pro and A18 Pro rows.

Assisted-by: LLM (Claude:Opus 5.5)

@m0d16l14n1
m0d16l14n1 force-pushed the j815/ane-apple-programs branch 2 times, most recently from 6c37c7c to 9b18f64 Compare November 21, 2026 03:02
@m0d16l14n1 m0d16l14n1 changed the title WIP: accel/ane: run Apple's camera programs (several outputs, wide LOAD, long HWX names) WIP: accel/ane: run Apple's camera programs, serve the ISP's MLVNR endpoint Nov 21, 2026
@m0d16l14n1
m0d16l14n1 force-pushed the j815/ane-apple-programs branch from 1c5e53a to b91ac5e Compare November 21, 2026 10:39
@m0d16l14n1 m0d16l14n1 changed the title WIP: accel/ane: run Apple's camera programs, serve the ISP's MLVNR endpoint accel/ane: run Apple's camera programs, serve the ISP's MLVNR endpoint Nov 21, 2026
@m0d16l14n1

m0d16l14n1 commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor Author

J815 run, 2026-11-21: MLVNR streams with the IO_T2H change (this ANE build as the boot driver, the ISP side from #2645 as a module, sensor config 6)

Try Gain thresholds Stream IO_T2H reports taken / left FW requests ISP surfaces mapped / freed Doorbells by bit 0..7
1 (run A) 1x (forced) 20 s, 577 frames, 28 fps 1725 / 0 1759 33 / 33 0 1 0 0 0 4 1116 0
2 (run A) 14x / 11x (macOS auto) 20 s, 578 frames 0 / 0 (idle; analogue gain 8x) 66 33 / 33 0 1 0 0 0 5 0 0
1 (run B) 1x (forced) 20 s, 577 frames, 28 fps 1725 / 0 1791 33 / 33 0 1 0 0 0 5 1113 0
2 (run B) 14x / 11x (macOS auto) 20 s, 578 frames 0 / 0 34 33 / 33 0 1 0 0 0 4 0 0
  • In every try: no ANE or ISP assert, DART error status 0 on all three DARTs, and a clean link down.
  • About three reports per frame: the network has 11 procedures, and the ISP runs several of them per frame.
  • The first report is a standard event (0x0300, 0x60 bytes): UUID 0x10000001a, program 2, process 2, procedure 6, state 0, destination 1.
  • Before this change, the same set-up asserted 6.4 s in (CRPCClient.cpp, 303: out of command cache!).

Noise: the two noise runs on this boot measured the camera-denoise output in auto mode, where MLVNR was idle. Their centre luma noise was 0.32 and 0.30, at different exposures, so they say nothing about MLVNR. A raw-camera A/B (off / forced on / off / forced on) is the next run.

Open: macOS sends the same auto-mode words (CmdMLVNRModeConfigSet: ctrl 2, TotalGainThreshold 3584/2816, 30/30 fps, ramp 30), and yet in the traced macOS session MLVNR was applied on 984 of 987 frames (BWTemporalFilterNode count). So either that session's total gain was above 14x, or Linux misses something that engages it. That is open: the 8x above is the analogue gain only (it sat at 2048, likely its cap), not the total gain the firmware compares.

@m0d16l14n1
m0d16l14n1 marked this pull request as ready for review November 21, 2026 10:41
@RyanTheTide

Copy link
Copy Markdown
Contributor

Read the HWX and program side with untrusted input in mind. The new parsing stays bounded:

  • surface_count is capped at ANE_H16_SURFACES before every increment, so slots = max(5, surface_count + 2) and the table + slots * 16 > 0x810 check can't wrap;
  • names are strnlen-bounded against both the record length and ANE_H16_NAME_MAX, with the trailing bytes checked to be zero;
  • the net procedure name is limited to 8 bytes before it is copied.

On the MLVNR side, the AFPP image is size-capped (ANE_FW_AFPP_MAX) and mapped read-only, ISP surfaces must fit the fixed map span, and a control command with no answer quarantines the session like a LOAD without an answer.

Two notes:

  • The uapi driver minor goes to 2. Userspace that only checks for "≥ 1" will pick up the multi-output programs, so a line in ane_accel.h saying what minor 2 adds (several outputs, wide LOAD) would tell it what it may rely on.
  • ane_h16_session_control() sends a control command outside any program. Is it reachable from userspace, or only from the ISP link (ane-isp.h)? If it's kernel-only, a comment saying so would close the question of whether a client can send arbitrary control opcodes.

Assisted-by: LLM (Claude:Opus 5.5)

@m0d16l14n1

Copy link
Copy Markdown
Contributor Author

Thanks. Both are in f8947c9, which changes comments only:

  • Minor 2: the uapi header now says that minor 2 also lets plain H16_LOAD take a program with several outputs (minors 0 and 1 refuse one, outputs != 1), as well as adding H16_LOAD_WIDE. Userspace that relies on several outputs should check for minor 2.
  • ane_h16_session_control() is kernel-only, and its comment now says so. No ioctl reaches it. Its one caller is the ISP link in ane_fw_cold.c (ane_isp_endpoint_enable()/_disable()), which builds every command itself: LOAD/UNLOAD_AFPP, IPC_ENDPOINT_SET2/UNSET2, MCACHE_SIZE_GET and DEFAULT_SETTING_SET. A client can't choose the opcode or the body. It is exported only because that caller is in the ane_t6021 module.

Assisted-by: Claude Opus 5.5

@RyanTheTide

Copy link
Copy Markdown
Contributor

One thing to settle before this merges: at f8947c9 ane_fw_cold.c adds six module parameters, and merged code should pick its behaviour itself on the default command line.

  • isp_link (on) and isp_surface_map (on): if these are always right, they can be fixed behaviour. The link could come up when the ISP side actually asks for it, and stay down with one info line if the endpoint or the firmware isn't there.
  • isp_gate_off and isp_mcache_query (off): either the J815 MLVNR runs need them, and then they should be fixed behaviour, or they don't, and then they can go. Leaving them as off-by-default switches puts two untested paths in the tree.
  • isp_mcache_dsid (0xc): if the firmware query in isp_mcache_query returns the client's spill DSID, use that value. If nothing provides it, the feature should stay off rather than carry a constant.
  • isp_fwlog: a dev_dbg/dynamic-debug print does the same job without a parameter.

The same applies to the ISP side's last parameter (mlvnr, #2645), so the two PRs can switch on together.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks for the MLVNR work and the detailed J815 rows. Two things, on top of the module-parameter note above:

  • Provenance. The network itself is loaded at runtime with request_firmware() from the Mac's own files, and no Apple file is added, which is how we want it. But several comments name macOS driver internals: ane_fw_cold.c:2105,2143,2158,2180 (AppleH16ANEInterface, ANEHWDevice::..., DecodeFirmwareAllocationUsageField with its bit layout) and ane_h16_protocol.h:19,27,34 (ANEFirmwareManager::...). Could you say where each of these came from? If they are from your own log or trace captures, please describe them as what was observed on the wire (command, offsets, reply) and drop the internal function names; anything read out of the macOS binaries can't go into this tree.
  • isp_mcache_dsid = 0xc (ane_fw_cold.c:2167) is the value macOS hands out. If MCACHE_SIZE_GET or another firmware reply gives the client's DSID, please take it from there; otherwise keep the feature off rather than carry the constant.

Happy to run no-regression rows on our M1 Pro / M2 / M4 Pro / A18 Pro once the parameters are gone.

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Adversarial review against pre-pr-checklist.md (§1–§6) at f8947c905533 (host-tests: green).

Part 1 (long HWX names, multi-output programs, ANE_H16_LOAD_WIDE, heap-allocated parser temporaries, minor 2 UAPI) is bounded and clean in structure, but several hard checklist blockers and code bugs in Part 2 must be resolved before merge.

Blockers (§4 — Attribution & clean-room)

  1. AI trailer inside all 5 git commits (§4): Commits e1a1a460, 33e01b08, 292d7e54, b91ac5e7, and f8947c90 all contain Assisted-by: Claude Opus 5.5 in their commit messages. Under §4, commits must carry human identity and human Signed-off-by: only — no Assisted-by: (or other AI trailers) inside commits (keep Assisted-by: at the end of the PR body only).
  2. Apple macOS driver internal symbol names and firmware assert strings in public code/commits (§4): None of these exist in integration/aurora's baseline ane_fw_cold.c / ane_h16_protocol.h and must be removed/reworded as clean-room wire observations (or dropped if sourced from Apple binaries):
    • drivers/accel/ane/ane_fw_cold.c:2105-2106,2135,2143,2147,2158,2180,2271 (AppleH16ANEInterface, ANEFirmwareManager, ANE_IPC_PowerOnByPeer, ANEHWDevice::handleISPClientMCacheRequest, exact firmware assert string "pSwitchedOutReq->request.mcacheDsid != (0xFF)", ANEHWDevice::ANE_processISPSurfaceMapRequest, DecodeFirmwareAllocationUsageField, ANE_processISPSurfaceUnMapRequest).
    • drivers/accel/ane/ane_fw_transport.h:108,739 and drivers/accel/ane/ane_fw_transport_test.c:788 (ANE_processISPSurfaceMapRequest, ANE_sendISPSurfaceRemapAck).
    • drivers/accel/ane/ane_h16_protocol.h:18-20,27-30,34-38 (AppleH16ANEInterface, ANEFirmwareManager::sendAFPPLoadCmd, sendIPCEndpointSetCmd, getMCacheSize, handleISPClientMCacheRequest, setMCacheDSIDs).
    • Commit messages (33e01b08, b91ac5e7) also reference AppleH16ANEInterface, ANEFirmwareManager::..., and firmware source/line strings (CRPCClient.cpp:303, CAneClient.cpp:1375).

Blockers (§2 / §3 — Production-ready, no hacks / module parameters / hardcoded macOS values)

  1. Six new module parameters & bring-up switches (drivers/accel/ane/ane_fw_cold.c:2125-2169): isp_link, isp_fwlog, isp_gate_off, isp_mcache_query, isp_surface_map, and isp_mcache_dsid violate §2 (default kernel command line, no lab-only switches or dead off-by-default code paths).
    • Remove isp_link and isp_surface_map and make them fixed behaviour when the ISP requests the link and provides surface_get/surface_put.
    • Remove isp_fwlog (use dev_dbg / dynamic debug).
    • Either drop isp_gate_off and isp_mcache_query if J815 MLVNR does not need them, or wire required behaviour unconditionally without switches.
    • Hardcoded isp_mcache_dsid = 0xc (ane_fw_cold.c:2167): Do not carry a macOS-observed magic constant; derive any spill DSID from firmware/hardware or omit the setting until Linux allocates/provides it.

Code bugs to fix (Part 2 — drivers/accel/ane/ane_fw_cold.c)

  1. Dangling IOMMU mapping & leaked resources after firmware reboot (ane_fw_isp_replay() / ane_isp_endpoint_disable() / ane_isp_link_put(), lines 2540–2549, 2774–2874):
    • When a firmware reboot/sleep calls ane_fw_isp_replay() under a live link, it sets l->live = false without cancelling b->isp_service, unmapping b->isp_rings_mapped, releasing b->isp_maps, or clearing b->session.gate_pinned.
    • When the ISP then calls ane_isp_endpoint_disable(l), line 2778 (if (IS_ERR_OR_NULL(l) || !l->live) return;) returns immediately — skipping cancel_delayed_work_sync(&b->isp_service), leaving the ISP's ring pages mapped in the ANE DART while the ISP frees them, leaving b->isp_maps pinned, and leaving gate_pinned stuck true.
    • In ane_isp_link_put(), lines 2866–2870 touch b->isp_map_count and b->isp_maps[i].put = NULL without b->session.lock while isp_service may still be active if l->live was cleared by replay.
  2. Off-by-one IOMMU unmap on ane_fw_map() failure (ane_fw_isp_afpp_map(), lines 2467–2485):
    • When ane_fw_map(b, dva + off, pa, PAGE_SIZE, IOMMU_READ) fails inside iommu_map(), the page at dva + off was never mapped into b->domain, yet line 2469 executes off += PAGE_SIZE; goto unwind; so iommu_unmap(b->domain, dva, off) attempts to unmap the unmapped page as well. (Conversely, if ane_fw_map() fails on the DART error check after iommu_map() succeeded, ane_fw_map() itself leaks that mapping.) Make ane_fw_map() clean up on DART error and unwind dma_unmap_page() for the failed page without inflating the iommu_unmap() length.
  3. Ring unmap size mismatch (ane_fw_isp_rings_map(), lines 2515–2530 & unmap: at line 2746):
    • Setting b->isp_rings_mapped = true before if (mapped != total) causes the caller's unmap: path to call iommu_unmap(b->domain, b->isp_ring_dva, b->isp_ring_span) on a partial mapping instead of mapped (and likewise over-unmaps if a later enable passes total < b->isp_ring_span). Track the exact mapped length (and unmap mapped directly on partial map failure).

Hardware/runtime evidence still owed after fixes (§5)

  • Full regression run on the final rebased head (kernel/build ID + 0 SELinux denials, 0 failed units, 0 new kernel errors) on J815 (default cmdline, both Part 1 segmentation and Part 2 MLVNR) plus non-regression on other H16/H17 machines (and confirming ane-h16-program KUnit passes cleanly).

Assisted-by: LLM (Gemini 4 Neon)

…al outputs, wide LOAD

What the camera's segmentation program needs from the H16 program path:

- HWX surface names up to 64 bytes and procedure names other than 'main';
- programs with several outputs and a BAR slot table of any size;
- ANE_H16_LOAD_WIDE, for programs of up to 16 surfaces (plain H16_LOAD
  refuses more than 4 with -E2BIG, since its arrays cannot report them);
- driver minor 2: plain H16_LOAD now also takes a program with several
  outputs, where minors 0 and 1 refused one, so userspace that relies on
  several outputs checks for minor 2 (the uapi header says so);
- the parser's large temporaries on the heap (stack use);
- h16-sections.py builds the sections of a program with several outputs.

Run on a J815 (2026-11-21): the user's person and skin segmentation
program (two outputs) ran at 15 runs/s for the camera effects in
aurora-silicon/camera-denoise#16.

Signed-off-by: Nick <nekreshen@yandex.ru>
@m0d16l14n1
m0d16l14n1 force-pushed the j815/ane-apple-programs branch from f8947c9 to 470794e Compare November 22, 2026 14:34
@m0d16l14n1 m0d16l14n1 changed the title accel/ane: run Apple's camera programs, serve the ISP's MLVNR endpoint accel/ane: run vendor-compiled camera programs, serve the ISP's MLVNR endpoint Nov 22, 2026
@m0d16l14n1

Copy link
Copy Markdown
Contributor Author

@RyanTheTide @DjDeveloperr thanks. Force-pushed 470794ee, rebased onto integration/aurora 17075e3. The body lists each item and its fix. In short:

  • all six module parameters are gone, and so are MCACHE_SIZE_GET/DEFAULT_SETTING_SET, the DSID constant and the gate pin;
  • the three teardown bugs are fixed (replay under a live link, the ane_fw_map() unwind, the ring unmap length);
  • the commits carry only Signed-off-by;
  • KUnit on this head: 302 tests, 301 pass, 1 skipped (needs CONFIG_UCLAMP_TASK), 0 warnings.

Provenance (Ryan's question). You asked where the names and layouts came from. Not all of it is from captures on the wire, so here is each source:

  1. macOS's kernel log on this J815, read with log show. The ANE and camera drivers log the commands they send with their arguments, for example the LOAD_AFPP address and size and the SET2 index. They also log the ISP surface allocations and frees.
  2. A hypervisor trace of a macOS 27.2.1 camera start on this J815. It gave the doorbell address and selector the ISP gets for the ANE, the read-only DART flags of the network package, and the DART page counts.
  3. A reading of the compiled macOS ANE and camera drivers in the 27.2.1 kernelcache, with r2. Its symbols are where the function names in the old comments came from. It is also where the byte layouts of LOAD_AFPP and IPC_ENDPOINT_SET2 come from. So do the meaning of SHAREDMALLOC (0, 0, id) as "map ISP surface id" and its two answers, (DVA|1, size, id) and (1, 0, id). The old comments said "as seen in traces", and that was wrong. I have corrected the comments and the commit message.
  4. The J815 under Linux. Every layout and answer was then run against the J815's firmware. The firmware accepted the commands. Without the surface-by-ID answer, the ANE hung on the first request. With it, MLVNR streamed. These results are in the body.

Under your rule ("anything read out of the macOS binaries can't go into this tree"), point 3 means Part 2 doesn't qualify as it stands. I didn't want to hide that behind reworded comments. Part 1 doesn't use point 3, as far as my notes show: it was worked out from the user's own program file and from J815 runs. The body now has the same section.

For Part 2, I see two options:

  • Re-derive the layouts from observation only. One way is a hypervisor trace of the command ring memory at a macOS camera start, which I can set up but haven't run. The two commands and the SHAREDMALLOC answers would then be rewritten from what it shows. Part 2 would stay out until then, and could be split off so Part 1 can go in alone.
  • Your call that the interface facts may stay: opcodes, field offsets and the reply format, with no code copied.

Which do you prefer? Until you decide, I'll treat Part 2 as blocked on this. The ISP half in #2645 has the same sourcing (its endpoint config and the surface ID answer come from the same reading), so your decision covers both PRs.

Still owed on this head: the J815 run without the system-cache query, and the regression line. I'd be glad to take the M1 Pro / M2 / M4 Pro / A18 Pro rows you offered.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks for the rework and for laying out the sources so plainly.

Earlier points, at 470794e:

  • Minor 2 is documented in ane_accel.h, and ane_h16_session_control() is commented as kernel-only. It isn't reachable from any ioctl. Both fixed.
  • The six module parameters, MCACHE_SIZE_GET/DEFAULT_SETTING_SET and the DSID constant are gone. Fixed.
  • The macOS function and class names are gone from the code and the messages. Fixed.

On provenance: the LOAD_AFPP and IPC_ENDPOINT_SET2 layouts and the SHAREDMALLOC (0, 0, id) answers were read out of the kernelcache. That puts them in the same category as the names, and the second option (keep the interface facts, drop the copied code) doesn't change that. Part 2 can't go in on that basis, and neither can the matching part of #2645. Please split Part 1 into its own PR, or drop 470794e from this one, so it can move on by itself.

For Part 2, the route that works is the first one you offered: a hypervisor trace of the command ring and the SHAREDMALLOC slots at a macOS camera start, kept as a capture with a short write-up of what it shows. The commands and the answers then get rewritten from that write-up, and the commit message cites only the log and the trace. Ideally someone who hasn't read the disassembly writes the code from the write-up.

Part 1 (c39ec3c) looks good:

  • struct drm_ane_h16_load_wide is 232 bytes with no holes and keeps drm_ane_h16_load's field order.
  • -E2BIG is checked before anything loads, so the copy-out never runs past the 4-entry arrays.
  • EXEC and the surface mmap are bounded by ANE_H16_SURFACES and the program's resource_count.
  • The long-name and procedure-name parsing stays bounded.
  • The commits carry only Signed-off-by.

Some things to carry into the Part 2 rewrite:

  • ane_isp_endpoint_disable() with the engine parked or asleep leaves the ring pages mapped in the ANE DART until the next enable. But no reference is held on them, and the ISP frees them right after the disable. Either hold a page reference until the deferred unmap, or clear the page-table entries now and defer only the TLB invalidate.
  • ANE_FW_ISP_DOORBELL (engine + 0x1660000, selector 1) is handed to the ISP on every SoC this backend runs on, and it has only been checked on T8142. It should come from the ANE's DT node, and the link should be refused when the node doesn't describe it.
  • Small: the direct path of ane_fw_isp_send()/ane_fw_isp_up() is no longer called. Also, the comment meant for ane_isp_endpoint_disable() now sits above ane_fw_isp_dart_report().

Hardware for Part 1 at its new head: a J815 row on the default command line, plus no-regression rows on the other machines that run this program path (M4 Pro J616s, M4 Air J713, A18 Pro). Each row should show an existing single-output program loading and running, and plain H16_LOAD of a program with more than 4 surfaces returning -E2BIG. We can take the M4 Pro and A18 Pro rows once Part 1 is on its own head.

Assisted-by: LLM (Claude:Opus 5.5)

@m0d16l14n1
m0d16l14n1 force-pushed the j815/ane-apple-programs branch from 470794e to c39ec3c Compare November 22, 2026 17:11
@m0d16l14n1 m0d16l14n1 changed the title accel/ane: run vendor-compiled camera programs, serve the ISP's MLVNR endpoint accel/ane: run vendor-compiled camera programs: long HWX names, several outputs, wide LOAD Nov 22, 2026
@m0d16l14n1

Copy link
Copy Markdown
Contributor Author

@RyanTheTide thanks, understood. The MLVNR commit is dropped from this PR. The head is now c39ec3c9, Part 1 alone, on 17075e3:

  • KUnit there: 298 tests, 297 pass, 1 skipped (CONFIG_UCLAMP_TASK), 0 warnings, in a fresh build dir.
  • The body now covers only Part 1, and lists the rows you asked for.

I'll post the J815 row at this head on the default command line, with a single-output program, the two-output segmentation program through H16_LOAD_WIDE, and the -E2BIG check. The M4 Pro and A18 Pro rows you offered would be very welcome. I'll look for a J713 row too.

For the ISP endpoint, I'll follow the route you describe:

  1. a hypervisor trace of the command ring and the SHAREDMALLOC slots at a macOS camera start, kept as a capture with a short write-up;
  2. code rewritten from that write-up, ideally by someone who hasn't read the disassembly;
  3. a commit message that cites only the log and the trace.

That rewrite will also take your three points: hold a page reference until the deferred unmap, or clear the PTEs now; the doorbell from the ANE's DT node, refusing the link without it; and the dead direct path plus the misplaced comment. It will come as a new PR.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks. At c39ec3c this is Part 1 alone, the part I'd already read as clean: drm_ane_h16_load_wide has no holes, -E2BIG comes before any load, and EXEC/mmap are bounded by the surface limit. Approving Part 1 from my side, pending the J815 row you listed. We'll post the M4 Pro and A18 Pro rows at this head: a single-output program loads and runs, and plain H16_LOAD of a program with more than 4 surfaces returns -E2BIG. The ISP endpoint plan (trace, write-up, rewrite, new PR) is the right route.

One housekeeping point: the dropped commits are still reachable from this PR's timeline. For the MLVNR table, please ask a maintainer to have them purged, or say if you'd prefer this reopened from a clean branch.

Assisted-by: LLM (Claude:Opus 5.5)

@m0d16l14n1

Copy link
Copy Markdown
Contributor Author

@RyanTheTide thanks for the approval. I'll post the J815 row at c39ec3c9.

On the housekeeping point: could a maintainer please have the dropped heads purged? The MLVNR code is in both PRs' old history, and #2645's also has the firmware-derived input table:

I've deleted the old j815/isp-camera-fx branch from my fork. Nothing else of mine points at those commits.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks, that list is exactly what's needed. I've passed it, with the #2645 heads and the camera-denoise#16 ones, to the repository owner for a purge request to GitHub. Deleting the fork branch was the right step on your side.

Assisted-by: LLM (Claude:Opus 5.5)

@m0d16l14n1

Copy link
Copy Markdown
Contributor Author

Closing this: I'm taking the J815 camera work out of the upstream trees for now and continuing it on my own machine. The M4 Pro and A18 Pro rows aren't needed anymore. The purge request for the dropped heads above (and for #2645) still stands. Thanks for the reviews.

Assisted-by: LLM (Claude:Opus 5.5)

@m0d16l14n1 m0d16l14n1 closed this Nov 22, 2026
@m0d16l14n1
m0d16l14n1 deleted the j815/ane-apple-programs branch November 22, 2026 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants