mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] media: venus: vdec: fix drain and restart on SDM845
@ 2026-09-28 21:40 David Heidelberg via B4 Relay
  2026-09-28 21:40 ` [PATCH 1/2] media: venus: vdec: signal EOS with a real buffer David Heidelberg via B4 Relay
  2026-09-28 21:40 ` [PATCH 2/2] media: venus: vdec: Start capture after a seek that streams CAPTURE first David Heidelberg via B4 Relay
  0 siblings, 2 replies; 7+ messages in thread
From: David Heidelberg via B4 Relay @ 2026-09-28 21:40 UTC (permalink / raw)
  To: Vikash Garodia, Dikshita Agarwal, Bryan O'Donoghue,
	Mauro Carvalho Chehab, Stanimir Varbanov
  Cc: Mauro Carvalho Chehab, linux-media, linux-arm-msm, linux-kernel,
	David Heidelberg

Please consider this more as a bug-report than the proper fix.

On SDM845 (Venus v4) every V4L2_DEC_CMD_STOP kills the decoder
session: the firmware rejects the dummy 0xdeadb000 address of
the EOS buffer with HFI_ERR_SESSION_FATAL, both queues go into error
and userspace sees poll() fail at the end of every stream.

Patch 1 hands the firmware a real, mapped buffer for EOS, after which
the drain completes as designed: every frame is returned and the last
capture buffer is flagged.

Patch 2 fixes restarting after a seek when CAPTURE is streamed on before
OUTPUT, which left the decoder without any capture or DPB buffers.

Tested on Pixel 3 (blueline) with H.264: output is bit-exact against
ffmpeg's software decoder including the final frames, and drain,
DEC_CMD_START, seek with either queue order, and mid-stream seek all
return every frame followed by a LAST buffer.

Signed-off-by: David Heidelberg <david@ixit.cz>
---
David Heidelberg (2):
      media: venus: vdec: signal EOS with a real buffer
      media: venus: vdec: Start capture after a seek that streams CAPTURE first

 drivers/media/platform/qcom/venus/core.h |  4 +++
 drivers/media/platform/qcom/venus/vdec.c | 51 +++++++++++++++++++++++++++++---
 2 files changed, 51 insertions(+), 4 deletions(-)
---
base-commit: 7079a12d7506b07fb53b54a664bfad5fa9b16d70
change-id: 20260928-venus-vdec-eos-9a451a4c0561

Best regards,
--  
David Heidelberg <david@ixit.cz>



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-10-16 13:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-28 21:40 [PATCH 0/2] media: venus: vdec: fix drain and restart on SDM845 David Heidelberg via B4 Relay
2026-09-28 21:40 ` [PATCH 1/2] media: venus: vdec: signal EOS with a real buffer David Heidelberg via B4 Relay
2026-10-09  9:15   ` bod
2026-10-16 13:34     ` David Heidelberg
2026-10-16 13:36       ` Bryan O'Donoghue
2026-09-28 21:40 ` [PATCH 2/2] media: venus: vdec: Start capture after a seek that streams CAPTURE first David Heidelberg via B4 Relay
2026-10-09  9:16   ` bod

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®