[PATCH 0/2] media: venus: Fix end-of-stream and seeks on SDM845

From: EMCP333 via B4 Relay

Date: Sun Nov 22 2026 - 00:13:35 EST


Two fixes for the Venus decoder and encoder, found on a OnePlus 6T
(SDM845, firmware VIDEO.VE.5.2-00050-PROD-1) while using it from
GStreamer, ffmpeg and mpv.

Patch 1 gives the end-of-stream buffer that the STOP commands queue a
real, mapped address instead of the made-up 0xdeadb000. This firmware
rejects the made-up address, which leaves the encoder unusable until
reboot and decoder clients draining forever.

Patch 2 makes a CAPTURE STREAMON issued while OUTPUT is stopped for a
seek take effect when OUTPUT restarts. That is the order GStreamer uses
for every flushing seek, and without it the seek never completes.

Both were tested on the phone with the postmarketOS sdm845 kernel
(6.18). On v7.4-rc2 the driver builds with W=1 and no warnings.

Both also ran on v7.4-rc3: three encodes drained by V4L2_ENC_CMD_STOP
and decoded back (90 of 90 frames), and three flushing seeks through
GStreamer completed in 0.02 s each, with no venus errors.

One related problem is not addressed here: from 1280x720 up, the encoder
bitstream buffer is an eighth of the size used just below 720p, and
this firmware produces nothing with it. Fixing that properly needs the
firmware's own buffer requirement rather than a bigger guess, so it is
left for a separate change.

---
EMCP333 (2):
media: venus: Signal end-of-stream with a mapped buffer
media: venus: vdec: Resume CAPTURE restarted during a seek

drivers/media/platform/qcom/venus/core.h | 7 +++++
drivers/media/platform/qcom/venus/helpers.c | 40 +++++++++++++++++++++++++++++
drivers/media/platform/qcom/venus/helpers.h | 3 +++
drivers/media/platform/qcom/venus/vdec.c | 33 +++++++++++++++++++++---
drivers/media/platform/qcom/venus/venc.c | 7 ++++-
5 files changed, 85 insertions(+), 5 deletions(-)
---
base-commit: 7475ea8b58616b33c04afb976cf0fbaad9dd63fb
change-id: 20261122-b4-venus-eos-seek-def2919e88d5

Best regards,
--
EMCP333 <emcp@xxxxxxxx>