From: Hans Verkuil <hverkuil@xs4all.nl>
To: Kamil Debski <k.debski@samsung.com>, linux-media@vger.kernel.org
Cc: Marek Szyprowski <m.szyprowski@samsung.com>,
nicolas.dufresne@collabora.com, posciak@chromium.org
Subject: Re: [PATCH 1/2] vb2: Add VB2_FILEIO_ALLOW_ZERO_BYTESUSED flag to vb2_fileio_flags
Date: Wed, 18 Feb 2015 10:58:23 +0100 [thread overview]
Message-ID: <54E4623F.70902@xs4all.nl> (raw)
In-Reply-To: <000001d04b5f$30a4afe0$91ee0fa0$%debski@samsung.com>
On 02/18/15 10:42, Kamil Debski wrote:
> Hi Hans,
>
>> From: Hans Verkuil [mailto:hverkuil@xs4all.nl]
>> Sent: Tuesday, February 17, 2015 10:11 AM
>>
>> Hi Kamil,
>>
>> On 12/16/14 12:36, Kamil Debski wrote:
>>> The vb2: fix bytesused == 0 handling (8a75ffb) patch changed the
>>> behavior of __fill_vb2_buffer function, so that if bytesused is 0 it
>>> is set to the size of the buffer. However, bytesused set to 0 is used
>>> by older codec drivers as as indication used to mark the end of
>> stream.
>>>
>>> To keep backward compatibility, this patch adds a flag passed to the
>>> vb2_queue_init function - VB2_FILEIO_ALLOW_ZERO_BYTESUSED. If the
>> flag
>>> is set upon initialization of the queue, the videobuf2 keeps the
>> value
>>> of bytesused intact and passes it to the driver.
>>
>> What is the status of this patch series?
>
> I have to admit that I had forgotten a bit about this patch, because of
> other
> important work. Thanks for reminding me :)
>
>> Note that io_flags is really the wrong place for this flag, it should
>> be io_modes. This flag has nothing to do with file I/O.
>
> What do you think about adding a separate flags field into the vb2_queue
> structure? This could be combined with changing io_flags to u8 or a bit
> field
> to save space.
I think changing io_flags to a bitfield is a good idea.
unsigned fileio_read_once:1;
unsigned fileio_write_immediately:1;
unsigned allow_zero_bytesused:1;
However, going back to allow_zero_bytesused: this has been broken for
quite some time without anyone complaining (other than you :-) ). Might
it not be better to just fix this properly by calling V4L2_DEC_CMD_STOP,
as done here: https://www.mail-archive.com/linux-media@vger.kernel.org/msg84916.html,
and drop the support for zero bytesused to mark EOS entirely?
I might be too optimistic here. Or perhaps at least add a pr_warn telling
users to switch to V4L2_DEC_CMD_STOP since this will be removed in 2017 or
whatever.
Regards,
Hans
next prev parent reply other threads:[~2015-02-18 9:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-16 11:36 [PATCH 1/2] vb2: Add VB2_FILEIO_ALLOW_ZERO_BYTESUSED flag to vb2_fileio_flags Kamil Debski
2014-12-16 11:36 ` [PATCH 2/2] s5p-mfc: use VB2_FILEIO_ALLOW_ZERO_BYTESUSED flag Kamil Debski
2014-12-19 14:35 ` [PATCH 1/2] vb2: Add VB2_FILEIO_ALLOW_ZERO_BYTESUSED flag to vb2_fileio_flags Jean-Michel Hautbois
2014-12-19 16:03 ` Kamil Debski
2014-12-19 16:07 ` Jean-Michel Hautbois
2015-02-17 9:11 ` Hans Verkuil
2015-02-18 9:42 ` Kamil Debski
2015-02-18 9:58 ` Hans Verkuil [this message]
2015-02-18 10:31 ` Kamil Debski
2015-02-18 10:43 ` 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=54E4623F.70902@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=k.debski@samsung.com \
--cc=linux-media@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=nicolas.dufresne@collabora.com \
--cc=posciak@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 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.