From: Hans Verkuil <hverkuil@xs4all.nl>
To: Benjamin Gaignard <benjamin.gaignard@collabora.com>,
mchehab@kernel.org, tfiga@chromium.org, m.szyprowski@samsung.com,
matt.ranostay@konsulko.com
Cc: linux-aspeed@lists.ozlabs.org, openbmc@lists.ozlabs.org,
linux-staging@lists.linux.dev,
Eddie James <eajames@linux.ibm.com>,
linux-kernel@vger.kernel.org, Joel Stanley <joel@jms.id.au>,
kernel@collabora.com, linux-media@vger.kernel.org
Subject: Re: [PATCH v2 25/36] media: aspeed: Fix misuse of min_buffers_needed field
Date: Mon, 4 Dec 2023 15:59:02 +0100 [thread overview]
Message-ID: <e920d35c-dd2f-48f6-aad8-5c7dd4a4987d@xs4all.nl> (raw)
In-Reply-To: <20231204132323.22811-26-benjamin.gaignard@collabora.com>
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.
> aspeed 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.
>
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
> Reviewed-by: Eddie James <eajames@linux.ibm.com>
> CC: Joel Stanley <joel@jms.id.au> (supporter:ARM/ASPEED MACHINE SUPPORT)
> CC: Andrew Jeffery <andrew@codeconstruct.com.au> (reviewer:ARM/ASPEED MACHINE SUPPORT)
> CC: openbmc@lists.ozlabs.org (moderated list:ASPEED VIDEO ENGINE DRIVER)
> CC: linux-aspeed@lists.ozlabs.org (moderated list:ARM/ASPEED MACHINE SUPPORT)
> ---
> drivers/media/platform/aspeed/aspeed-video.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/aspeed/aspeed-video.c b/drivers/media/platform/aspeed/aspeed-video.c
> index d08aa7f73d4f..c28b10808cda 100644
> --- a/drivers/media/platform/aspeed/aspeed-video.c
> +++ b/drivers/media/platform/aspeed/aspeed-video.c
> @@ -2034,7 +2034,7 @@ static int aspeed_video_setup_video(struct aspeed_video *video)
> vbq->drv_priv = video;
> vbq->buf_struct_size = sizeof(struct aspeed_video_buffer);
> vbq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
> - vbq->min_buffers_needed = ASPEED_VIDEO_V4L2_MIN_BUF_REQ;
> + vbq->min_reqbufs_allocation = ASPEED_VIDEO_V4L2_MIN_BUF_REQ;
Looking at the start_streaming code I think min_buffers_needed should be 1, since
otherwise start_streaming would return -EPROTO.
But clearly the intent is also that 3 buffers minimum are allocated.
So in this case both fields should be set.
Regards,
Hans
>
> rc = vb2_queue_init(vbq);
> if (rc) {
parent reply other threads:[~2023-12-04 14:59 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20231204132323.22811-26-benjamin.gaignard@collabora.com>]
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=e920d35c-dd2f-48f6-aad8-5c7dd4a4987d@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=benjamin.gaignard@collabora.com \
--cc=eajames@linux.ibm.com \
--cc=joel@jms.id.au \
--cc=kernel@collabora.com \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=m.szyprowski@samsung.com \
--cc=matt.ranostay@konsulko.com \
--cc=mchehab@kernel.org \
--cc=openbmc@lists.ozlabs.org \
--cc=tfiga@chromium.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).