mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Gustavo Padovan <gustavo@padovan.org>, linux-media@vger.kernel.org
Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
	Shuah Khan <shuahkh@osg.samsung.com>,
	Pawel Osciak <pawel@osciak.com>,
	Alexandre Courbot <acourbot@chromium.org>,
	Sakari Ailus <sakari.ailus@iki.fi>,
	Brian Starkey <brian.starkey@arm.com>,
	Thierry Escande <thierry.escande@collabora.com>,
	linux-kernel@vger.kernel.org,
	Gustavo Padovan <gustavo.padovan@collabora.com>
Subject: Re: [PATCH v7 2/6] [media] v4l: add 'unordered' flag to format description ioctl
Date: Fri, 12 Jan 2018 13:05:06 +0100	[thread overview]
Message-ID: <d53a9ec1-8e9c-c19f-768d-2783d7ea4a1c@xs4all.nl> (raw)
In-Reply-To: <20180110160732.7722-3-gustavo@padovan.org>

On 01/10/18 17:07, Gustavo Padovan wrote:
> From: Gustavo Padovan <gustavo.padovan@collabora.com>
> 
> For explicit synchronization it important for userspace to know if the
> format being used by the driver can deliver the buffers back to userspace
> in the same order they were queued with QBUF.
> 
> Ordered streams fits nicely in a pipeline with DRM for example, where
> ordered buffer are expected.
> 
> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
> ---
>  Documentation/media/uapi/v4l/vidioc-enum-fmt.rst | 3 +++
>  include/uapi/linux/videodev2.h                   | 1 +
>  2 files changed, 4 insertions(+)
> 
> diff --git a/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst b/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst
> index 019c513df217..368115f44fc0 100644
> --- a/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst
> +++ b/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst
> @@ -116,6 +116,9 @@ one until ``EINVAL`` is returned.
>        - This format is not native to the device but emulated through
>  	software (usually libv4l2), where possible try to use a native
>  	format instead for better performance.
> +    * - ``V4L2_FMT_FLAG_UNORDERED``
> +      - 0x0004
> +      - This is a format that doesn't guarantee timely order of frames.

I'd rephrase this:

"This format doesn't guarantee ordered buffer handling. I.e. the order in
which buffers are dequeued with VIDIOC_DQBUF may be different from the order
in which they were queued with VIDIOC_QBUF."

(Use proper links to VIDIOC_(D)QBUF)

I would also like to see an example of a driver that uses this. The cobalt
driver is a candidate for this.

Regards,

	Hans

>  
>  
>  Return Value
> diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
> index 982718965180..58894cfe9479 100644
> --- a/include/uapi/linux/videodev2.h
> +++ b/include/uapi/linux/videodev2.h
> @@ -716,6 +716,7 @@ struct v4l2_fmtdesc {
>  
>  #define V4L2_FMT_FLAG_COMPRESSED 0x0001
>  #define V4L2_FMT_FLAG_EMULATED   0x0002
> +#define V4L2_FMT_FLAG_UNORDERED  0x0004
>  
>  	/* Frame Size and frame rate enumeration */
>  /*
> 

  reply	other threads:[~2018-01-12 12:05 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-10 16:07 [PATCH v7 0/6] V4L2 Explicit Synchronization Gustavo Padovan
2018-01-10 16:07 ` [PATCH v7 1/6] [media] vb2: add is_unordered callback for drivers Gustavo Padovan
2018-01-12 11:57   ` Hans Verkuil
2018-01-15  7:11   ` Alexandre Courbot
2018-01-15 12:01     ` Gustavo Padovan
2018-01-15 12:14       ` Hans Verkuil
2018-01-15 17:55         ` Gustavo Padovan
2018-01-16  2:35       ` Alexandre Courbot
2018-01-10 16:07 ` [PATCH v7 2/6] [media] v4l: add 'unordered' flag to format description ioctl Gustavo Padovan
2018-01-12 12:05   ` Hans Verkuil [this message]
2018-01-10 16:07 ` [PATCH v7 3/6] [media] vb2: add explicit fence user API Gustavo Padovan
2018-01-12 12:15   ` Hans Verkuil
2018-01-12 12:20   ` Hans Verkuil
2018-01-10 16:07 ` [PATCH v7 4/6] [media] vb2: add in-fence support to QBUF Gustavo Padovan
2018-01-12 13:46   ` Hans Verkuil
2018-01-18 17:38     ` Gustavo Padovan
2018-01-10 16:07 ` [PATCH v7 5/6] [media] vb2: add out-fence " Gustavo Padovan
2018-01-12 14:05   ` Hans Verkuil
2018-01-19 13:12     ` Gustavo Padovan
2018-01-15  7:12   ` Alexandre Courbot
2018-01-19 13:43     ` Gustavo Padovan
2018-01-10 16:07 ` [PATCH v7 6/6] [media] v4l: Document explicit synchronization behavior Gustavo Padovan
2018-01-12 14:48   ` Hans Verkuil
2018-01-10 16:44 ` [PATCH v7 0/6] V4L2 Explicit Synchronization Nicolas Dufresne
2018-01-10 17:11   ` Gustavo Padovan

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=d53a9ec1-8e9c-c19f-768d-2783d7ea4a1c@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=acourbot@chromium.org \
    --cc=brian.starkey@arm.com \
    --cc=gustavo.padovan@collabora.com \
    --cc=gustavo@padovan.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@osg.samsung.com \
    --cc=pawel@osciak.com \
    --cc=sakari.ailus@iki.fi \
    --cc=shuahkh@osg.samsung.com \
    --cc=thierry.escande@collabora.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®