forked from marfrit/marfrit-packages
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.
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
From: Markus Fritsche <mfritsche@reauktion.de>
|
||||
Subject: media: default kAcceleratedVideoDecodeLinux to enabled when
|
||||
USE_V4L2_CODEC is the build's hardware decode path
|
||||
Date: 2026-04-26
|
||||
|
||||
Background
|
||||
----------
|
||||
chromium-fourier targets mainline-Linux Wayland on Rockchip (RK3566 hantro,
|
||||
RK3588 VDPU381) where the only HW video decode path is V4L2 stateless
|
||||
(via the in-tree media/gpu/v4l2 stack). The build is configured with
|
||||
|
||||
use_vaapi = false
|
||||
use_v4l2_codec = true
|
||||
use_v4lplugin = true
|
||||
use_linux_v4l2_only = true
|
||||
|
||||
Without this patch, GPU-process V4L2 decode is compiled in but stays
|
||||
runtime-disabled by default. The runtime master gate
|
||||
`media::kAcceleratedVideoDecodeLinux` (the user-visible feature name is
|
||||
"AcceleratedVideoDecoder") is currently flipped to ENABLED_BY_DEFAULT only
|
||||
when `BUILDFLAG(USE_VAAPI)` is set. On a USE_V4L2_CODEC-only build the
|
||||
feature stays DISABLED_BY_DEFAULT, the linux gpu_mojo_media_client returns
|
||||
`VideoDecoderType::kUnknown`, and `<video>` falls all the way back to
|
||||
`media/filters/ffmpeg_video_decoder.cc` (software).
|
||||
|
||||
We confirmed this by hand on the PineTab2 (RK3566 hantro): with
|
||||
`--enable-features=AcceleratedVideoDecoder` chrome correctly selects
|
||||
`V4L2VideoDecoder` for h264 main, opens /dev/video1 + /dev/media0,
|
||||
allocates 17 OUTPUT + 6 CAPTURE NV12 buffers, and runs SetExtCtrlsInit for
|
||||
H264. Without the runtime flag, none of that happens.
|
||||
|
||||
Fix
|
||||
---
|
||||
Treat `USE_V4L2_CODEC` symmetrically with `USE_VAAPI` for the runtime
|
||||
default of the master gate. A user can still disable it via
|
||||
`--disable-features=AcceleratedVideoDecoder`.
|
||||
|
||||
This does NOT touch the `kAcceleratedVideoDecodeLinuxGL` companion gate
|
||||
(already ENABLED_BY_DEFAULT) or any of the per-decoder selection logic in
|
||||
`media/mojo/services/gpu_mojo_media_client_linux.cc` -- that file already
|
||||
dispatches to the V4L2 decoder when `USE_V4L2_CODEC && !USE_VAAPI`, gated
|
||||
behind the master flag we are flipping here.
|
||||
|
||||
diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc
|
||||
--- a/media/base/media_switches.cc
|
||||
+++ b/media/base/media_switches.cc
|
||||
@@ -749,7 +749,7 @@ BASE_FEATURE(kUnifiedAutoplay, base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
// on chromeos, but needs an experiment on linux.
|
||||
BASE_FEATURE(kAcceleratedVideoDecodeLinux,
|
||||
"AcceleratedVideoDecoder",
|
||||
-#if BUILDFLAG(USE_VAAPI)
|
||||
+#if BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
#else
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
Reference in New Issue
Block a user