Files
marfrit-packages/arch/firefox-fourier/patches/0001-gfxinfo-v4l2-stateless-fourccs.patch
T
marfrit 8756ce38be
build and publish packages / distcc-avahi-aarch64 (push) Successful in 46s
build and publish packages / lmcp-any (push) Successful in 9s
build and publish packages / lmcp-debian (push) Successful in 4s
build and publish packages / claude-his-any (push) Successful in 7s
build and publish packages / ffmpeg-v4l2-request-aarch64 (push) Successful in 12m8s
build and publish packages / claude-his-debian (push) Successful in 5s
chromium-fourier r2 + firefox-fourier 150.0.1 + KWIN_PIVOT.md
chromium-fourier:
- patch 3/3 nv12-external-oes-on-modifier-external-only.patch — adds
  NativePixmapEGLBinding::ModifierRequiresExternalOES helper, extends
  OzoneImageGLTexturesHolder::GetBinding to honor EGL external_only
  flag for NV12 dmabufs on panfrost / panthor. Validated on ohm
  (RK3566 hantro mainline 6.19.10): bbb_1080p30_h264.mp4 plays at
  34.7 % combined CPU vs ~131 % pre-patch baseline (~3.8x).
- PKGBUILD pkgrel 1->2, source array + sha256sums + prepare() hook for
  patch 4, patch numbering 1/2,2/2 -> 1/3,2/3,3/3.
- NEXT.md appended with 2026-04-28 section: patch 4 design, validation
  log, KWin GL_ALPHA bug pinpoint (preexisting since 2026-03-06,
  affects every wayland video client; unrelated to chromium-fourier),
  device-renumbering note (/dev/video1 = encoder post-reboot).
- KWIN_PIVOT.md: 4-phase plan to identify and patch KWin's
  glTexImage2D(internalFormat=GL_ALPHA) site, ohm-only test plan,
  scope discipline.
- patches/ now tracked (compiler-rt-adjust-paths, enable-v4l2,
  wayland-allow-direct-egl-gles2, nv12-external-oes); the dead-end
  chromeos-pipeline-bypass.patch removed.

firefox-fourier:
- 4 patches (gfxinfo v4l2 stateless fourccs, libwrapper hwdevice ctx,
  ffmpegvideo v4l2-request route, prefs v4l2-request default).
- PKGBUILD bumped to firefox 150.0.1, Arch toolchain glue patches
  layered in, mozconfig with --without-wasm-sandboxed-libraries for
  ALARM, package() launcher fix (rm -f symlink before cat > to avoid
  ENOENT through the dangling /usr/local symlink mach install drops).
- 150.0.1-1-aarch64.pkg.tar.zst built on boltzmann (95 MB), pending
  fresnel power-on for V4L2 stateless validation on RK3399.
2026-04-28 12:02:18 +00:00

76 lines
3.2 KiB
Diff

From: Markus Fritsche <mfritsche@reauktion.de>
Subject: [PATCH 1/4] widget/gtk: recognize V4L2 stateless fourccs in
GfxInfo prober (S264 / S265 / VP9F)
Date: 2026-04-27
Background
----------
Firefox's V4L2 prober in `widget/gtk/GfxInfo.cpp::V4L2ProbeDevice`
parses `v4l2test`'s `V4L2_OUTPUT_FMTS` line and matches against the
fourccs of stateful V4L2-M2M decoders (`H264`, `VP80`, `VP90`, `HEVC`).
That's correct for Pi4 / Mediatek / vendor-MPP stateful decoders but
silently skips every mainline-Linux Rockchip board: RK3399 `rkvdec`,
RK3566 `hantro` (multiplanar), RK3588 `hantro` and `rkvdec2` all
expose stateless fourccs only — `S264`, `S265`, `VP9F`. The probe
binary itself enumerates these correctly (verified end-to-end on
fresnel / Pinebook Pro / RK3399 with `v4l2test --device /dev/video1`
showing `V4L2_OUTPUT_FMTS: S265 S264 VP9F` and
`V4L2_SUPPORTED: TRUE`); the gap is purely in this string table.
This patch adds the three sibling blocks for the stateless fourccs,
each identical in shape to the existing stateful blocks except for
setting a new `mV4L2IsStateless` member. The follow-up patches in
this series (2/4, 3/4, 4/4) consume that member to route through the
libavcodec v4l2_request hwaccel (`AV_HWDEVICE_TYPE_DRM`) instead of
the v4l2m2m codec wrapper used for stateful boards.
Bug 1969297.
diff --git a/widget/gtk/GfxInfo.h b/widget/gtk/GfxInfo.h
--- a/widget/gtk/GfxInfo.h
+++ b/widget/gtk/GfxInfo.h
@@ -127,6 +127,10 @@
mozilla::Maybe<bool> mIsVAAPISupported;
int mVAAPISupportedCodecs = 0;
mozilla::Maybe<bool> mIsV4L2Supported;
+ // firefox-fourier: true when probe matched at least one stateless
+ // V4L2 fourcc (S264 / S265 / VP9F). Drives libavcodec v4l2_request
+ // hwaccel routing in FFmpegVideoDecoder.cpp.
+ bool mV4L2IsStateless = false;
int mV4L2SupportedCodecs = 0;
static int sGLXTestPipe;
diff --git a/widget/gtk/GfxInfo.cpp b/widget/gtk/GfxInfo.cpp
--- a/widget/gtk/GfxInfo.cpp
+++ b/widget/gtk/GfxInfo.cpp
@@ -852,6 +852,29 @@ void GfxInfo::V4L2ProbeDevice(nsCString& dev) {
media::MCSInfo::AddSupport(media::MediaCodecsSupport::HEVCHardwareDecode);
mV4L2SupportedCodecs |= CODEC_HW_DEC_HEVC;
}
+ // firefox-fourier: V4L2 stateless (request API) fourccs. Mainline
+ // Rockchip rkvdec / hantro / rkvdec2 expose these instead of the
+ // V4L2-M2M-stateful fourccs above. Decoding routes through
+ // libavcodec's v4l2_request hwaccel (AV_HWDEVICE_TYPE_DRM) rather
+ // than the *_v4l2m2m codec wrappers — see FFmpegVideoDecoder.cpp.
+ if (outFormats.Contains("S264")) {
+ mIsV4L2Supported = Some(true);
+ mV4L2IsStateless = true;
+ media::MCSInfo::AddSupport(media::MediaCodecsSupport::H264HardwareDecode);
+ mV4L2SupportedCodecs |= CODEC_HW_DEC_H264;
+ }
+ if (outFormats.Contains("S265")) {
+ mIsV4L2Supported = Some(true);
+ mV4L2IsStateless = true;
+ media::MCSInfo::AddSupport(media::MediaCodecsSupport::HEVCHardwareDecode);
+ mV4L2SupportedCodecs |= CODEC_HW_DEC_HEVC;
+ }
+ if (outFormats.Contains("VP9F")) {
+ mIsV4L2Supported = Some(true);
+ mV4L2IsStateless = true;
+ media::MCSInfo::AddSupport(media::MediaCodecsSupport::VP9HardwareDecode);
+ mV4L2SupportedCodecs |= CODEC_HW_DEC_VP9;
+ }
}
const nsTArray<RefPtr<GfxDriverInfo>>& GfxInfo::GetGfxDriverInfo() {