mbox series

[v2,0/2] This patchset add Read-only(Ro) request for capture queue

Message ID 20200622015227.24134-1-yunfei.dong@mediatek.com (mailing list archive)
Headers show
Series This patchset add Read-only(Ro) request for capture queue | expand

Message

Yunfei Dong June 22, 2020, 1:52 a.m. UTC
User driver need to get HDR10+ information for each capture buffer;
For some encoder cases, user driver need to get encoded message for
each frame. So add support read-only(Ro) request for capture queue.

Ro request mean that user driver just can get ext ctrls, set ext ctrls
is not not allowed. Ro Request also can be used in output queue.

There is not upstream driver to use this feature at now, but we are
developing internal driver to use it. If it is ready, we will try to
upstream vdec/venc driver based on this feature.

Change compared to v1:
-change commit message of patch 01/02
-change commit message of patch 02/02

Yunfei Dong (2):
  media: v4l UAPI: add V4L2_BUF_CAP_SUPPORTS_RO_REQUESTS
  media: v4l: Add Ro request api for capture queue

 .../media/v4l/vidioc-reqbufs.rst              |   4 +
 .../media/common/videobuf2/videobuf2-v4l2.c   |   7 ++
 drivers/media/mc/mc-request.c                 |  10 +-
 drivers/media/v4l2-core/v4l2-ctrls.c          | 107 +++++++++++++++---
 drivers/media/v4l2-core/v4l2-ioctl.c          |  22 ++++
 drivers/media/v4l2-core/v4l2-mem2mem.c        |  19 ++--
 include/media/v4l2-ctrls.h                    |  22 +++-
 include/media/v4l2-fh.h                       |   2 +
 include/media/videobuf2-core.h                |   2 +
 include/uapi/linux/videodev2.h                |   1 +
 10 files changed, 158 insertions(+), 38 deletions(-)

Comments

Ezequiel Garcia June 23, 2020, 6:43 p.m. UTC | #1
Hi Yunfei,

Thanks for the patch.

On Sun, 21 Jun 2020 at 22:55, Yunfei Dong <yunfei.dong@mediatek.com> wrote:
>
> User driver need to get HDR10+ information for each capture buffer;
> For some encoder cases, user driver need to get encoded message for
> each frame. So add support read-only(Ro) request for capture queue.
>
> Ro request mean that user driver just can get ext ctrls, set ext ctrls
> is not not allowed. Ro Request also can be used in output queue.
>
> There is not upstream driver to use this feature at now, but we are
> developing internal driver to use it. If it is ready, we will try to
> upstream vdec/venc driver based on this feature.
>

An upstream driver using the feature would be important, but it would
be nice to also have: an open-source userspace application,
and a proper explanation in the stateless decoder interface specification.

Thanks,
Ezequiel

> Change compared to v1:
> -change commit message of patch 01/02
> -change commit message of patch 02/02
>
> Yunfei Dong (2):
>   media: v4l UAPI: add V4L2_BUF_CAP_SUPPORTS_RO_REQUESTS
>   media: v4l: Add Ro request api for capture queue
>
>  .../media/v4l/vidioc-reqbufs.rst              |   4 +
>  .../media/common/videobuf2/videobuf2-v4l2.c   |   7 ++
>  drivers/media/mc/mc-request.c                 |  10 +-
>  drivers/media/v4l2-core/v4l2-ctrls.c          | 107 +++++++++++++++---
>  drivers/media/v4l2-core/v4l2-ioctl.c          |  22 ++++
>  drivers/media/v4l2-core/v4l2-mem2mem.c        |  19 ++--
>  include/media/v4l2-ctrls.h                    |  22 +++-
>  include/media/v4l2-fh.h                       |   2 +
>  include/media/videobuf2-core.h                |   2 +
>  include/uapi/linux/videodev2.h                |   1 +
>  10 files changed, 158 insertions(+), 38 deletions(-)
>
Yunfei Dong June 29, 2020, 6:47 a.m. UTC | #2
Hi Ezequiel Garcia,

Thanks for your advice.

1: An upstream driver using the feature would be important, but it would
be nice to also have: an open-source userspace application,
>>> Ro request is one feature based on media request. In userspace,
application can use it the same as with request. Ro request and request
are separated in kernel space with different ctrl handler.

2:and a proper explanation in the stateless decoder interface
specification.
>>> Whether add the explanation in cover-letter is enough ? In fact,
these patches just add one new function v4l2_check_ro_ext_ctrls(), other
changes separate Ro request and request.


Thanks again.

Best Regards,
Yunfei Dong

On Tue, 2020-06-23 at 15:43 -0300, Ezequiel Garcia wrote:
> Hi Yunfei,
> 
> Thanks for the patch.
> 
> On Sun, 21 Jun 2020 at 22:55, Yunfei Dong <yunfei.dong@mediatek.com> wrote:
> >
> > User driver need to get HDR10+ information for each capture buffer;
> > For some encoder cases, user driver need to get encoded message for
> > each frame. So add support read-only(Ro) request for capture queue.
> >
> > Ro request mean that user driver just can get ext ctrls, set ext ctrls
> > is not not allowed. Ro Request also can be used in output queue.
> >
> > There is not upstream driver to use this feature at now, but we are
> > developing internal driver to use it. If it is ready, we will try to
> > upstream vdec/venc driver based on this feature.
> >
> 
> An upstream driver using the feature would be important, but it would
> be nice to also have: an open-source userspace application,
> and a proper explanation in the stateless decoder interface specification.
> 
> Thanks,
> Ezequiel
> 
> > Change compared to v1:
> > -change commit message of patch 01/02
> > -change commit message of patch 02/02
> >
> > Yunfei Dong (2):
> >   media: v4l UAPI: add V4L2_BUF_CAP_SUPPORTS_RO_REQUESTS
> >   media: v4l: Add Ro request api for capture queue
> >
> >  .../media/v4l/vidioc-reqbufs.rst              |   4 +
> >  .../media/common/videobuf2/videobuf2-v4l2.c   |   7 ++
> >  drivers/media/mc/mc-request.c                 |  10 +-
> >  drivers/media/v4l2-core/v4l2-ctrls.c          | 107 +++++++++++++++---
> >  drivers/media/v4l2-core/v4l2-ioctl.c          |  22 ++++
> >  drivers/media/v4l2-core/v4l2-mem2mem.c        |  19 ++--
> >  include/media/v4l2-ctrls.h                    |  22 +++-
> >  include/media/v4l2-fh.h                       |   2 +
> >  include/media/videobuf2-core.h                |   2 +
> >  include/uapi/linux/videodev2.h                |   1 +
> >  10 files changed, 158 insertions(+), 38 deletions(-)
> >