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]
Message-ID: <0f61ac19-b74d-4493-99de-eb293e41e9a8@xs4all.nl>
Date:   Mon, 4 Dec 2023 15:52:32 +0100
From:   Hans Verkuil <hverkuil@...all.nl>
To:     Benjamin Gaignard <benjamin.gaignard@...labora.com>,
        mchehab@...nel.org, tfiga@...omium.org, m.szyprowski@...sung.com,
        matt.ranostay@...sulko.com
Cc:     linux-kernel@...r.kernel.org, linux-media@...r.kernel.org,
        linux-staging@...ts.linux.dev, kernel@...labora.com,
        Eugen Hristev <eugen.hristev@...labora.com>,
        Nicolas Ferre <nicolas.ferre@...rochip.com>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Claudiu Beznea <claudiu.beznea@...on.dev>
Subject: Re: [PATCH v2 20/36] media: atmel: Fix misuse of min_buffers_needed
 field

On 04/12/2023 14:23, Benjamin Gaignard wrote:
> 'min_buffers_needed' is suppose to be used to indicate the number
> of buffers needed by DMA engine to start streaming.
> atmel-isi driver doesn't use DMA engine and just want to specify
> the minimum number of buffers to allocate when calling VIDIOC_REQBUFS.
> That 'min_reqbufs_allocation' field purpose so use it.

It definitely has a DMA engine, it just can still work if there are no
buffers queued.

> 
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@...labora.com>
> CC: Eugen Hristev <eugen.hristev@...labora.com>
> CC: Mauro Carvalho Chehab <mchehab@...nel.org>
> CC: Nicolas Ferre <nicolas.ferre@...rochip.com>
> CC: Alexandre Belloni <alexandre.belloni@...tlin.com>
> CC: Claudiu Beznea <claudiu.beznea@...on.dev>
> ---
>  drivers/media/platform/atmel/atmel-isi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/atmel/atmel-isi.c b/drivers/media/platform/atmel/atmel-isi.c
> index da58f33b6b0a..9c156771568a 100644
> --- a/drivers/media/platform/atmel/atmel-isi.c
> +++ b/drivers/media/platform/atmel/atmel-isi.c
> @@ -1244,7 +1244,7 @@ static int atmel_isi_probe(struct platform_device *pdev)
>  	q->ops = &isi_video_qops;
>  	q->mem_ops = &vb2_dma_contig_memops;
>  	q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
> -	q->min_buffers_needed = 2;
> +	q->min_reqbufs_allocation = 2;

The problem is that this really needs to be tested since this change
will enable code paths that haven't been used before.

Regards,

	Hans

>  	q->dev = &pdev->dev;
>  
>  	ret = vb2_queue_init(q);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ