LinuxTV Patchwork [PATCHv4,01/10] videodev2.h: add tag support

login
register
mail settings
Submitter Hans Verkuil
Date Dec. 5, 2018, 10:20 a.m.
Message ID <20181205102040.11741-2-hverkuil-cisco@xs4all.nl>
Download mbox | patch
Permalink /patch/53306/
State New
Delegated to: Hans Verkuil
Headers show

Comments

Hans Verkuil - Dec. 5, 2018, 10:20 a.m.
From: Hans Verkuil <hverkuil-cisco@xs4all.nl>

Add support for 'tags' to struct v4l2_buffer. These can be used
by m2m devices so userspace can set a tag for an output buffer and
this value will then be copied to the capture buffer(s).

This tag can be used to refer to capture buffers, something that
is needed by stateless HW codecs.

The new V4L2_BUF_CAP_SUPPORTS_TAGS capability indicates whether
or not tags are supported.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
---
 include/uapi/linux/videodev2.h | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
Hans Verkuil - Dec. 6, 2018, 3:08 p.m.
Mauro raised a number of objections on irc regarding tags:

https://linuxtv.org/irc/irclogger_log/media-maint?date=2018-12-06,Thu

I would like to setup an irc meeting to discuss this and come to a
conclusion, since we need to decide this soon since this is critical
for stateless codec support.

Unfortunately timezone-wise this is a bit of a nightmare. I think
that at least Mauro, myself and Tomasz Figa should be there, so UTC-2,
UTC+1 and UTC+9 (if I got that right).

I propose 9 AM UTC which I think will work for everyone except Nicolas.
Any day next week works for me, and (for now) as well for Mauro. Let's pick
Monday to start with, and if you want to join in, then let me know. If that
day doesn't work for you, let me know what other days next week do work for
you.

Regards,

	Hans

On 12/05/18 11:20, hverkuil-cisco@xs4all.nl wrote:
> From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> 
> Add support for 'tags' to struct v4l2_buffer. These can be used
> by m2m devices so userspace can set a tag for an output buffer and
> this value will then be copied to the capture buffer(s).
> 
> This tag can be used to refer to capture buffers, something that
> is needed by stateless HW codecs.
> 
> The new V4L2_BUF_CAP_SUPPORTS_TAGS capability indicates whether
> or not tags are supported.
> 
> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
> Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
> ---
>  include/uapi/linux/videodev2.h | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
> index 2db1635de956..9095d7abe10d 100644
> --- a/include/uapi/linux/videodev2.h
> +++ b/include/uapi/linux/videodev2.h
> @@ -881,6 +881,7 @@ struct v4l2_requestbuffers {
>  #define V4L2_BUF_CAP_SUPPORTS_DMABUF	(1 << 2)
>  #define V4L2_BUF_CAP_SUPPORTS_REQUESTS	(1 << 3)
>  #define V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS (1 << 4)
> +#define V4L2_BUF_CAP_SUPPORTS_TAGS	(1 << 5)
>  
>  /**
>   * struct v4l2_plane - plane info for multi-planar buffers
> @@ -940,6 +941,7 @@ struct v4l2_plane {
>   * @length:	size in bytes of the buffer (NOT its payload) for single-plane
>   *		buffers (when type != *_MPLANE); number of elements in the
>   *		planes array for multi-plane buffers
> + * @tag:	buffer tag
>   * @request_fd: fd of the request that this buffer should use
>   *
>   * Contains data exchanged by application and driver using one of the Streaming
> @@ -964,7 +966,10 @@ struct v4l2_buffer {
>  		__s32		fd;
>  	} m;
>  	__u32			length;
> -	__u32			reserved2;
> +	union {
> +		__u32		reserved2;
> +		__u32		tag;
> +	};
>  	union {
>  		__s32		request_fd;
>  		__u32		reserved;
> @@ -990,6 +995,8 @@ struct v4l2_buffer {
>  #define V4L2_BUF_FLAG_IN_REQUEST		0x00000080
>  /* timecode field is valid */
>  #define V4L2_BUF_FLAG_TIMECODE			0x00000100
> +/* tag field is valid */
> +#define V4L2_BUF_FLAG_TAG			0x00000200
>  /* Buffer is prepared for queuing */
>  #define V4L2_BUF_FLAG_PREPARED			0x00000400
>  /* Cache handling flags */
>
Alexandre Courbot - Dec. 7, 2018, 8:41 a.m.
Hi Hans,

On Fri, Dec 7, 2018 at 12:08 AM Hans Verkuil <hverkuil-cisco@xs4all.nl> wrote:
>
> Mauro raised a number of objections on irc regarding tags:
>
> https://linuxtv.org/irc/irclogger_log/media-maint?date=2018-12-06,Thu
>
> I would like to setup an irc meeting to discuss this and come to a
> conclusion, since we need to decide this soon since this is critical
> for stateless codec support.
>
> Unfortunately timezone-wise this is a bit of a nightmare. I think
> that at least Mauro, myself and Tomasz Figa should be there, so UTC-2,
> UTC+1 and UTC+9 (if I got that right).
>
> I propose 9 AM UTC which I think will work for everyone except Nicolas.
> Any day next week works for me, and (for now) as well for Mauro. Let's pick
> Monday to start with, and if you want to join in, then let me know. If that
> day doesn't work for you, let me know what other days next week do work for
> you.

Monday (or any other day next week) 9AM UTC should work for me!

Thanks,
Alex.
Tomasz Figa - Dec. 10, 2018, 3:18 a.m.
Hi Hans,

On Fri, Dec 7, 2018 at 12:08 AM Hans Verkuil <hverkuil-cisco@xs4all.nl> wrote:
>
> Mauro raised a number of objections on irc regarding tags:
>
> https://linuxtv.org/irc/irclogger_log/media-maint?date=2018-12-06,Thu
>
> I would like to setup an irc meeting to discuss this and come to a
> conclusion, since we need to decide this soon since this is critical
> for stateless codec support.
>
> Unfortunately timezone-wise this is a bit of a nightmare. I think
> that at least Mauro, myself and Tomasz Figa should be there, so UTC-2,
> UTC+1 and UTC+9 (if I got that right).
>
> I propose 9 AM UTC which I think will work for everyone except Nicolas.
> Any day next week works for me, and (for now) as well for Mauro. Let's pick
> Monday to start with, and if you want to join in, then let me know. If that
> day doesn't work for you, let me know what other days next week do work for
> you.

9am UTC (which should be 6pm JST)  works for me on any day this week.

Best regards,
Tomasz

>
> Regards,
>
>         Hans
>
> On 12/05/18 11:20, hverkuil-cisco@xs4all.nl wrote:
> > From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> >
> > Add support for 'tags' to struct v4l2_buffer. These can be used
> > by m2m devices so userspace can set a tag for an output buffer and
> > this value will then be copied to the capture buffer(s).
> >
> > This tag can be used to refer to capture buffers, something that
> > is needed by stateless HW codecs.
> >
> > The new V4L2_BUF_CAP_SUPPORTS_TAGS capability indicates whether
> > or not tags are supported.
> >
> > Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> > Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
> > Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
> > ---
> >  include/uapi/linux/videodev2.h | 9 ++++++++-
> >  1 file changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
> > index 2db1635de956..9095d7abe10d 100644
> > --- a/include/uapi/linux/videodev2.h
> > +++ b/include/uapi/linux/videodev2.h
> > @@ -881,6 +881,7 @@ struct v4l2_requestbuffers {
> >  #define V4L2_BUF_CAP_SUPPORTS_DMABUF (1 << 2)
> >  #define V4L2_BUF_CAP_SUPPORTS_REQUESTS       (1 << 3)
> >  #define V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS (1 << 4)
> > +#define V4L2_BUF_CAP_SUPPORTS_TAGS   (1 << 5)
> >
> >  /**
> >   * struct v4l2_plane - plane info for multi-planar buffers
> > @@ -940,6 +941,7 @@ struct v4l2_plane {
> >   * @length:  size in bytes of the buffer (NOT its payload) for single-plane
> >   *           buffers (when type != *_MPLANE); number of elements in the
> >   *           planes array for multi-plane buffers
> > + * @tag:     buffer tag
> >   * @request_fd: fd of the request that this buffer should use
> >   *
> >   * Contains data exchanged by application and driver using one of the Streaming
> > @@ -964,7 +966,10 @@ struct v4l2_buffer {
> >               __s32           fd;
> >       } m;
> >       __u32                   length;
> > -     __u32                   reserved2;
> > +     union {
> > +             __u32           reserved2;
> > +             __u32           tag;
> > +     };
> >       union {
> >               __s32           request_fd;
> >               __u32           reserved;
> > @@ -990,6 +995,8 @@ struct v4l2_buffer {
> >  #define V4L2_BUF_FLAG_IN_REQUEST             0x00000080
> >  /* timecode field is valid */
> >  #define V4L2_BUF_FLAG_TIMECODE                       0x00000100
> > +/* tag field is valid */
> > +#define V4L2_BUF_FLAG_TAG                    0x00000200
> >  /* Buffer is prepared for queuing */
> >  #define V4L2_BUF_FLAG_PREPARED                       0x00000400
> >  /* Cache handling flags */
> >
>
Tomasz Figa - Dec. 10, 2018, 6:11 a.m.
Hi Mauro,

On Mon, Dec 10, 2018 at 1:31 PM Mauro Carvalho Chehab
<mchehab@kernel.org> wrote:
>
> In time: please reply to mchehab@kernel.org.
>
>
>
> Em 10 de dezembro de 2018 02:28:21 BRST, Mauro Carvalho Chehab <mchehab@osg.samsung.com> escreveu:
>>
>> Let's do it on Wed.
>>
>> I'm very busy on Monday and Tuesday.

Do you mean Wednesday in your time zone? If so, that would be Thursday
for Europe and Asia.

Regardless of that, it should work for me.

Best regards,
Tomasz

>>
>> Regards,
>> Mauro
>>
>> Em 10 de dezembro de 2018 01:18:38 BRST, Tomasz Figa <tfiga@chromium.org> escreveu:
>>>
>>> Hi Hans,
>>>
>>> On Fri, Dec 7, 2018 at 12:08 AM Hans Verkuil <hverkuil-cisco@xs4all.nl> wrote:
>>>>
>>>>
>>>>  Mauro raised a number of objections on irc regarding tags:
>>>>
>>>>  https://linuxtv.org/irc/irclogger_log/media-maint?date=2018-12-06,Thu
>>>>
>>>>  I would like to setup an irc meeting to discuss this and come to a
>>>>  conclusion, since we need to decide this soon since this is critical
>>>>  for stateless codec support.
>>>>
>>>>  Unfortunately timezone-wise this is a bit of a nightmare. I think
>>>>  that at least Mauro, myself and Tomasz Figa should be there, so UTC-2,
>>>>  UTC+1 and UTC+9 (if I got that right).
>>>>
>>>>  I propose 9 AM UTC which I think will work for everyone except Nicolas.
>>>>  Any day next week works for me, and (for now) as well for Mauro. Let's pick
>>>>  Monday to start with, and if you want to join in, then let me know. If that
>>>>  day doesn't work for you, let me know what other days next week do work for
>>>>  you.
>>>
>>>
>>> 9am UTC (which should be 6pm JST)  works for me on any day this week.
>>>
>>> Best regards,
>>> Tomasz
>>>
>>>>
>>>>  Regards,
>>>>
>>>>          Hans
>>>>
>>>>  On 12/05/18 11:20, hverkuil-cisco@xs4all.nl wrote:
>>>>>
>>>>>  From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
>>>>>
>>>>>  Add support for 'tags' to struct v4l2_buffer. These can be used
>>>>>  by m2m devices so userspace can set a tag for an output buffer and
>>>>>  this value will then be copied to the capture buffer(s).
>>>>>
>>>>>  This tag can be used to refer to capture buffers, something that
>>>>>  is needed by stateless HW codecs.
>>>>>
>>>>>  The new V4L2_BUF_CAP_SUPPORTS_TAGS capability indicates whether
>>>>>  or not tags are supported.
>>>>>
>>>>>  Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
>>>>>  Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
>>>>>  Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
>>>>> ________________________________
>>>>>   include/uapi/linux/videodev2.h | 9 ++++++++-
>>>>>   1 file changed, 8 insertions(+), 1 deletion(-)
>>>>>
>>>>>  diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
>>>>>  index 2db1635de956..9095d7abe10d 100644
>>>>>  --- a/include/uapi/linux/videodev2.h
>>>>>  +++ b/include/uapi/linux/videodev2.h
>>>>>  @@ -881,6 +881,7 @@ struct v4l2_requestbuffers {
>>>>>   #define V4L2_BUF_CAP_SUPPORTS_DMABUF (1 << 2)
>>>>>   #define V4L2_BUF_CAP_SUPPORTS_REQUESTS       (1 << 3)
>>>>>   #define V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS (1 << 4)
>>>>>  +#define V4L2_BUF_CAP_SUPPORTS_TAGS   (1 << 5)
>>>>>
>>>>>   /**
>>>>>    * struct v4l2_plane - plane info for multi-planar buffers
>>>>>  @@ -940,6 +941,7 @@ struct v4l2_plane {
>>>>>    * @length:  size in bytes of the buffer (NOT its payload) for single-plane
>>>>>    *           buffers (when type != *_MPLANE); number of elements in the
>>>>>    *           planes array for multi-plane buffers
>>>>>  + * @tag:     buffer tag
>>>>>    * @request_fd: fd of the request that this buffer should use
>>>>>    *
>>>>>    * Contains data exchanged by application and driver using one of the Streaming
>>>>>  @@ -964,7 +966,10 @@ struct v4l2_buffer {
>>>>>                __s32           fd;
>>>>>        } m;
>>>>>        __u32                   length;
>>>>>  -     __u32                   reserved2;
>>>>>  +     union {
>>>>>  +             __u32           reserved2;
>>>>>  +             __u32           tag;
>>>>>  +     };
>>>>>        union {
>>>>>                __s32           request_fd;
>>>>>                __u32           reserved;
>>>>>  @@ -990,6 +995,8 @@ struct v4l2_buffer {
>>>>>   #define V4L2_BUF_FLAG_IN_REQUEST             0x00000080
>>>>>   /* timecode field is valid */
>>>>>   #define V4L2_BUF_FLAG_TIMECODE                       0x00000100
>>>>>  +/* tag field is valid */
>>>>>  +#define V4L2_BUF_FLAG_TAG                    0x00000200
>>>>>   /* Buffer is prepared for queuing */
>>>>>   #define V4L2_BUF_FLAG_PREPARED                       0x00000400
>>>>>   /* Cache handling flags */
>>>>>
>>>>
>
> --
>
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
Mauro Carvalho Chehab - Dec. 10, 2018, 7:57 a.m.
Hi Tomasz,

I mean Wed morning on my TZ, with would be Wed late afternoon on your TZ :-)

As Hans pointed, we are at UTC-2 (Brazil), UTC+1 (Europe CET)
and UTC+9 (Japan). Hans is proposing to have it 9am UTC.

E, g:

	https://www.timeanddate.com/worldclock/meetingdetails.html?year=2018&month=12&day=12&hour=9&min=0&sec=0&p1=45&p2=101&p3=248

Regards,
Mauro



Em Mon, 10 Dec 2018 15:11:26 +0900
Tomasz Figa <tfiga@chromium.org> escreveu:

> Hi Mauro,
> 
> On Mon, Dec 10, 2018 at 1:31 PM Mauro Carvalho Chehab
> <mchehab@kernel.org> wrote:
> >
> > In time: please reply to mchehab@kernel.org.
> >
> >
> >
> > Em 10 de dezembro de 2018 02:28:21 BRST, Mauro Carvalho Chehab <mchehab@osg.samsung.com> escreveu:  
> >>
> >> Let's do it on Wed.
> >>
> >> I'm very busy on Monday and Tuesday.  
> 
> Do you mean Wednesday in your time zone? If so, that would be Thursday
> for Europe and Asia.
> 
> Regardless of that, it should work for me.
> 
> Best regards,
> Tomasz
> 
> >>
> >> Regards,
> >> Mauro
> >>
> >> Em 10 de dezembro de 2018 01:18:38 BRST, Tomasz Figa <tfiga@chromium.org> escreveu:  
> >>>
> >>> Hi Hans,
> >>>
> >>> On Fri, Dec 7, 2018 at 12:08 AM Hans Verkuil <hverkuil-cisco@xs4all.nl> wrote:  
> >>>>
> >>>>
> >>>>  Mauro raised a number of objections on irc regarding tags:
> >>>>
> >>>>  https://linuxtv.org/irc/irclogger_log/media-maint?date=2018-12-06,Thu
> >>>>
> >>>>  I would like to setup an irc meeting to discuss this and come to a
> >>>>  conclusion, since we need to decide this soon since this is critical
> >>>>  for stateless codec support.
> >>>>
> >>>>  Unfortunately timezone-wise this is a bit of a nightmare. I think
> >>>>  that at least Mauro, myself and Tomasz Figa should be there, so UTC-2,
> >>>>  UTC+1 and UTC+9 (if I got that right).
> >>>>
> >>>>  I propose 9 AM UTC which I think will work for everyone except Nicolas.
> >>>>  Any day next week works for me, and (for now) as well for Mauro. Let's pick
> >>>>  Monday to start with, and if you want to join in, then let me know. If that
> >>>>  day doesn't work for you, let me know what other days next week do work for
> >>>>  you.  
> >>>
> >>>
> >>> 9am UTC (which should be 6pm JST)  works for me on any day this week.
> >>>
> >>> Best regards,
> >>> Tomasz
> >>>  
> >>>>
> >>>>  Regards,
> >>>>
> >>>>          Hans
> >>>>
> >>>>  On 12/05/18 11:20, hverkuil-cisco@xs4all.nl wrote:  
> >>>>>
> >>>>>  From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> >>>>>
> >>>>>  Add support for 'tags' to struct v4l2_buffer. These can be used
> >>>>>  by m2m devices so userspace can set a tag for an output buffer and
> >>>>>  this value will then be copied to the capture buffer(s).
> >>>>>
> >>>>>  This tag can be used to refer to capture buffers, something that
> >>>>>  is needed by stateless HW codecs.
> >>>>>
> >>>>>  The new V4L2_BUF_CAP_SUPPORTS_TAGS capability indicates whether
> >>>>>  or not tags are supported.
> >>>>>
> >>>>>  Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> >>>>>  Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
> >>>>>  Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
> >>>>> ________________________________
> >>>>>   include/uapi/linux/videodev2.h | 9 ++++++++-
> >>>>>   1 file changed, 8 insertions(+), 1 deletion(-)
> >>>>>
> >>>>>  diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
> >>>>>  index 2db1635de956..9095d7abe10d 100644
> >>>>>  --- a/include/uapi/linux/videodev2.h
> >>>>>  +++ b/include/uapi/linux/videodev2.h
> >>>>>  @@ -881,6 +881,7 @@ struct v4l2_requestbuffers {
> >>>>>   #define V4L2_BUF_CAP_SUPPORTS_DMABUF (1 << 2)
> >>>>>   #define V4L2_BUF_CAP_SUPPORTS_REQUESTS       (1 << 3)
> >>>>>   #define V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS (1 << 4)
> >>>>>  +#define V4L2_BUF_CAP_SUPPORTS_TAGS   (1 << 5)
> >>>>>
> >>>>>   /**
> >>>>>    * struct v4l2_plane - plane info for multi-planar buffers
> >>>>>  @@ -940,6 +941,7 @@ struct v4l2_plane {
> >>>>>    * @length:  size in bytes of the buffer (NOT its payload) for single-plane
> >>>>>    *           buffers (when type != *_MPLANE); number of elements in the
> >>>>>    *           planes array for multi-plane buffers
> >>>>>  + * @tag:     buffer tag
> >>>>>    * @request_fd: fd of the request that this buffer should use
> >>>>>    *
> >>>>>    * Contains data exchanged by application and driver using one of the Streaming
> >>>>>  @@ -964,7 +966,10 @@ struct v4l2_buffer {
> >>>>>                __s32           fd;
> >>>>>        } m;
> >>>>>        __u32                   length;
> >>>>>  -     __u32                   reserved2;
> >>>>>  +     union {
> >>>>>  +             __u32           reserved2;
> >>>>>  +             __u32           tag;
> >>>>>  +     };
> >>>>>        union {
> >>>>>                __s32           request_fd;
> >>>>>                __u32           reserved;
> >>>>>  @@ -990,6 +995,8 @@ struct v4l2_buffer {
> >>>>>   #define V4L2_BUF_FLAG_IN_REQUEST             0x00000080
> >>>>>   /* timecode field is valid */
> >>>>>   #define V4L2_BUF_FLAG_TIMECODE                       0x00000100
> >>>>>  +/* tag field is valid */
> >>>>>  +#define V4L2_BUF_FLAG_TAG                    0x00000200
> >>>>>   /* Buffer is prepared for queuing */
> >>>>>   #define V4L2_BUF_FLAG_PREPARED                       0x00000400
> >>>>>   /* Cache handling flags */
> >>>>>  
> >>>>  
> >
> > --
> >
> > Sent from my Android device with K-9 Mail. Please excuse my brevity.  



Thanks,
Mauro
Hans Verkuil - Dec. 10, 2018, 7:59 a.m.
Wed works for me.

Regards,

	Hans

On 12/10/18 5:28 AM, Mauro Carvalho Chehab wrote:
> Let's do it on Wed.
> 
> I'm very busy on Monday and Tuesday.
> 
> Regards,
> Mauro
> 
> Em 10 de dezembro de 2018 01:18:38 BRST, Tomasz Figa <tfiga@chromium.org> escreveu:
> 
>     Hi Hans,
> 
>     On Fri, Dec 7, 2018 at 12:08 AM Hans Verkuil <hverkuil-cisco@xs4all.nl> wrote:
> 
> 
>         Mauro raised a number of objections on irc regarding tags:
> 
>         https://linuxtv.org/irc/irclogger_log/media-maint?date=2018-12-06,Thu
> 
>         I would like to setup an irc meeting to discuss this and come to a
>         conclusion, since we need to decide this soon since this is critical
>         for stateless codec support.
> 
>         Unfortunately timezone-wise this is a bit of a nightmare. I think
>         that at least Mauro, myself and Tomasz Figa should be there, so UTC-2,
>         UTC+1 and UTC+9 (if I got that right).
> 
>         I propose 9 AM UTC which I think will work for everyone except Nicolas.
>         Any day next week works for me, and (for now) as well for Mauro. Let's pick
>         Monday to start with, and if you want to join in, then let me know. If that
>         day doesn't work for you, let me know what other days next week do work for
>         you.
> 
> 
>     9am UTC (which should be 6pm JST)  works for me on any day this week.
> 
>     Best regards,
>     Tomasz
> 
> 
>         Regards,
> 
>         Hans
> 
>         On 12/05/18 11:20, hverkuil-cisco@xs4all.nl wrote:
> 
>             From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> 
>             Add support for 'tags' to struct v4l2_buffer. These can be used
>             by m2m devices so userspace can set a tag for an output buffer and
>             this value will then be copied to the capture buffer(s).
> 
>             This tag can be used to refer to capture buffers, something that
>             is needed by stateless HW codecs.
> 
>             The new V4L2_BUF_CAP_SUPPORTS_TAGS capability indicates whether
>             or not tags are supported.
> 
>             Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
>             Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
>             Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
>             --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>             include/uapi/linux/videodev2.h | 9 ++++++++-
>             1 file changed, 8 insertions(+), 1 deletion(-)
> 
>             diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
>             index 2db1635de956..9095d7abe10d 100644
>             --- a/include/uapi/linux/videodev2.h
>             +++ b/include/uapi/linux/videodev2.h
>             @@ -881,6 +881,7 @@ struct v4l2_requestbuffers {
>             #define V4L2_BUF_CAP_SUPPORTS_DMABUF (1 << 2)
>             #define V4L2_BUF_CAP_SUPPORTS_REQUESTS (1 << 3)
>             #define V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS (1 << 4)
>             +#define V4L2_BUF_CAP_SUPPORTS_TAGS (1 << 5)
> 
>             /**
>             * struct v4l2_plane - plane info for multi-planar buffers
>             @@ -940,6 +941,7 @@ struct v4l2_plane {
>             * @length: size in bytes of the buffer (NOT its payload) for single-plane
>             * buffers (when type != *_MPLANE); number of elements in the
>             * planes array for multi-plane buffers
>             + * @tag: buffer tag
>             * @request_fd: fd of the request that this buffer should use
>             *
>             * Contains data exchanged by application and driver using one of the Streaming
>             @@ -964,7 +966,10 @@ struct v4l2_buffer {
>             __s32 fd;
>             } m;
>             __u32 length;
>             - __u32 reserved2;
>             + union {
>             + __u32 reserved2;
>             + __u32 tag;
>             + };
>             union {
>             __s32 request_fd;
>             __u32 reserved;
>             @@ -990,6 +995,8 @@ struct v4l2_buffer {
>             #define V4L2_BUF_FLAG_IN_REQUEST 0x00000080
>             /* timecode field is valid */
>             #define V4L2_BUF_FLAG_TIMECODE 0x00000100
>             +/* tag field is valid */
>             +#define V4L2_BUF_FLAG_TAG 0x00000200
>             /* Buffer is prepared for queuing */
>             #define V4L2_BUF_FLAG_PREPARED 0x00000400
>             /* Cache handling flags */
> 
> 
> 
> -- 
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
Tomasz Figa - Dec. 10, 2018, 8:03 a.m.
On Mon, Dec 10, 2018 at 4:57 PM Mauro Carvalho Chehab
<mchehab@kernel.org> wrote:
>
> Hi Tomasz,
>
> I mean Wed morning on my TZ, with would be Wed late afternoon on your TZ :-)
>
> As Hans pointed, we are at UTC-2 (Brazil), UTC+1 (Europe CET)
> and UTC+9 (Japan). Hans is proposing to have it 9am UTC.
>
> E, g:
>
>         https://www.timeanddate.com/worldclock/meetingdetails.html?year=2018&month=12&day=12&hour=9&min=0&sec=0&p1=45&p2=101&p3=248
>

Okay, sorry, I got the time zones mixed up. Nevertheless, it works for me. :)

> Regards,
> Mauro
>
>
>
> Em Mon, 10 Dec 2018 15:11:26 +0900
> Tomasz Figa <tfiga@chromium.org> escreveu:
>
> > Hi Mauro,
> >
> > On Mon, Dec 10, 2018 at 1:31 PM Mauro Carvalho Chehab
> > <mchehab@kernel.org> wrote:
> > >
> > > In time: please reply to mchehab@kernel.org.
> > >
> > >
> > >
> > > Em 10 de dezembro de 2018 02:28:21 BRST, Mauro Carvalho Chehab <mchehab@osg.samsung.com> escreveu:
> > >>
> > >> Let's do it on Wed.
> > >>
> > >> I'm very busy on Monday and Tuesday.
> >
> > Do you mean Wednesday in your time zone? If so, that would be Thursday
> > for Europe and Asia.
> >
> > Regardless of that, it should work for me.
> >
> > Best regards,
> > Tomasz
> >
> > >>
> > >> Regards,
> > >> Mauro
> > >>
> > >> Em 10 de dezembro de 2018 01:18:38 BRST, Tomasz Figa <tfiga@chromium.org> escreveu:
> > >>>
> > >>> Hi Hans,
> > >>>
> > >>> On Fri, Dec 7, 2018 at 12:08 AM Hans Verkuil <hverkuil-cisco@xs4all.nl> wrote:
> > >>>>
> > >>>>
> > >>>>  Mauro raised a number of objections on irc regarding tags:
> > >>>>
> > >>>>  https://linuxtv.org/irc/irclogger_log/media-maint?date=2018-12-06,Thu
> > >>>>
> > >>>>  I would like to setup an irc meeting to discuss this and come to a
> > >>>>  conclusion, since we need to decide this soon since this is critical
> > >>>>  for stateless codec support.
> > >>>>
> > >>>>  Unfortunately timezone-wise this is a bit of a nightmare. I think
> > >>>>  that at least Mauro, myself and Tomasz Figa should be there, so UTC-2,
> > >>>>  UTC+1 and UTC+9 (if I got that right).
> > >>>>
> > >>>>  I propose 9 AM UTC which I think will work for everyone except Nicolas.
> > >>>>  Any day next week works for me, and (for now) as well for Mauro. Let's pick
> > >>>>  Monday to start with, and if you want to join in, then let me know. If that
> > >>>>  day doesn't work for you, let me know what other days next week do work for
> > >>>>  you.
> > >>>
> > >>>
> > >>> 9am UTC (which should be 6pm JST)  works for me on any day this week.
> > >>>
> > >>> Best regards,
> > >>> Tomasz
> > >>>
> > >>>>
> > >>>>  Regards,
> > >>>>
> > >>>>          Hans
> > >>>>
> > >>>>  On 12/05/18 11:20, hverkuil-cisco@xs4all.nl wrote:
> > >>>>>
> > >>>>>  From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> > >>>>>
> > >>>>>  Add support for 'tags' to struct v4l2_buffer. These can be used
> > >>>>>  by m2m devices so userspace can set a tag for an output buffer and
> > >>>>>  this value will then be copied to the capture buffer(s).
> > >>>>>
> > >>>>>  This tag can be used to refer to capture buffers, something that
> > >>>>>  is needed by stateless HW codecs.
> > >>>>>
> > >>>>>  The new V4L2_BUF_CAP_SUPPORTS_TAGS capability indicates whether
> > >>>>>  or not tags are supported.
> > >>>>>
> > >>>>>  Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> > >>>>>  Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
> > >>>>>  Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
> > >>>>> ________________________________
> > >>>>>   include/uapi/linux/videodev2.h | 9 ++++++++-
> > >>>>>   1 file changed, 8 insertions(+), 1 deletion(-)
> > >>>>>
> > >>>>>  diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
> > >>>>>  index 2db1635de956..9095d7abe10d 100644
> > >>>>>  --- a/include/uapi/linux/videodev2.h
> > >>>>>  +++ b/include/uapi/linux/videodev2.h
> > >>>>>  @@ -881,6 +881,7 @@ struct v4l2_requestbuffers {
> > >>>>>   #define V4L2_BUF_CAP_SUPPORTS_DMABUF (1 << 2)
> > >>>>>   #define V4L2_BUF_CAP_SUPPORTS_REQUESTS       (1 << 3)
> > >>>>>   #define V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS (1 << 4)
> > >>>>>  +#define V4L2_BUF_CAP_SUPPORTS_TAGS   (1 << 5)
> > >>>>>
> > >>>>>   /**
> > >>>>>    * struct v4l2_plane - plane info for multi-planar buffers
> > >>>>>  @@ -940,6 +941,7 @@ struct v4l2_plane {
> > >>>>>    * @length:  size in bytes of the buffer (NOT its payload) for single-plane
> > >>>>>    *           buffers (when type != *_MPLANE); number of elements in the
> > >>>>>    *           planes array for multi-plane buffers
> > >>>>>  + * @tag:     buffer tag
> > >>>>>    * @request_fd: fd of the request that this buffer should use
> > >>>>>    *
> > >>>>>    * Contains data exchanged by application and driver using one of the Streaming
> > >>>>>  @@ -964,7 +966,10 @@ struct v4l2_buffer {
> > >>>>>                __s32           fd;
> > >>>>>        } m;
> > >>>>>        __u32                   length;
> > >>>>>  -     __u32                   reserved2;
> > >>>>>  +     union {
> > >>>>>  +             __u32           reserved2;
> > >>>>>  +             __u32           tag;
> > >>>>>  +     };
> > >>>>>        union {
> > >>>>>                __s32           request_fd;
> > >>>>>                __u32           reserved;
> > >>>>>  @@ -990,6 +995,8 @@ struct v4l2_buffer {
> > >>>>>   #define V4L2_BUF_FLAG_IN_REQUEST             0x00000080
> > >>>>>   /* timecode field is valid */
> > >>>>>   #define V4L2_BUF_FLAG_TIMECODE                       0x00000100
> > >>>>>  +/* tag field is valid */
> > >>>>>  +#define V4L2_BUF_FLAG_TAG                    0x00000200
> > >>>>>   /* Buffer is prepared for queuing */
> > >>>>>   #define V4L2_BUF_FLAG_PREPARED                       0x00000400
> > >>>>>   /* Cache handling flags */
> > >>>>>
> > >>>>
> > >
> > > --
> > >
> > > Sent from my Android device with K-9 Mail. Please excuse my brevity.
>
>
>
> Thanks,
> Mauro
Sakari Ailus - Dec. 10, 2018, 8:10 a.m.
On Mon, Dec 10, 2018 at 08:59:36AM +0100, Hans Verkuil wrote:
> Wed works for me.

Same here.

Patch

diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 2db1635de956..9095d7abe10d 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -881,6 +881,7 @@  struct v4l2_requestbuffers {
 #define V4L2_BUF_CAP_SUPPORTS_DMABUF	(1 << 2)
 #define V4L2_BUF_CAP_SUPPORTS_REQUESTS	(1 << 3)
 #define V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS (1 << 4)
+#define V4L2_BUF_CAP_SUPPORTS_TAGS	(1 << 5)
 
 /**
  * struct v4l2_plane - plane info for multi-planar buffers
@@ -940,6 +941,7 @@  struct v4l2_plane {
  * @length:	size in bytes of the buffer (NOT its payload) for single-plane
  *		buffers (when type != *_MPLANE); number of elements in the
  *		planes array for multi-plane buffers
+ * @tag:	buffer tag
  * @request_fd: fd of the request that this buffer should use
  *
  * Contains data exchanged by application and driver using one of the Streaming
@@ -964,7 +966,10 @@  struct v4l2_buffer {
 		__s32		fd;
 	} m;
 	__u32			length;
-	__u32			reserved2;
+	union {
+		__u32		reserved2;
+		__u32		tag;
+	};
 	union {
 		__s32		request_fd;
 		__u32		reserved;
@@ -990,6 +995,8 @@  struct v4l2_buffer {
 #define V4L2_BUF_FLAG_IN_REQUEST		0x00000080
 /* timecode field is valid */
 #define V4L2_BUF_FLAG_TIMECODE			0x00000100
+/* tag field is valid */
+#define V4L2_BUF_FLAG_TAG			0x00000200
 /* Buffer is prepared for queuing */
 #define V4L2_BUF_FLAG_PREPARED			0x00000400
 /* Cache handling flags */

Privacy Policy