firefox-fourier: flatten patches to top-level (makepkg has no subdir support)
Follow-up to #10. The subdir layout I assumed worked turned out to not work — per 'man PKGBUILD': The filename in the array must NOT include any path components like ./ makepkg's source-staging only honors basenames; the patches/ subdir references staged the files but the basename-lookup at apply time failed with the same 'not found in build directory' error that #9 hit. I copied the chromium-fourier convention thinking it was proven, but chromium-fourier has no CI either and likely has the same latent breakage (separate issue, not in this PR's scope). The actually-working pattern is the mpv-fourier one: patches at the top level next to the PKGBUILD. mpv-fourier iter2 just built green on CI (#92) with that layout. This commit: - Moves all 8 patches (5 fourier + 3 arch upstream) from patches/ to arch/firefox-fourier/ via git mv (preserves blame). - Removes the now-empty patches/ subdir. - Strips 'patches/' prefix from source array entries. - Strips '/patches' from prepare() patch -i paths. No semantic change to the patch content or apply order. pkgrel 3 -> 4.
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
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() {
|
||||
Reference in New Issue
Block a user