Repository navigation
media: apple: avd: harden stream validation and reset recovery - #712
Closed
RyanTheTide wants to merge 4 commits into
Closed
RyanTheTide wants to merge 4 commits into
RyanTheTide wants to merge 4 commits into
Conversation
Complete AV1 tile validation with the context-update tile index bound, which also rejects empty tile grids. Keep the existing descriptor-count limit. Reject VP9 tile_rows_log2 above two before drivers use it in shifts or tile loops. These checks match the public AVD v3 series by Sofus Forstreuter. Link: https://lore.kernel.org/linux-media/20261020-avd-v3-4-85cbaa2125d8@icloud.com/ Link: https://lore.kernel.org/linux-media/20261020-avd-v3-5-85cbaa2125d8@icloud.com/ Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
… state Stop translation before replacing an ordinary stream's TTBRs and propagate TLB invalidation failures. Restore the preceding domain if attachment fails, or leave DMA disabled if restoration also fails. Balance runtime PM on acquisition failures and move stream membership out of the old domain only after a successful switch. AVD recovery needs to attach an empty paging domain and detach back to the DMA domain after resetting the decoder. Keep firmware-owned and managed streams outside this recovery mechanism. Add KUnit coverage for two-stream membership transfer without removing another client's stream. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Reject H.264 MBAFF/PAFF and field pictures, multiple slice groups and coded sizes above 4096x4096 with rate-limited diagnostics. Validate component formats across codecs and check AV1 tile coordinates and payload ranges. Apply and validate effective request controls before either frame_ops or the legacy builder can prepare a hardware program. Complete requests at core retirement, including preparation failures and held-slice requests. Recover by resetting the decoder, attaching and detaching an empty paging domain, then rebooting the backend. Preserve completed results and prepared slots that firmware never owned after successful recovery. Fail prepared slots too if recovery fails, and cancel only the draining context's pending slots during streamoff. An inbox retry timeout needs no global reset. Require a recovery domain at probe and manage its cleanup on error paths. Add validation KUnit cases, reset ownership tests and a portable host runner that compiles the production V4L2 validation helpers under host shims. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Record the public upstream reference scores and annotate known unsupported vectors without skipping them or changing raw scores. Include 14 interlaced AVC vectors verified from checksum-matched public ITU archives and format limits from pinned Fluster catalogues. Run each suite after preceding failures, preserve logs and decoded output, record catalogue hashes and return codes, and refuse to overwrite evidence. Provide explicit V4L2 stateless decoder commands, optional ffprobe annotation, a plan mode and host tests for failure continuation and evidence preservation. Link: https://lore.kernel.org/linux-media/20261020-avd-v3-0-85cbaa2125d8@icloud.com/ Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Contributor
Author
|
The stream validation, DART live paging-domain flush, and decoder reset/recovery here landed separately on integration/aurora: #758 (recovery detach/reset), #1090 and #1091 (AV1 tile-entry checks; no reset in recovery), and #1116 (macOS H.264/HEVC slice and scaling parity). The frame-op branch this was cut from is no longer used. Closing. |
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.
Malformed tile controls and unsupported H.264 pictures can reach the video processor and stall decoding across contexts. Reject them before either codec preparation path emits a hardware program, and recover timed-out submitted frames through reset, an empty DART paging-domain switch, and backend reboot.
drivers/media/platform/apple/avd/tests/conformance/README.md. Fourteen AVC interlace marks were checked against checksum-matched public ITU archives. Marks never skip vectors or change denominators.Validation: queue host stress passed 100,000 operations with 36,424 ordered retirements; four validation KUnit cases passed under host shims compiling the production V4L2 validators; fluster orchestration tests passed, including continuation after decoder failure and preservation of existing evidence. Added in-kernel KUnit cases cover validation and DART/queue bookkeeping.
Pending: in-kernel arm64 KUnit, the arm64 W=1 WERROR build, and live DART/reset/fluster qualification. No build or device request was issued for this task. The host shim run does not exercise the kernel control framework or MMIO.
Based on
avd/rewrite-coreata11617279b458d19e7703e545604e2f1d41d55d6. The DART change is a separate commit.Public reference: AVD v3 cover letter and conformance scores.