ampere-av1 Phase 2 (master): fourth-fd probe + AV1 enumeration #5
Reference in New Issue
Block a user
Delete Branch "claude-noether/libva-v4l2-request-fourier:noether/av1-enumeration-phase2"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes the headline acceptance criterion of marfrit/libva-v4l2-request-fourier#2 — "vainfo on ampere lists VAProfileAV1".
What this PR is
A minimal master-side port of the operator's in-progress
av1-iter1Phase 2 work (commitsbed75c0+61db76eon that branch). Hand-ported because cherry-pick has conflicts with iter39/iter40 changes that landed on master after av1-iter1 forked from iter38b. Naming usesvpu981to match the operator's convention so the eventual av1-iter1 → master merge resolves cleanly.What's in scope
video_fd_vpu981+media_fd_vpu981instruct request_dataVA_DRIVER_INITwalking hantro-vpu media nodes for an instance advertisingV4L2_PIX_FMT_AV1_FRAME(OUTPUT-format probe — DTS-independent; the only reliable disambiguator since all 3 hantro instances on RK3588 reportdriver="hantro-vpu"+model="hantro-vpu")'a'kind inrequest_device_kind_for_profile+ dispatch inrequest_switch_device_for_profilevideo_fd_vpu981added toany_fd_supports_output_formathelper (same off-by-one that bit av1-iter1's enumeration for a week)VAProfileAV1Profile0→V4L2_PIX_FMT_AV1_FRAMEinpixelformat_for_profileVAProfileAV1Profile0push inRequestQueryConfigProfiles+RequestQueryConfigEntrypoints+RequestCreateConfigRequestTerminate(also picks up therpi_hevc_decfds that were missing from cleanup — defensive fix)V4L2_REQUEST_MAX_PROFILESbumped 13 → 14: defensively sized for post-Option-B-revert future. With Hi10P + Main10 + AV1 all enumerated, total = 13. Per-group guards useindex < MAX - N; for a singleton push to succeed at index=13 we need MAX ≥ 14. Bumping now avoids a silent drop when Option B eventually reverts.What's out of scope
av1-iter1): ~700 LoC av1.{c,h} + picture.c dispatch wiring + 3/10 frames bit-exact. That stays in the operator's branch; this PR makes master's enumeration coherent so the eventual merge has a smaller delta.Consequence today:
vaCreateContext(VAProfileAV1Profile0)succeeds at the libva layer, but consumers callingvaRenderPicturewith AV1 buffers will fail cleanly (no av1_set_controls dispatch yet). The bit-exact decode-side work continues inav1-iter1.Verification
On ampere (RK3588, freshly-rebooted to
7.0.0-rc3-vp9-test+kernel), 2026-05-18:Build clean on ampere with GCC 16.1.1; no new warnings. ampere's running
.sorestored to theav1-iter1build after verification — this PR's.sowas NOT permanently installed.🤖 Generated with Claude Code