forked from marfrit/libva-v4l2-request-fourier
daedalus_v4l2: add to known_decoder_drivers + multi-device-probe slot
Phase 8.10 of the daedalus-v4l2 sibling campaign — out-of-tree
V4L2 stateless decoder shim that forwards bitstream to a
userspace daemon (FFmpeg-software decode for VP9 / AV1 / H.264;
pixels back via dmabuf into the CAPTURE buffer).
Adds the same iter40-shaped wiring as rpi-hevc-dec:
- known_decoder_drivers[] entry "daedalus_v4l2"
- video_fd_daedalus + media_fd_daedalus slots in driver_data
- -1 init alongside the other multi-device slots
- primary-driver detection branch in the auto-probe block
- post-probe log line for symmetry with iter40
No per-profile dispatch changes needed — daedalus_v4l2 advertises
the standard V4L2_PIX_FMT_{VP9_FRAME,AV1_FRAME,H264_SLICE}
OUTPUT fourccs the fork's existing per-driver paths already
handle.
Verified on hertz (Pi 5 / CM5, 6.12.75+rpt-rpi-2712) with the
daedalus_v4l2 module loaded:
LIBVA_DRIVER_NAME=v4l2_request \
LIBVA_V4L2_REQUEST_VIDEO_PATH=/dev/video0 \
LIBVA_V4L2_REQUEST_MEDIA_PATH=/dev/media3 \
vainfo --display drm --device /dev/dri/renderD128
v4l2-request: opened daedalus_v4l2 at video_fd=... media_fd=... (Pi 5 daemon-backed VP9/AV1/H264)
vainfo: Driver version: v4l2-request
vainfo: Supported profile and entrypoints
VAProfileH264Main : VAEntrypointVLD
VAProfileH264High : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264MultiviewHigh : VAEntrypointVLD
VAProfileH264StereoHigh : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileAV1Profile0 : VAEntrypointVLD
Without the env override the auto-probe still picks rpi-hevc-dec
first (it's earlier in known_decoder_drivers[]); on the standalone
daedalus_v4l2 path the daemon-backed decode is what answers
S_FMT/QBUF/DQBUF. On a mixed-driver Pi 5 box where both modules
are loaded, HEVC continues to route through rpi-hevc-dec via the
existing 'p' override; VP9/AV1/H264 would prefer daedalus_v4l2
since rpi-hevc-dec is HEVC-only.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -94,6 +94,7 @@ static const char * const known_decoder_drivers[] = {
|
||||
"rkvdec",
|
||||
"hantro-vpu",
|
||||
"rpi-hevc-dec", /* iter40: Pi 5 / CM5 stateless HEVC */
|
||||
"daedalus_v4l2", /* phase 8.10: Pi 5 daemon-backed VP9/AV1/H264 */
|
||||
"cedrus",
|
||||
"sun4i_csi",
|
||||
NULL
|
||||
@@ -659,6 +660,8 @@ VAStatus VA_DRIVER_INIT_FUNC(VADriverContextP context)
|
||||
driver_data->media_fd_hantro = -1;
|
||||
driver_data->video_fd_rpi_hevc_dec = -1;
|
||||
driver_data->media_fd_rpi_hevc_dec = -1;
|
||||
driver_data->video_fd_daedalus = -1;
|
||||
driver_data->media_fd_daedalus = -1;
|
||||
driver_data->video_fd_vpu981 = -1;
|
||||
driver_data->media_fd_vpu981 = -1;
|
||||
|
||||
@@ -700,6 +703,19 @@ VAStatus VA_DRIVER_INIT_FUNC(VADriverContextP context)
|
||||
alt_driver = NULL;
|
||||
driver_data->video_fd_rpi_hevc_dec = video_fd;
|
||||
driver_data->media_fd_rpi_hevc_dec = media_fd;
|
||||
} else if (strcmp(info.driver, "daedalus_v4l2") == 0) {
|
||||
/* phase 8.10: Pi 5 daemon-backed decoder. Sole
|
||||
* V4L2 stateless slot on this kernel; VP9 / AV1 /
|
||||
* H.264 all route through it. Other slots stay -1.
|
||||
*
|
||||
* On a mixed-driver box (daedalus loaded ALONGSIDE
|
||||
* rpi-hevc-dec) HEVC would prefer rpi-hevc-dec via
|
||||
* the existing 'p' override; VP9/AV1/H264 prefer
|
||||
* daedalus_v4l2 since rpi-hevc-dec is HEVC-only. */
|
||||
primary_driver = "daedalus_v4l2";
|
||||
alt_driver = NULL;
|
||||
driver_data->video_fd_daedalus = video_fd;
|
||||
driver_data->media_fd_daedalus = media_fd;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -807,6 +823,12 @@ VAStatus VA_DRIVER_INIT_FUNC(VADriverContextP context)
|
||||
driver_data->video_fd_rpi_hevc_dec,
|
||||
driver_data->media_fd_rpi_hevc_dec);
|
||||
}
|
||||
if (driver_data->video_fd_daedalus >= 0) {
|
||||
request_log("phase 8.10: opened daedalus_v4l2 at video_fd=%d "
|
||||
"media_fd=%d (Pi 5 daemon-backed VP9/AV1/H264)\n",
|
||||
driver_data->video_fd_daedalus,
|
||||
driver_data->media_fd_daedalus);
|
||||
}
|
||||
|
||||
status = VA_STATUS_SUCCESS;
|
||||
goto complete;
|
||||
|
||||
@@ -96,6 +96,18 @@ struct request_data {
|
||||
*/
|
||||
int video_fd_rpi_hevc_dec;
|
||||
int media_fd_rpi_hevc_dec;
|
||||
/*
|
||||
* phase 8.10: fifth multi-device-probe slot for daedalus_v4l2 — the
|
||||
* out-of-tree V4L2 stateless decoder shim that forwards bitstream
|
||||
* to a userspace daemon (daedalus-v4l2 sibling repo). Daemon does
|
||||
* FFmpeg-software decode for VP9 / AV1 / H.264 and ships pixels
|
||||
* back via dmabuf into the CAPTURE buffer. Picked up via the
|
||||
* same media-controller probe + known_decoder_drivers[] entry
|
||||
* pattern as iter40 rpi-hevc-dec. Stays -1 on hosts without the
|
||||
* daedalus module loaded; HEVC routes to rpi-hevc-dec as before.
|
||||
*/
|
||||
int video_fd_daedalus;
|
||||
int media_fd_daedalus;
|
||||
/*
|
||||
* ampere-av1-enablement Phase 2: fourth multi-device-probe slot
|
||||
* for vpu981 (RK3588's dedicated AV1 hantro instance, kernel
|
||||
|
||||
Reference in New Issue
Block a user