From: Bryan O'Donoghue <bod@kernel.org>
To: David Heidelberg <david@ixit.cz>
Cc: Vikash Garodia <vikash.garodia@oss.qualcomm.com>,
Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>,
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: Fri, 16 Oct 2026 14:36:23 +0100 [thread overview]
Message-ID: <8f0d0c71-a199-4f7a-ad66-ecd32c888fa3@kernel.org> (raw)
In-Reply-To: <da8b6a26-334d-461d-b0a6-8c38161e5e12@ixit.cz>
On 16/10/2026 14:34, David Heidelberg wrote:
> On 09/10/2026 11:15,bod@kernel.org wrote:
>> On 2026-09-28 23:40 +0200, David Heidelberg wrote:
>>> The decoder tells the firmware about the end of the stream with an empty
>>> buffer command whose address is a dummy (0xdeadb000), because the host
>>> has no input buffer to name. The SDM845 (Venus v4) firmware validates
>>> that address and rejects it:
>>>
>>> IsBufferProtected(1087): VenusCoreCtrl: CP_UNKNOWN, buffer straddles
>>> CP & non-CP regions
>>> vDec_EmptyBuffer(1932): Invalidate buffer in ETB
>>>
>>> and raises HFI_ERR_SESSION_FATAL, reported by the driver as
>>>
>>> qcom-venus aa00000.video-codec: session error: event id:1001 (deadb000)
>>>
>>> Both queues are then put into an error state, so the drain never
>>> completes and every V4L2_DEC_CMD_STOP ends the stream with an error:
>>> GStreamer's poll() fails at end of file, ffmpeg aborts.
>>>
>>> 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. The NULL address used by old IRIS2
>>> firmware is left alone.
>>>
>>> Assisted-by: LLM
>>> Fixes: beac82904a87 ("media: venus: make decoder compliant with stateful codec API")
>>> Signed-off-by: David Heidelberg<david@ixit.cz>
>> The logic stacks up as I read it but, I want to see this a) work on sdm845
>> and b) not break on sm8250 before applying.
> On sdm845 it works great (tested multiple sdm845 phones with `livi --demo-h264`
> and loop enabled. I don't have sm8250, thus that's up to someone with the device 🙂
>
> David
heh I do have it.
I will test ;)
---
bod
next prev parent reply other threads:[~2026-10-16 13:36 UTC|newest]
Thread overview: 7+ 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 [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=8f0d0c71-a199-4f7a-ad66-ecd32c888fa3@kernel.org \
--to=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®