diff --git a/upstream-submissions/vb2-dma-resv/lkml-submission-notes.md b/upstream-submissions/vb2-dma-resv/lkml-submission-notes.md new file mode 100644 index 000000000..1eb03f500 --- /dev/null +++ b/upstream-submissions/vb2-dma-resv/lkml-submission-notes.md @@ -0,0 +1,112 @@ +# linux-media submission notes — vb2 dma_resv release-fence series + +The 3-patch RFC series at `marfrit-packages/kernel/vb2-dma-resv-rfc/` +is ready to send. Cover letter is filled in; patches apply cleanly +via `git am` against Linux 6.12 mainline; all kernel APIs verified. + +## Pre-flight gates (re-stated) + +1. **Full-tree compile-test** — apply the 3 patches to a complete + kernel checkout (not a sparse one), `make defconfig` + enable + `CONFIG_VIDEO_HANTRO=y` and `CONFIG_VIDEO_ROCKCHIP_RGA=y`, + then build. A focused + `make drivers/media/common/videobuf2/videobuf2-core.o + drivers/media/platform/verisilicon/hantro_v4l2.o + drivers/media/platform/rockchip/rga/rga-buf.o` is the minimal + safe-to-send threshold; full `make` is the higher confidence + bar. +2. **Boot-test on ohm** — install the patched kernel, verify + `lsmod` shows hantro_vpu and rockchip_rga loaded, run + `mpv --vo=drm --hwdec=v4l2request bbb_1080p30_h264.mp4` and + confirm playback still works (smoke test that we haven't + broken the existing buffer-state machine). +3. **Runtime validation** — install patched kernel, + `pacman -R kwin-fourier` so KWin's stock `watchDmaBuf` is + re-enabled, play `bbb_1080p30_h264.mp4` in chromium-fourier + under KDE Plasma. Should plays through end-to-end because the + fence the compositor waits on is now real (signals when hantro + completes). Compare CPU profile against the kwin-fourier-bypassed + baseline — should be equivalent or marginally lower. +4. **Capture syscall numbers** — `strace -c -p $(pgrep + kwin_wayland)` during a 60-second playback, before and after + the kernel patch (with stock KWin, kwin-fourier uninstalled). + Reports the ioctl reduction the patch enables (since + `EXPORT_SYNC_FILE` will now signal real fences instead of stub + ones, but the call itself remains). The reduction is greater + if the KWin upstream-shape patch is also in, but the kernel + patch alone is sufficient to make the existing KWin path + correct. + +## Send command + +After all four gates pass, format-patch and send: + +```sh +cd +git format-patch --cover-letter --base=auto -3 \ + -o /tmp/vb2-dma-resv-out HEAD +# Verify cover letter has the right Subject and blurb (we already +# filled them in, but git format-patch will overwrite — so paste +# the canonical ones from kernel/vb2-dma-resv-rfc/0000-cover-letter.patch) +git send-email \ + --to=linux-media@vger.kernel.org \ + --cc='Mauro Carvalho Chehab ' \ + --cc='Hans Verkuil ' \ + --cc='Ezequiel Garcia ' \ + --cc='Tomasz Figa ' \ + --cc='Sumit Semwal ' \ + --cc='Christian König ' \ + --cc='Jason Ekstrand ' \ + --cc='dri-devel@lists.freedesktop.org' \ + --cc='linux-rockchip@lists.infradead.org' \ + --cc='Heiko Stuebner ' \ + --cc='Jeffy Chen ' \ + /tmp/vb2-dma-resv-out/*.patch +``` + +Rationale for the CC list: + +- `linux-media@vger.kernel.org` — primary list (V4L2 / videobuf2) +- Mauro / Hans / Ezequiel — V4L2 maintainers +- Tomasz Figa — hantro maintainer (Collabora / Chromium overlap) +- Sumit Semwal / Christian König / Jason Ekstrand — dma-buf + reviewers (this patch touches `dma_resv` semantics, so the + dma-buf folks need a look) +- `dri-devel` — graphics list, the consumer side of the fence +- `linux-rockchip@lists.infradead.org` — RK3xxx-specific feedback +- Heiko Stübner — Rockchip / arm64 maintainer +- Jeffy Chen — Rock-Chips media stack lead + +## Expected feedback + +- "Why opt-in vs auto-on for all CAPTURE queues?" — answered in + cover letter; willing to switch to auto-on if reviewers prefer + the audit burden. +- "Does this need a vb2 selftest?" — videobuf2 doesn't have + great in-tree dmabuf coverage; offer to add a minimal kselftest + if reviewers ask. +- "Is `vb2_buffer_done` the right signal point for asynchronous + drivers?" — for hantro and rga it is (they're synchronous m2m). + For drivers with async post-processing, may need a separate + hook; out of scope for this RFC. +- "Pick-to: stable trees?" — Maintainers will decide. The patch + is invasive enough that LTS backport may not be wanted; the + contract gap has been there since vb2's introduction so it's + not a regression fix. + +## Withdraw conditions + +If reviewers point out that: + +- A driver in the wider tree already does this and we missed it + (the auto-on path would just naturally pick that up; switch + approach). +- vb2's `dma_resv` integration is being done in a different + upstream effort already (search lkml for `videobuf2 dma_resv` + before sending — should already be in the cover letter). +- The fence semantics are wrong for some driver class we didn't + consider (most likely image-sensor → CSI → ISP → output, where + the producer fence at the camera side and the user-visible + fence at the ISP output may be different). + +…drop the series, write up the lessons, retry next cycle.