RE: [PATCH 1/2] media: nxp: imx8-isi: Reduce minimum queued buffers from 2 to 1
From: G.N. Zhou (OSS)
Date: Wed Mar 11 2026 - 22:23:47 EST
Hi Frank,
Thanks for your review.
> -----Original Message-----
> From: Frank Li <frank.li@xxxxxxx>
> Sent: Wednesday, March 11, 2026 11:22 PM
> To: G.N. Zhou (OSS) <guoniu.zhou@xxxxxxxxxxx>
> Cc: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>; Mauro Carvalho
> Chehab <mchehab@xxxxxxxxxx>; Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>;
> Pengutronix Kernel Team <kernel@xxxxxxxxxxxxxx>; Fabio Estevam
> <festevam@xxxxxxxxx>; linux-media@xxxxxxxxxxxxxxx; imx@xxxxxxxxxxxxxxx;
> linux-arm-kernel@xxxxxxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Alexi
> Birlinger <alexi.birlinger@xxxxxxx>; G.N. Zhou <guoniu.zhou@xxxxxxx>
> Subject: Re: [PATCH 1/2] media: nxp: imx8-isi: Reduce minimum queued buffers
> from 2 to 1
>
> On Wed, Mar 11, 2026 at 04:02:58PM +0800, Guoniu Zhou wrote:
> > From: Guoniu Zhou <guoniu.zhou@xxxxxxx>
> >
> > Fix a hang issue when capturing a single frame with applications like
> > cam in libcamera. It would hang waiting for the driver to complete the
> > buffer, but streaming never starts because min_queued_buffers was set to 2.
> >
> > The ISI module uses a ping-pong buffer mechanism that requires two
> > buffers to be programmed at all times. However, when fewer than 2 user
> > buffers are available, the driver use internal discard buffers to fill
> > the remaining slot(s). Reduce minimum queued buffers from 2 to 1
> > allows streaming to start with a single buffer providing more flexibility for
> applications.
> >
>
> Fix tags?
Okay, will add in next version.
>
> Frank
>
> > Signed-off-by: Guoniu Zhou <guoniu.zhou@xxxxxxx>
> > ---
> > drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
> > b/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
> > index
> >
> 13682bf6e9f8895bb9eb1f92d5f74b0d5968544e..2405baf21594cd18cf2b3492
> 3431
> > 3c5e103b7802 100644
> > --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
> > +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
> > @@ -1410,7 +1410,7 @@ int mxc_isi_video_register(struct mxc_isi_pipe
> *pipe,
> > q->mem_ops = &vb2_dma_contig_memops;
> > q->buf_struct_size = sizeof(struct mxc_isi_buffer);
> > q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
> > - q->min_queued_buffers = 2;
> > + q->min_queued_buffers = 1;
> > q->lock = &video->lock;
> > q->dev = pipe->isi->dev;
> >
> >
> > --
> > 2.34.1
> >