From: Hans Verkuil <hverkuil@xs4all.nl>
To: Kamil Debski <k.debski@samsung.com>, linux-media@vger.kernel.org
Cc: m.szyprowski@samsung.com
Subject: Re: [PATCH v5 3/4] coda: set allow_zero_bytesused flag for vb2_queue_init
Date: Fri, 20 Feb 2015 17:53:09 +0100 [thread overview]
Message-ID: <54E76675.70908@xs4all.nl> (raw)
In-Reply-To: <1424450288-26444-3-git-send-email-k.debski@samsung.com>
On 02/20/2015 05:38 PM, Kamil Debski wrote:
> The coda driver interprets a buffer with bytesused equal to 0 as a special
> case indicating end-of-stream. After vb2: fix bytesused == 0 handling
> (8a75ffb) patch videobuf2 modified the value of bytesused if it was 0.
> The allow_zero_bytesused flag was added to videobuf2 to keep
> backward compatibility.
>
> Signed-off-by: Kamil Debski <k.debski@samsung.com>
> ---
> drivers/media/platform/coda/coda-common.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c
> index 6f32e6d..2d23f9a 100644
> --- a/drivers/media/platform/coda/coda-common.c
> +++ b/drivers/media/platform/coda/coda-common.c
> @@ -1541,6 +1541,13 @@ static int coda_queue_init(struct coda_ctx *ctx, struct vb2_queue *vq)
> vq->buf_struct_size = sizeof(struct v4l2_m2m_buffer);
> vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;
> vq->lock = &ctx->dev->dev_mutex;
> + /* One of means to indicate end-of-stream for coda is to set the
s/One of means/One way/
> + * bytesused == 0. However by default videobuf2 handles videobuf
s/videobuf/bytesused/
> + * equal to 0 as a special case and changes its value to the size
> + * of the buffer. Set the allow_zero_bytesused flag, so
> + * that videobuf2 will keep the value of bytesused intact.
> + */
> + vq->allow_zero_bytesused = 1;
>
> return vb2_queue_init(vq);
> }
>
Regards,
Hans
next prev parent reply other threads:[~2015-02-20 16:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-20 16:38 [PATCH v5 1/4] vb2: split the io_flags member of vb2_queue into a bit field Kamil Debski
2015-02-20 16:38 ` [PATCH v5 2/4] vb2: add allow_zero_bytesused flag to the vb2_queue struct Kamil Debski
2015-02-20 16:52 ` Hans Verkuil
2015-02-23 11:58 ` Kamil Debski
2015-02-23 11:59 ` Hans Verkuil
2015-02-20 16:38 ` [PATCH v5 3/4] coda: set allow_zero_bytesused flag for vb2_queue_init Kamil Debski
2015-02-20 16:53 ` Hans Verkuil [this message]
2015-02-20 16:38 ` [PATCH v5 4/4] s5p-mfc: " Kamil Debski
2015-02-20 16:53 ` Hans Verkuil
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=54E76675.70908@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=k.debski@samsung.com \
--cc=linux-media@vger.kernel.org \
--cc=m.szyprowski@samsung.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.