mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
To: Brandon Brnich <b-brnich@ti.com>,
	Nas Chung <nas.chung@chipsnmedia.com>,
	 Jackson Lee <jackson.lee@chipsnmedia.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
		linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Darren Etheridge <detheridge@ti.com>
Subject: Re: [PATCH v2 1/2] media: chips-media: wave5: Fix conditional in start_streaming
Date: Tue, 28 Oct 2025 16:42:12 +0000	[thread overview]
Message-ID: <420ba3c838b7fe2a6f2414d09fe1226c581ca09d.camel@collabora.com> (raw)
In-Reply-To: <20251021204618.2441939-1-b-brnich@ti.com>

[-- Attachment #1: Type: text/plain, Size: 1613 bytes --]

Le mardi 21 octobre 2025 à 15:46 -0500, Brandon Brnich a écrit :
> When STREAMON(CAP) is called after STREAMON(OUT), the driver was failing to
> switch states from VPU_INST_STATE_OPEN to VPU_INST_STATE_INIT_SEQ and
> VPU_INST_STATE_PIC_RUN because the capture queue streaming boolean had not
> yet been set to true. This led to a hang in the encoder since the state
> was stuck in VPU_INST_STATE_OPEN. During the second call to
> start_streaming, the sequence initialization and frame buffer allocation
> should occur.
> 
> Signed-off-by: Brandon Brnich <b-brnich@ti.com>

Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>

> ---
>  drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
> b/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
> index 1978551a28fa..0a2eab372913 100644
> --- a/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
> +++ b/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
> @@ -1367,7 +1367,8 @@ static int wave5_vpu_enc_start_streaming(struct
> vb2_queue *q, unsigned int count
>  		if (ret)
>  			goto return_buffers;
>  	}
> -	if (inst->state == VPU_INST_STATE_OPEN && m2m_ctx-
> >cap_q_ctx.q.streaming) {
> +	if (inst->state == VPU_INST_STATE_OPEN && (m2m_ctx-
> >cap_q_ctx.q.streaming ||
> +		q->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE)) {
>  		ret = initialize_sequence(inst);
>  		if (ret) {
>  			dev_warn(inst->dev->dev, "Sequence not found: %d\n",
> ret);

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  parent reply	other threads:[~2025-10-29  7:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-21 20:46 Brandon Brnich
2025-10-21 20:46 ` [PATCH v2 2/2] media: chips-media: wave5: Process ready frames when CMD_STOP sent to Encoder Brandon Brnich
2025-10-28 16:42   ` Nicolas Dufresne
2025-10-28 16:42 ` Nicolas Dufresne [this message]
2025-10-29 15:08   ` [PATCH v2 1/2] media: chips-media: wave5: Fix conditional in start_streaming Brandon Brnich
2025-12-09 20:31     ` Nicolas Dufresne

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=420ba3c838b7fe2a6f2414d09fe1226c581ca09d.camel@collabora.com \
    --to=nicolas.dufresne@collabora.com \
    --cc=b-brnich@ti.com \
    --cc=detheridge@ti.com \
    --cc=jackson.lee@chipsnmedia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=nas.chung@chipsnmedia.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®