Repository navigation
media: apple: avd: introduce frame slots and backend transport foundation - #701
Merged
Merged
Conversation
Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
Keep the legacy open firmware serialized while moving program storage and completion ownership into tagged frame slots. Leave Borage activation dependent on the register and completion facts absent from the clean specification. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
Add deterministic host tests against production helpers and KUnit coverage of slot reuse, ordered retirement, watchdog wrap, inbox retry, command builders and completion parsing. Track the unproved Borage fields explicitly and preserve session generations over firmware reboot. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
Remove contexts from the scheduling list before releasing their m2m state, reject already-scheduled jobs during teardown, and keep Apple fp pointers absent on the open backend. Preserve tagged slots over inbox-full retries and avoid periodic watchdog wakeups when only submitted frames remain. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
Keep the CODECS trailer intersection with the SoC capability table when selecting the open backend. Bound firmware copies by the mapped code resource. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
Only the H.264 compatibility builder explicitly completes held slice requests during preparation. Continue submitting legacy HEVC requests that retain their capture buffer. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
…ation Prevent queued contexts from observing the same free capacity. Run preparation on a context work item because m2m try_schedule can invoke device_run synchronously while the queue mutex is held. Drain that work before freeing the context. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
This was referenced Oct 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AVD currently ties buffer ownership and mem2mem scheduling to one job context. This draft moves ownership into a 16-slot pool with generation tags, per-frame deadlines, inbox retry and ordered retirement per context. Existing codecs run through the open-firmware compatibility backend; their instruction programs now belong to the frame slot.
The shared
avd-queue.hwas published verbatim first in 138aa88. Subsequent changes only extend that interface. No firmware image is included.This is an incomplete foundation draft, not ready for merge or hardware deployment:
avd-protocol.rstrecords those gaps. The synthetic parser test layout is explicitly not a Borage wire layout.HOLD_CAPTURE_BUFretain mem2mem scheduling until retire because V4L2 currently warns unconditionally onjob_finish()for them. Other queues release scheduling at submit. A separate V4L2 API change is needed to lift that restriction.Validation: KUnit tests are supplied for dispatch reservation, slot states, tag reuse rejection, per-context retirement order, watchdog wrap, inbox-full retry, command builders and completion parsing. A host harness is supplied to exercise the production helpers over 100,000 shuffled operations; it has not run. Strict checkpatch reports 0 errors, 0 warnings and 0 checks on the new implementation/test C and helper headers. The verbatim shared contract retains its supplied comment-style warnings. Buildbox requests h-46772, h-46781 and h-46789 were auto-approved, then refused by the build volume STOP/free-space guard. Final source retry h-46793 targets a116172 and remains auto-approved, awaiting controller execution. Tests and arm64 W=1/WERROR compilation are not yet claimed as passing.
Lead hardware checks, after build verification and integration (all target access must use the controller, explicit device identity and policy approval): stage the agreed synthetic samples at
/tmp/avd-samples, then run the commands below through the lead's approved J616s execute request. These commands play no audio and have no usage/presence gates.Also required before lifting draft status: tagged queue-depth 1/2/4/8/16, two concurrent contexts, streamoff with RESERVED and SUBMITTED slots, timeout/reset injection, stale/duplicate completion injection, idle/resume and suspend/resume. Those need the queued firmware integration; the compatibility backend cannot prove 16-frame operation. Apple boot checks additionally need the missing clean register ledger and capture-verified reply fields.
Rollback: restore the previous tested kernel and separately installed open firmware. There are no DT changes, embedded Apple bytes, local machine overrides, module parameters or target writes in this draft.