mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nicolas Dufresne <nicolas@ndufresne.ca>
To: Alexandre Courbot <acourbot@chromium.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Hans Verkuil <hverkuil@xs4all.nl>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Pawel Osciak <posciak@chromium.org>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Tomasz Figa <tfiga@chromium.org>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Gustavo Padovan <gustavo.padovan@collabora.com>
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 0/9] media: base request API support
Date: Fri, 15 Dec 2017 16:04:44 -0500	[thread overview]
Message-ID: <1513371884.3541.8.camel@ndufresne.ca> (raw)
In-Reply-To: <20171215075625.27028-1-acourbot@chromium.org>

[-- Attachment #1: Type: text/plain, Size: 4087 bytes --]

Le vendredi 15 décembre 2017 à 16:56 +0900, Alexandre Courbot a écrit :
> Here is a new attempt at the request API, following the UAPI we agreed on in
> Prague. Hopefully this can be used as the basis to move forward.
> 
> This series only introduces the very basics of how requests work: allocate a
> request, queue buffers to it, queue the request itself, wait for it to complete,
> reuse it. It does *not* yet use Hans' work with controls setting. I have
> preferred to submit it this way for now as it allows us to concentrate on the
> basic request/buffer flow, which was harder to get properly than I initially
> thought. I still have a gut feeling that it can be improved, with less back-and-
> forth into drivers.
> 
> Plugging in controls support should not be too hard a task (basically just apply
> the saved controls when the request starts), and I am looking at it now.
> 
> The resulting vim2m driver can be successfully used with requests, and my tests
> so far have been successful.
> 
> There are still some rougher edges:
> 
> * locking is currently quite coarse-grained
> * too many #ifdef CONFIG_MEDIA_CONTROLLER in the code, as the request API
>   depends on it - I plan to craft the headers so that it becomes unnecessary.
>   As it is, some of the code will probably not even compile if
>   CONFIG_MEDIA_CONTROLLER is not set

Would it be possible to explain why this relation between request and
the media controller ? Why couldn't request be created from video
devices ?

> 
> But all in all I think the request flow should be clear and easy to review, and
> the possibility of custom queue and entity support implementations should give
> us the flexibility we need to support more specific use-cases (I expect the
> generic implementations to be sufficient most of the time though).
> 
> A very simple test program exercising this API is available here (don't forget
> to adapt the /dev/media0 hardcoding):
> https://gist.github.com/Gnurou/dbc3776ed97ea7d4ce6041ea15eb0438
> 
> Looking forward to your feedback and comments!
> 
> Alexandre Courbot (8):
>   media: add request API core and UAPI
>   media: request: add generic queue
>   media: request: add generic entity ops
>   media: vb2: add support for requests
>   media: vb2: add support for requests in QBUF ioctl
>   media: v4l2-mem2mem: add request support
>   media: vim2m: add media device
>   media: vim2m: add request support
> 
> Hans Verkuil (1):
>   videodev2.h: Add request field to v4l2_buffer
> 
>  drivers/media/Makefile                        |   4 +-
>  drivers/media/media-device.c                  |   6 +
>  drivers/media/media-request-entity-generic.c  |  56 ++++
>  drivers/media/media-request-queue-generic.c   | 150 ++++++++++
>  drivers/media/media-request.c                 | 390 ++++++++++++++++++++++++++
>  drivers/media/platform/vim2m.c                |  46 +++
>  drivers/media/usb/cpia2/cpia2_v4l.c           |   2 +-
>  drivers/media/v4l2-core/v4l2-compat-ioctl32.c |   7 +-
>  drivers/media/v4l2-core/v4l2-ioctl.c          |  99 ++++++-
>  drivers/media/v4l2-core/v4l2-mem2mem.c        |  34 +++
>  drivers/media/v4l2-core/videobuf2-core.c      |  59 +++-
>  drivers/media/v4l2-core/videobuf2-v4l2.c      |  32 ++-
>  include/media/media-device.h                  |   3 +
>  include/media/media-entity.h                  |   6 +
>  include/media/media-request.h                 | 282 +++++++++++++++++++
>  include/media/v4l2-mem2mem.h                  |  19 ++
>  include/media/videobuf2-core.h                |  25 +-
>  include/media/videobuf2-v4l2.h                |   2 +
>  include/uapi/linux/media.h                    |  11 +
>  include/uapi/linux/videodev2.h                |   3 +-
>  20 files changed, 1216 insertions(+), 20 deletions(-)
>  create mode 100644 drivers/media/media-request-entity-generic.c
>  create mode 100644 drivers/media/media-request-queue-generic.c
>  create mode 100644 drivers/media/media-request.c
>  create mode 100644 include/media/media-request.h
> 

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

  parent reply	other threads:[~2017-12-15 21:04 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-15  7:56 Alexandre Courbot
2017-12-15  7:56 ` [RFC PATCH 1/9] media: add request API core and UAPI Alexandre Courbot
2017-12-15 10:37   ` Philippe Ombredanne
2018-01-12 10:16   ` Hans Verkuil
2018-01-26  8:39   ` Sakari Ailus
2018-01-30  4:23     ` Alexandre Courbot
2018-02-02  7:33       ` Sakari Ailus
2018-02-02  7:41         ` Tomasz Figa
2018-02-02  8:00         ` Hans Verkuil
2017-12-15  7:56 ` [RFC PATCH 2/9] media: request: add generic queue Alexandre Courbot
2017-12-15  7:56 ` [RFC PATCH 3/9] media: request: add generic entity ops Alexandre Courbot
2017-12-15  7:56 ` [RFC PATCH 4/9] videodev2.h: Add request field to v4l2_buffer Alexandre Courbot
2018-01-12 10:22   ` Hans Verkuil
2018-01-15  8:24     ` Alexandre Courbot
2017-12-15  7:56 ` [RFC PATCH 5/9] media: vb2: add support for requests Alexandre Courbot
2018-01-12 10:49   ` Hans Verkuil
2018-01-15  8:24     ` Alexandre Courbot
2018-01-15  9:07       ` Hans Verkuil
2018-01-16  9:39         ` Alexandre Courbot
2018-01-16 10:37           ` Hans Verkuil
2018-01-17  8:01             ` Alexandre Courbot
2018-01-17  8:37               ` Hans Verkuil
2017-12-15  7:56 ` [RFC PATCH 6/9] media: vb2: add support for requests in QBUF ioctl Alexandre Courbot
2018-01-12 11:37   ` Hans Verkuil
2018-01-15  8:24     ` Alexandre Courbot
2018-01-15  9:19       ` Hans Verkuil
2018-01-16  9:40         ` Alexandre Courbot
2017-12-15  7:56 ` [RFC PATCH 7/9] media: v4l2-mem2mem: add request support Alexandre Courbot
2017-12-15  7:56 ` [RFC PATCH 8/9] media: vim2m: add media device Alexandre Courbot
2017-12-15  7:56 ` [RFC PATCH 9/9] media: vim2m: add request support Alexandre Courbot
2017-12-18 20:53   ` Gustavo Padovan
2017-12-20  9:29     ` Alexandre Courbot
2017-12-15 21:02 ` [RFC PATCH 0/9] media: base request API support Nicolas Dufresne
2017-12-20  9:24   ` Alexandre Courbot
2017-12-15 21:04 ` Nicolas Dufresne [this message]
2017-12-20  9:27   ` Alexandre Courbot
2018-01-12 11:45 ` Hans Verkuil
2018-01-15  8:24   ` Alexandre Courbot
2018-01-15  8: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=1513371884.3541.8.camel@ndufresne.ca \
    --to=nicolas@ndufresne.ca \
    --cc=acourbot@chromium.org \
    --cc=gustavo.padovan@collabora.com \
    --cc=hverkuil@xs4all.nl \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mchehab@kernel.org \
    --cc=posciak@chromium.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=tfiga@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 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®