firefox-fourier patch #3: accept AV_HWDEVICE_TYPE_V4L2REQUEST too #61
Reference in New Issue
Block a user
Delete Branch "fix/firefox-v4l2request-type-accept-2026-05-21"
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 part of #60 (firefox-side patch update for fourier2 ffmpeg).
libavcodec61-fourier2 registers hwaccels with
AV_HWDEVICE_TYPE_V4L2REQUEST(FFmpeg 7.1+ dedicated enum), notAV_HWDEVICE_TYPE_DRMas fourier1 did. Firefox patch walked hw_configs looking only for DRM → fell through to SW.Changes:
CreateV4L2RequestDeviceContexttakesint aDeviceType(Mozilla bundled headers may lack the enum), hw_configs walk accepts DRM OR V4L2REQUEST (int values 13 Kwiboo, 14 upstream-AMF), member renamedmDRMDeviceContext→mV4L2RequestDeviceContext.+75/-48 lines, all internal-to-patch-3.
Verified end-to-end on higgs (autonomous 02:17 test) that the currently-installed firefox
1:150.0.3-1+rpt1+fourier2hits exactly the gap this PR addresses. After the test ran (apt update + restart daedalus + relaunch firefox against /tmp/bbb-test.html with MOZ_LOG decoder tracing):All six codecs advertise
v4l2requestin their hwaccel list (the new dedicatedAV_HWDEVICE_TYPE_V4L2REQUESTtype — value 13 on Kwiboo's tree per the patch's V4L2REQUEST_KWIBOO constant). Firefox's current0003walk only matchesAV_HWDEVICE_TYPE_DRM, so the walk falls through and every codec lands on SW. This PR's expanded acceptance (DRM OR V4L2REQUEST_KWIBOO OR V4L2REQUEST_UPSTREAM) plugs exactly that.The patch shape is clean:
AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTXcheck is the missing prereq before bindinghw_device_ctxSequencing flag
The commit message ends with "Build pkgrel will be bumped at debian-package level to +fourier2." But higgs currently has firefox
1:150.0.3-1+rpt1+fourier2installed — that's the build with the broken patch. For apt to see the rebuild, the next package needs to land as+fourier3(or+fourier2with a pkgrel bump, e.g.1+rpt1+fourier2~2). Likely just a typo in the commit message — flagging so the rebuild lands at a version higgs will actually pull.Once merged + rebuilt + installed on higgs, the same autonomous test (/tmp/test-firefox-hwdecode.sh) should flip to ✅ PASS with daemon REQ_DECODE traffic at H.264 30fps.
Closing — the hand-written 0003 update in this PR has malformed hunk offsets (
patch: malformed patch at line 231). Build pipeline shipped the same logical change via in-source sed in the firefox-rpios build script (v8 → fourier2 published to trixie pool, installed on higgs).Proper patch follow-up: regenerate via real firefox source tree (apply 0001-0005, edit manually, git diff against pre-edit baseline). Tracked separately as a marfrit-packages TODO.
Retracting this comment — wrong diagnosis.
Verified on higgs (Pi CM5) that the cause of
Codec X is not accelerated/IsHardwareAccelerated=0is NOT a probe-side gap inGetAcceleratedFormatsor any Firefox patch deficiency. It is purely operational: thedaedalus_v4l2kernel module was not loaded (DKMS source was staged under /usr/src/daedalus_v4l2-0.1.0+r24+gf0d4186/ butdkms addhad never been run on this host, so/lib/modules/.../daedalus_v4l2.kodid not exist). With the module absent:/dev/daedalus-v4l2was missing, the daemon stayed dormant (ConditionPathExists=unmet),vainfofell back to the non-existent v3d driver andvaInitializefailed, libva surfaced zero profiles,GfxInforeturned FEATURE_BLOCKED_PLATFORM_TEST for every codec, andgfxVars::Use*HwDecode()was false everywhere. Firefox was correctly falling back to SW because the underlying stack was not running.After
sudo dkms add daedalus_v4l2/0.1.0+r24+gf0d4186 && sudo dkms autoinstall && sudo modprobe daedalus_v4l2 && sudo systemctl start daedalus-v4l2,LIBVA_DRIVER_NAME=v4l2_request vainfolists H264 Main/High/CB, HEVC Main, VP9 Profile 0, AV1 Profile 0 — the daemon picks up the requests cleanly. Re-test of Firefox playback is the next step.PR #61 is fine as merged. No probe-side patch needed.