lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 23 Feb 2022 18:05:33 +0100
From:   Jacopo Mondi <jacopo@...ndi.org>
To:     Eugen Hristev <eugen.hristev@...rochip.com>
Cc:     linux-media@...r.kernel.org, hverkuil-cisco@...all.nl,
        nicolas.ferre@...rochip.com, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        claudiu.beznea@...rochip.com
Subject: Re: [PATCH v5 01/13] media: atmel: atmel-isc-base: use streaming
 status when queueing buffers

Hi Eugen

On Thu, Feb 17, 2022 at 03:56:33PM +0200, Eugen Hristev wrote:
> During experiments with libcamera, it looks like vb2_is_streaming returns
> true before our start streaming is called.
> Order of operations is streamon -> queue -> start_streaming
> ISC would have started the DMA immediately when a buffer is being added
> to the vbqueue if the queue is streaming.
> It is more safe to start the DMA after the start streaming of the driver is
> called.
> Thus, even if vb2queue is streaming, add the buffer to the dma queue of the
> driver instead of actually starting the DMA process, if the start streaming
> has not been called yet.
> Tho achieve this, we have to use vb2_start_streaming_called instead of
> vb2_is_streaming.
>
> Signed-off-by: Eugen Hristev <eugen.hristev@...rochip.com>

Reviewed-by: Jacopo Mondi <jacopo@...ndi.org>

Thanks
   j
> ---
>  drivers/media/platform/atmel/atmel-isc-base.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/atmel/atmel-isc-base.c b/drivers/media/platform/atmel/atmel-isc-base.c
> index db15770d5b88..d2cc6c99984f 100644
> --- a/drivers/media/platform/atmel/atmel-isc-base.c
> +++ b/drivers/media/platform/atmel/atmel-isc-base.c
> @@ -442,7 +442,7 @@ static void isc_buffer_queue(struct vb2_buffer *vb)
>
>  	spin_lock_irqsave(&isc->dma_queue_lock, flags);
>  	if (!isc->cur_frm && list_empty(&isc->dma_queue) &&
> -		vb2_is_streaming(vb->vb2_queue)) {
> +		vb2_start_streaming_called(vb->vb2_queue)) {
>  		isc->cur_frm = buf;
>  		isc_start_dma(isc);
>  	} else
> --
> 2.25.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ