From: Andrey Derkach <gabin278@gmail.com>
To: David Heidelberg <david@ixit.cz>
Cc: Vikash Garodia <vikash.garodia@oss.qualcomm.com>,
Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>,
Bryan O'Donoghue <bod@kernel.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Stanimir Varbanov <stanimir.varbanov@linaro.org>,
Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] media: venus: vdec: signal EOS with a real buffer
Date: Sat, 5 Dec 2026 20:03:52 +0200 [thread overview]
Message-ID: <20261205180353.1404720-1-gabin278@gmail.com> (raw)
In-Reply-To: <20260928-venus-vdec-eos-v1-1-6e9eb3ce9849@ixit.cz>
On Mon, Sep 28, 2026 at 11:40:14PM +0200, David Heidelberg wrote:
> Allocate a small buffer the first time a decoder instance is drained and
> use its device address for the EOS command, so the firmware gets an
> address that is mapped and outside the protected regions. The firmware
> then drains normally: all frames are returned and the last capture
> buffer carries V4L2_BUF_FLAG_LAST.
Tested on a Xiaomi Mi 9 SE (SDM712, sdm845-venus-v2, firmware
VIDEO.VE.5.0-00084), on the sdm670-mainline 7.3.7 tree with the phone's
device tree, which is not upstream yet. That tree sends address 0 for
the decoder EOS on HFI 4xx; I reverted that first, so the patch was
tested against the upstream EOS path.
With ffmpeg's h264_v4l2m2m, hevc_v4l2m2m and vp9_v4l2m2m decoders, a
1080p30 clip of 900 frames decodes to the end in each format, and every
frame, the last one included, matches ffmpeg's software decoder. No
driver or firmware errors are logged. With address 0, the HEVC drain
never finished and the end of a VP9 session crashed the firmware.
Tested-by: Andrey Derkach <gabin278@gmail.com> # Xiaomi Mi 9 SE (SDM712)
The encoder has the same problem on this firmware: V4L2_ENC_CMD_STOP
queues 0xdeadb000, the firmware rejects it with session error 1001, and
an SMMU fault and a firmware crash follow. Giving the encoder a buffer
the same way fixes it here: H.264, HEVC and VP8 encodes drain cleanly.
I can send that as a patch on top of this series.
next prev parent reply other threads:[~2026-12-05 18:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
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-12-05 18:03 ` Andrey Derkach [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261205180353.1404720-1-gabin278@gmail.com \
--to=gabin278@gmail.com \
--cc=bod@kernel.org \
--cc=david@ixit.cz \
--cc=dikshita.agarwal@oss.qualcomm.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab+samsung@kernel.org \
--cc=mchehab@kernel.org \
--cc=stanimir.varbanov@linaro.org \
--cc=vikash.garodia@oss.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®