Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
To: Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
	Vishnu Reddy <quic_bvisredd@quicinc.com>,
	vikash.garodia@oss.qualcomm.com, abhinav.kumar@linux.dev,
	mchehab@kernel.org, hverkuil@kernel.org,
	stefan.schmidt@linaro.org
Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] media: iris: Fix ffmpeg corrupted frame error
Date: Tue, 18 Nov 2025 10:49:45 +0530	[thread overview]
Message-ID: <6f9be486-364f-cfa8-0a3b-ccc3967bbd5d@oss.qualcomm.com> (raw)
In-Reply-To: <3a07850b-90bb-4035-91ce-9f361c635df5@linaro.org>

Hi Bryan,

On 10/7/2025 5:02 PM, Bryan O'Donoghue wrote:
> On 06/10/2025 10:18, Vishnu Reddy wrote:
>> When the ffmpeg decoder is running, the driver receives the
>> V4L2_BUF_FLAG_KEYFRAME flag in the input buffer. The driver then forwards
>> this flag information to the firmware. The firmware, in turn, copies the
>> input buffer flags directly into the output buffer flags. Upon receiving
>> the output buffer from the firmware, the driver observes that the buffer
>> contains the HFI_BUFFERFLAG_DATACORRUPT flag. The root cause is that both
>> V4L2_BUF_FLAG_KEYFRAME and HFI_BUFFERFLAG_DATACORRUPT are the same value.
>> As a result, the driver incorrectly interprets the output frame as
>> corrupted, even though the frame is actually valid. This misinterpretation
>> causes the driver to report an error and skip good frames, leading to
>> missing frames in the final video output and triggering ffmpeg's "corrupt
>> decoded frame" error.
>>
>> To resolve this issue, the input buffer flags should not be sent to the
>> firmware during decoding, since the firmware does not require this
>> information.
>>
>> Fixes: 17f2a485ca67 ("media: iris: implement vb2 ops for buf_queue and
>> firmware response")
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Vishnu Reddy <quic_bvisredd@quicinc.com>
>> ---
>>   drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c
>> b/drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c
>> index e1788c266bb1..4de03f31eaf3 100644
>> --- a/drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c
>> +++ b/drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c
>> @@ -282,7 +282,7 @@ static int iris_hfi_gen1_queue_input_buffer(struct
>> iris_inst *inst, struct iris_
>>           com_ip_pkt.shdr.session_id = inst->session_id;
>>           com_ip_pkt.time_stamp_hi = upper_32_bits(buf->timestamp);
>>           com_ip_pkt.time_stamp_lo = lower_32_bits(buf->timestamp);
>> -        com_ip_pkt.flags = buf->flags;
>> +        com_ip_pkt.flags = 0;
>>           com_ip_pkt.mark_target = 0;
>>           com_ip_pkt.mark_data = 0;
>>           com_ip_pkt.offset = buf->data_offset;
>> -- 
>> 2.34.1
>>
> 
> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

Can you please pull this fix for 6.19.

Thanks,
Dikshita


  reply	other threads:[~2025-11-18  5:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <9UYDQ7nzBQ9Uqb5q4mG8WWKGLEZNPSvgV1vw6mmYS0wY2VKS5F11n8IaesvJsKYBvndy99tKFqGoak5MzQVZIA==@protonmail.internalid>
2025-10-06  9:18 ` [PATCH] media: iris: Fix ffmpeg corrupted frame error Vishnu Reddy
2025-10-06 14:09   ` Vikash Garodia
2025-10-07 11:32   ` Bryan O'Donoghue
2025-11-18  5:19     ` Dikshita Agarwal [this message]
2025-10-07 11:38   ` Dikshita Agarwal

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=6f9be486-364f-cfa8-0a3b-ccc3967bbd5d@oss.qualcomm.com \
    --to=dikshita.agarwal@oss.qualcomm.com \
    --cc=abhinav.kumar@linux.dev \
    --cc=bryan.odonoghue@linaro.org \
    --cc=hverkuil@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=quic_bvisredd@quicinc.com \
    --cc=stable@vger.kernel.org \
    --cc=stefan.schmidt@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