Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
To: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>,
	Abhinav Kumar <abhinav.kumar@linux.dev>,
	Bryan O'Donoghue <bod@kernel.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Hans Verkuil <hverkuil@kernel.org>,
	Stefan Schmidt <stefan.schmidt@linaro.org>,
	Hans Verkuil <hverkuil+cisco@kernel.org>,
	Wangao Wang <wangao.wang@oss.qualcomm.com>
Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
	Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
Subject: Re: [PATCH v2 6/6] media: iris: Prevent output buffer queuing before stream-on completes
Date: Mon, 12 Jan 2026 16:39:50 +0530	[thread overview]
Message-ID: <44e3dabf-fd08-49fc-b679-d496d125e788@oss.qualcomm.com> (raw)
In-Reply-To: <20251229-iris-fixes-v2-6-6dce2063d782@oss.qualcomm.com>


On 12/29/2025 12:01 PM, Dikshita Agarwal wrote:
> From: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
> 
> During normal playback, stream-on for input is followed by output, and
> only after input stream-on does actual streaming begin. However, when
> gst-play performs a seek, both input and output streams are stopped,
> and on restart, output stream-on occurs first. At this point, firmware
> has not yet started streaming. Queuing output buffers before the firmware
> begins streaming causes it to process buffers in an invalid state, leading
> to an error response. These buffers are returned to the driver as errors,
> forcing the driver into an error state and stopping playback.
> 
> Fix this by deferring output buffer queuing until stream-on completes.
> Input buffers can still be queued before stream-on as required.
> 
> Fixes: 92e007ca5ab6 ("media: iris: Add V4L2 streaming support for encoder video device")
> Signed-off-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
> Signed-off-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
> ---
>   drivers/media/platform/qcom/iris/iris_vb2.c | 10 +++++++---
>   1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/media/platform/qcom/iris/iris_vb2.c b/drivers/media/platform/qcom/iris/iris_vb2.c
> index 139b821f7952feb33b21a7045aef9e8a4782aa3c..bf0b8400996ece5c9d449b99609a302da726bf9a 100644
> --- a/drivers/media/platform/qcom/iris/iris_vb2.c
> +++ b/drivers/media/platform/qcom/iris/iris_vb2.c
> @@ -193,10 +193,14 @@ int iris_vb2_start_streaming(struct vb2_queue *q, unsigned int count)
>   	buf_type = iris_v4l2_type_to_driver(q->type);
>   
>   	if (inst->domain == DECODER) {
> -		if (inst->state == IRIS_INST_STREAMING)
> +		if (buf_type == BUF_INPUT)
> +			ret = iris_queue_deferred_buffers(inst, BUF_INPUT);
> +
> +		if (!ret && inst->state == IRIS_INST_STREAMING) {
>   			ret = iris_queue_internal_deferred_buffers(inst, BUF_DPB);
> -		if (!ret)
> -			ret = iris_queue_deferred_buffers(inst, buf_type);
> +			if (!ret)
> +				ret = iris_queue_deferred_buffers(inst, BUF_OUTPUT);
> +		}
>   	} else {
>   		if (inst->state == IRIS_INST_STREAMING) {
>   			ret = iris_queue_deferred_buffers(inst, BUF_INPUT);
> 

Reviewed-by: Vikash Garodia<vikash.garodia@oss.qualcomm.com>

      reply	other threads:[~2026-01-12 11:09 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-29  6:31 [PATCH v2 0/6] media: iris: misc fixes for fluster, seek and concurrency issues Dikshita Agarwal
2025-12-29  6:31 ` [PATCH v2 1/6] media: iris: Add buffer to list only after successful allocation Dikshita Agarwal
2026-01-07 10:26   ` Vikash Garodia
2025-12-29  6:31 ` [PATCH v2 2/6] media: iris: Skip resolution set on first IPSC Dikshita Agarwal
2026-01-07 10:27   ` Vikash Garodia
2025-12-29  6:31 ` [PATCH v2 3/6] media: iris: gen1: Destroy internal buffers after FW releases Dikshita Agarwal
2026-01-07 10:27   ` Vikash Garodia
2025-12-29  6:31 ` [PATCH v2 4/6] Revert "media: iris: Add sanity check for stop streaming" Dikshita Agarwal
2025-12-30 10:25   ` Bryan O'Donoghue
2026-01-05  9:51     ` Dikshita Agarwal
2026-01-05 12:50       ` Bryan O'Donoghue
2026-01-06  5:47         ` Dikshita Agarwal
2026-01-07 10:29   ` Vikash Garodia
2025-12-29  6:31 ` [PATCH v2 5/6] media: iris: gen2: Add sanity check for session stop Dikshita Agarwal
2025-12-30 10:33   ` Bryan O'Donoghue
2026-01-07 10:06     ` Dikshita Agarwal
2026-01-12 11:09   ` Vikash Garodia
2025-12-29  6:31 ` [PATCH v2 6/6] media: iris: Prevent output buffer queuing before stream-on completes Dikshita Agarwal
2026-01-12 11:09   ` Vikash Garodia [this message]

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=44e3dabf-fd08-49fc-b679-d496d125e788@oss.qualcomm.com \
    --to=vikash.garodia@oss.qualcomm.com \
    --cc=abhinav.kumar@linux.dev \
    --cc=bod@kernel.org \
    --cc=bryan.odonoghue@linaro.org \
    --cc=busanna.reddy@oss.qualcomm.com \
    --cc=dikshita.agarwal@oss.qualcomm.com \
    --cc=hverkuil+cisco@kernel.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=stefan.schmidt@linaro.org \
    --cc=wangao.wang@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