From: Dikshita Agarwal <quic_dikshita@quicinc.com>
To: Nicolas Dufresne <nicolas.dufresne@collabora.com>,
Vikash Garodia <quic_vgarodia@quicinc.com>,
Abhinav Kumar <quic_abhinavk@quicinc.com>,
"Mauro Carvalho Chehab" <mchehab@kernel.org>,
Stefan Schmidt <stefan.schmidt@linaro.org>,
Hans Verkuil <hverkuil@xs4all.nl>,
"Bjorn Andersson" <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
"Rob Herring" <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>
Cc: Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
<linux-media@vger.kernel.org>, <linux-arm-msm@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>,
<20250417-topic-sm8x50-iris-v10-v7-0-f020cb1d0e98@linaro.org>,
<20250424-qcs8300_iris-v5-0-f118f505c300@quicinc.com>
Subject: Re: [PATCH v3 13/23] media: iris: Send V4L2_BUF_FLAG_ERROR for buffers with 0 filled length
Date: Tue, 6 May 2025 17:10:42 +0530 [thread overview]
Message-ID: <29d8792b-cf1d-ff20-6aa9-88ef6e39751e@quicinc.com> (raw)
In-Reply-To: <fc4d70d3d3a98da8c0a8679bcea87d8d1e83fc5e.camel@collabora.com>
On 5/5/2025 6:07 PM, Nicolas Dufresne wrote:
> Hi Dikshita,
>
> Le dimanche 04 mai 2025 à 20:53 +0530, Dikshita Agarwal a écrit :
>>
>>
>> On 5/3/2025 9:39 PM, Nicolas Dufresne wrote:
>>> Hi Dikshita,
>>>
>>> Le vendredi 02 mai 2025 à 00:43 +0530, Dikshita Agarwal a écrit :
>>>> Firmware sends buffers with 0 filled length which needs to be dropped,
>>>> to achieve the same, add V4L2_BUF_FLAG_ERROR to such buffers.
>>>> Also make sure:
>>>> - These 0 length buffers are not returned as result of flush.
>>>> - Its not a buffer with LAST flag enabled which will also have 0 filled
>>>> length.
>>>
>>> This message is quite vague, is this about capture or output buffers ?
>>> If its output buffers that don't produce capture, I don't see why they
>>> have to be flagged as errors, or why the payload size matter. Then, if
>>> its about assigned capture buffers that did not get used in the end, you
>>> should put them back in the queue instead of returning them to user
>>> space.
>>>
>>> Returning a capture buffers to userspace should only be used if a frame
>>> could not be produced. That imply copying the cookie timestamp from the
>>> src buffers into the capture buffer. Please make sure you don't endup
>>> returning fake erorrs to userspace, which may lead to some frame
>>> metadata being dropped erroneously.
>>>
>> The capture buffers which I am trying to handle here are of 0 byteused
>> which means they don't have any valid data and they have the timestamp
>> copied from src buffers.
>> How these buffers will be handled by client? if we don't associate error
>> flag to such buffers?
>
> Please share a link to the stream and specify which frames are handled
> this way by your firmware. The answer to your question is entirely
> dependent on the stream you are decoding.
>
one such stream is
JCT-VC-HEVC_V1 -tv NoOutPrior_A_Qualcomm_1 (fluster stream)
for this stream, POC 17, 22 and 24 are not supposed to be displayed (output
is false), the corresponding capture buffers are returned with 0 filled
length by firmware to driver and expected to be dropped by the client.
Thanks,
Dikshita
> Nicolas
>
>>
>> Thanks,
>> Dikshita
>>> Nicolas
>>>
>>>>
>>>> Acked-by: Vikash Garodia <quic_vgarodia@quicinc.com>
>>>> Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
>>>> ---
>>>> drivers/media/platform/qcom/iris/iris_hfi_gen2_response.c | 6 ++++++
>>>> 1 file changed, 6 insertions(+)
>>>>
>>>> diff --git a/drivers/media/platform/qcom/iris/iris_hfi_gen2_response.c
>>>> b/drivers/media/platform/qcom/iris/iris_hfi_gen2_response.c
>>>> index 4488540d1d41..3bb326843a7b 100644
>>>> --- a/drivers/media/platform/qcom/iris/iris_hfi_gen2_response.c
>>>> +++ b/drivers/media/platform/qcom/iris/iris_hfi_gen2_response.c
>>>> @@ -378,6 +378,12 @@ static int iris_hfi_gen2_handle_output_buffer(struct iris_inst *inst,
>>>>
>>>> buf->flags = iris_hfi_gen2_get_driver_buffer_flags(inst, hfi_buffer->flags);
>>>>
>>>> + if (!buf->data_size && inst->state == IRIS_INST_STREAMING &&
>>>> + !(hfi_buffer->flags & HFI_BUF_FW_FLAG_LAST) &&
>>>> + !(inst->sub_state & IRIS_INST_SUB_DRC)) {
>>>> + buf->flags |= V4L2_BUF_FLAG_ERROR;
>>>> + }
>>>> +
>>>> return 0;
>>>> }
>>>>
next prev parent reply other threads:[~2025-05-06 11:40 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-01 19:13 [PATCH v3 00/23] Add support for HEVC and VP9 codecs in decoder Dikshita Agarwal
2025-05-01 19:13 ` [PATCH v3 01/23] media: iris: Skip destroying internal buffer if not dequeued Dikshita Agarwal
2025-05-02 12:14 ` Bryan O'Donoghue
2025-05-02 13:37 ` Dikshita Agarwal
2025-05-01 19:13 ` [PATCH v3 02/23] media: iris: Update CAPTURE format info based on OUTPUT format Dikshita Agarwal
2025-05-01 19:13 ` [PATCH v3 03/23] media: iris: Avoid updating frame size to firmware during reconfig Dikshita Agarwal
2025-05-02 12:18 ` Bryan O'Donoghue
2025-05-02 13:48 ` Dikshita Agarwal
2025-05-01 19:13 ` [PATCH v3 04/23] media: iris: Drop port check for session property response Dikshita Agarwal
2025-05-01 19:13 ` [PATCH v3 05/23] media: iris: Prevent HFI queue writes when core is in deinit state Dikshita Agarwal
2025-05-02 12:22 ` Bryan O'Donoghue
2025-05-02 13:54 ` Konrad Dybcio
2025-05-06 10:03 ` Dikshita Agarwal
2025-05-01 19:13 ` [PATCH v3 06/23] media: iris: Remove deprecated property setting to firmware Dikshita Agarwal
2025-05-02 12:27 ` Bryan O'Donoghue
2025-05-02 13:45 ` Dikshita Agarwal
2025-05-01 19:13 ` [PATCH v3 07/23] media: iris: Fix missing function pointer initialization Dikshita Agarwal
2025-05-02 12:28 ` Bryan O'Donoghue
2025-05-01 19:13 ` [PATCH v3 08/23] media: iris: Fix NULL pointer dereference Dikshita Agarwal
2025-05-02 12:28 ` Bryan O'Donoghue
2025-05-01 19:13 ` [PATCH v3 09/23] media: iris: Fix typo in depth variable Dikshita Agarwal
2025-05-02 12:29 ` Bryan O'Donoghue
2025-05-01 19:13 ` [PATCH v3 10/23] media: iris: Track flush responses to prevent premature completion Dikshita Agarwal
2025-05-02 12:40 ` Bryan O'Donoghue
2025-05-02 13:41 ` Dikshita Agarwal
2025-05-01 19:13 ` [PATCH v3 11/23] media: iris: Fix buffer preparation failure during resolution change Dikshita Agarwal
2025-05-01 19:13 ` [PATCH v3 12/23] media: iris: Add handling for corrupt and drop frames Dikshita Agarwal
2025-05-01 19:13 ` [PATCH v3 13/23] media: iris: Send V4L2_BUF_FLAG_ERROR for buffers with 0 filled length Dikshita Agarwal
2025-05-02 12:49 ` Bryan O'Donoghue
2025-05-02 14:22 ` Dikshita Agarwal
2025-05-03 16:09 ` Nicolas Dufresne
2025-05-04 15:23 ` Dikshita Agarwal
2025-05-05 12:37 ` Nicolas Dufresne
2025-05-06 11:40 ` Dikshita Agarwal [this message]
2025-05-01 19:13 ` [PATCH v3 14/23] media: iris: Add handling for no show frames Dikshita Agarwal
2025-05-02 12:50 ` Bryan O'Donoghue
2025-05-01 19:13 ` [PATCH v3 15/23] media: iris: Improve last flag handling Dikshita Agarwal
2025-05-02 16:17 ` Bryan O'Donoghue
2025-05-01 19:13 ` [PATCH v3 16/23] media: iris: Skip flush on first sequence change Dikshita Agarwal
2025-05-01 19:13 ` [PATCH v3 17/23] media: iris: Remove redundant buffer count check in stream off Dikshita Agarwal
2025-05-01 19:13 ` [PATCH v3 18/23] media: iris: Add a comment to explain usage of MBPS Dikshita Agarwal
2025-05-02 16:20 ` Bryan O'Donoghue
2025-05-01 19:13 ` [PATCH v3 19/23] media: iris: Add HEVC and VP9 formats for decoder Dikshita Agarwal
2025-05-01 19:13 ` [PATCH v3 20/23] media: iris: Add platform capabilities for HEVC and VP9 decoders Dikshita Agarwal
2025-05-01 19:13 ` [PATCH v3 21/23] media: iris: Set mandatory properties " Dikshita Agarwal
2025-05-01 19:13 ` [PATCH v3 22/23] media: iris: Add internal buffer calculation " Dikshita Agarwal
2025-05-05 16:37 ` Neil Armstrong
2025-05-01 19:13 ` [PATCH v3 23/23] media: iris: Add codec specific check for VP9 decoder drain handling Dikshita Agarwal
2025-05-02 7:25 ` [PATCH v3 00/23] Add support for HEVC and VP9 codecs in decoder Neil Armstrong
2025-05-02 7:34 ` Dikshita Agarwal
2025-05-02 8:31 ` Vikash Garodia
2025-05-02 8:41 ` Dikshita Agarwal
2025-05-02 9:02 ` neil.armstrong
2025-05-05 16:40 ` neil.armstrong
2025-05-06 8:06 ` Dikshita Agarwal
2025-05-06 8:12 ` Neil Armstrong
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=29d8792b-cf1d-ff20-6aa9-88ef6e39751e@quicinc.com \
--to=quic_dikshita@quicinc.com \
--cc=20250417-topic-sm8x50-iris-v10-v7-0-f020cb1d0e98@linaro.org \
--cc=20250424-qcs8300_iris-v5-0-f118f505c300@quicinc.com \
--cc=andersson@kernel.org \
--cc=bryan.odonoghue@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=hverkuil@xs4all.nl \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=nicolas.dufresne@collabora.com \
--cc=quic_abhinavk@quicinc.com \
--cc=quic_vgarodia@quicinc.com \
--cc=robh@kernel.org \
--cc=stefan.schmidt@linaro.org \
/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