Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1720649 > unrolled thread
| Started by | Mauro Carvalho Chehab <mchehab@s-opensource.com> |
|---|---|
| First post | 2017-08-26 14:00 +0200 |
| Last post | 2017-08-28 15:30 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v4 6/7] media: videodev2: add a flag for MC-centric devices Mauro Carvalho Chehab <mchehab@s-opensource.com> - 2017-08-26 14:00 +0200
Re: [PATCH v4 6/7] media: videodev2: add a flag for MC-centric devices Hans Verkuil <hverkuil@xs4all.nl> - 2017-08-28 11:50 +0200
V4L2 device node centric - Was: [PATCH v4 6/7] media: videodev2: add a flag for MC-centric devices Mauro Carvalho Chehab <mchehab@s-opensource.com> - 2017-08-28 15:30 +0200
| From | Mauro Carvalho Chehab <mchehab@s-opensource.com> |
|---|---|
| Date | 2017-08-26 14:00 +0200 |
| Subject | [PATCH v4 6/7] media: videodev2: add a flag for MC-centric devices |
| Message-ID | <uiHUS-Iu-19@gated-at.bofh.it> |
As both vdev-centric and MC-centric devices may implement the
same APIs, we need a flag to allow userspace to distinguish
between them.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
---
Documentation/media/uapi/v4l/open.rst | 7 +++++++
Documentation/media/uapi/v4l/vidioc-querycap.rst | 5 +++++
Documentation/media/videodev2.h.rst.exceptions | 1 +
include/uapi/linux/videodev2.h | 2 ++
4 files changed, 15 insertions(+)
diff --git a/Documentation/media/uapi/v4l/open.rst b/Documentation/media/uapi/v4l/open.rst
index 64b1de047b1b..d0930fc170f0 100644
--- a/Documentation/media/uapi/v4l/open.rst
+++ b/Documentation/media/uapi/v4l/open.rst
@@ -46,6 +46,13 @@ the periferal can be used. For such devices, the sub-devices' configuration
can be controlled via the :ref:`sub-device API <subdev>`, which creates one
device node per sub-device.
+.. attention::
+
+ Devices that require **mc-centric** hardware peripheral control should
+ report a ``V4L2_MC_CENTRIC`` :c:type:`v4l2_capability` flag
+ (see :ref:`VIDIOC_QUERYCAP`).
+
+
In summary, for **MC-centric** hardware peripheral control:
- The **V4L2 device** node is responsible for controlling the streaming
diff --git a/Documentation/media/uapi/v4l/vidioc-querycap.rst b/Documentation/media/uapi/v4l/vidioc-querycap.rst
index 12e0d9a63cd8..2b08723375bc 100644
--- a/Documentation/media/uapi/v4l/vidioc-querycap.rst
+++ b/Documentation/media/uapi/v4l/vidioc-querycap.rst
@@ -252,6 +252,11 @@ specification the ioctl returns an ``EINVAL`` error code.
* - ``V4L2_CAP_TOUCH``
- 0x10000000
- This is a touch device.
+ * - ``V4L2_MC_CENTRIC``
+ - 0x20000000
+ - Indicates that the device require **mc-centric** hardware
+ control, and thus can't be used by **v4l2-centric** applications.
+ See :ref:`v4l2_hardware_control` for more details.
* - ``V4L2_CAP_DEVICE_CAPS``
- 0x80000000
- The driver fills the ``device_caps`` field. This capability can
diff --git a/Documentation/media/videodev2.h.rst.exceptions b/Documentation/media/videodev2.h.rst.exceptions
index a5cb0a8686ac..b51a575f9f75 100644
--- a/Documentation/media/videodev2.h.rst.exceptions
+++ b/Documentation/media/videodev2.h.rst.exceptions
@@ -157,6 +157,7 @@ replace define V4L2_CAP_META_CAPTURE device-capabilities
replace define V4L2_CAP_READWRITE device-capabilities
replace define V4L2_CAP_ASYNCIO device-capabilities
replace define V4L2_CAP_STREAMING device-capabilities
+replace define V4L2_CAP_MC_CENTRIC device-capabilities
replace define V4L2_CAP_DEVICE_CAPS device-capabilities
replace define V4L2_CAP_TOUCH device-capabilities
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 45cf7359822c..7b490fe97980 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -460,6 +460,8 @@ struct v4l2_capability {
#define V4L2_CAP_TOUCH 0x10000000 /* Is a touch device */
+#define V4L2_CAP_MC_CENTRIC 0x20000000 /* Device require mc-centric hardware control */
+
#define V4L2_CAP_DEVICE_CAPS 0x80000000 /* sets device capabilities field */
/*
--
2.13.3
[toc] | [next] | [standalone]
| From | Hans Verkuil <hverkuil@xs4all.nl> |
|---|---|
| Date | 2017-08-28 11:50 +0200 |
| Subject | Re: [PATCH v4 6/7] media: videodev2: add a flag for MC-centric devices |
| Message-ID | <ujoQa-3WH-19@gated-at.bofh.it> |
| In reply to | #1720649 |
On 26/08/17 13:53, Mauro Carvalho Chehab wrote:
> As both vdev-centric and MC-centric devices may implement the
> same APIs, we need a flag to allow userspace to distinguish
> between them.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
> ---
> Documentation/media/uapi/v4l/open.rst | 7 +++++++
> Documentation/media/uapi/v4l/vidioc-querycap.rst | 5 +++++
> Documentation/media/videodev2.h.rst.exceptions | 1 +
> include/uapi/linux/videodev2.h | 2 ++
> 4 files changed, 15 insertions(+)
>
> diff --git a/Documentation/media/uapi/v4l/open.rst b/Documentation/media/uapi/v4l/open.rst
> index 64b1de047b1b..d0930fc170f0 100644
> --- a/Documentation/media/uapi/v4l/open.rst
> +++ b/Documentation/media/uapi/v4l/open.rst
> @@ -46,6 +46,13 @@ the periferal can be used. For such devices, the sub-devices' configuration
> can be controlled via the :ref:`sub-device API <subdev>`, which creates one
> device node per sub-device.
>
> +.. attention::
> +
> + Devices that require **mc-centric** hardware peripheral control should
MC-centric
As mentioned in my review of a previous patch I dislike the term "peripheral".
I think it should be dropped here.
> + report a ``V4L2_MC_CENTRIC`` :c:type:`v4l2_capability` flag
> + (see :ref:`VIDIOC_QUERYCAP`).
> +
> +
> In summary, for **MC-centric** hardware peripheral control:
>
> - The **V4L2 device** node is responsible for controlling the streaming
> diff --git a/Documentation/media/uapi/v4l/vidioc-querycap.rst b/Documentation/media/uapi/v4l/vidioc-querycap.rst
> index 12e0d9a63cd8..2b08723375bc 100644
> --- a/Documentation/media/uapi/v4l/vidioc-querycap.rst
> +++ b/Documentation/media/uapi/v4l/vidioc-querycap.rst
> @@ -252,6 +252,11 @@ specification the ioctl returns an ``EINVAL`` error code.
> * - ``V4L2_CAP_TOUCH``
> - 0x10000000
> - This is a touch device.
> + * - ``V4L2_MC_CENTRIC``
> + - 0x20000000
> + - Indicates that the device require **mc-centric** hardware
MC-centric
> + control, and thus can't be used by **v4l2-centric** applications.
vdev-centric
TBD: I still think I prefer V4L2-centric over vdev-centric.
> + See :ref:`v4l2_hardware_control` for more details.
> * - ``V4L2_CAP_DEVICE_CAPS``
> - 0x80000000
> - The driver fills the ``device_caps`` field. This capability can
> diff --git a/Documentation/media/videodev2.h.rst.exceptions b/Documentation/media/videodev2.h.rst.exceptions
> index a5cb0a8686ac..b51a575f9f75 100644
> --- a/Documentation/media/videodev2.h.rst.exceptions
> +++ b/Documentation/media/videodev2.h.rst.exceptions
> @@ -157,6 +157,7 @@ replace define V4L2_CAP_META_CAPTURE device-capabilities
> replace define V4L2_CAP_READWRITE device-capabilities
> replace define V4L2_CAP_ASYNCIO device-capabilities
> replace define V4L2_CAP_STREAMING device-capabilities
> +replace define V4L2_CAP_MC_CENTRIC device-capabilities
> replace define V4L2_CAP_DEVICE_CAPS device-capabilities
> replace define V4L2_CAP_TOUCH device-capabilities
>
> diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
> index 45cf7359822c..7b490fe97980 100644
> --- a/include/uapi/linux/videodev2.h
> +++ b/include/uapi/linux/videodev2.h
> @@ -460,6 +460,8 @@ struct v4l2_capability {
>
> #define V4L2_CAP_TOUCH 0x10000000 /* Is a touch device */
>
> +#define V4L2_CAP_MC_CENTRIC 0x20000000 /* Device require mc-centric hardware control */
requires
MC-centric
> +
> #define V4L2_CAP_DEVICE_CAPS 0x80000000 /* sets device capabilities field */
>
> /*
>
Regards,
Hans
[toc] | [prev] | [next] | [standalone]
| From | Mauro Carvalho Chehab <mchehab@s-opensource.com> |
|---|---|
| Date | 2017-08-28 15:30 +0200 |
| Subject | V4L2 device node centric - Was: [PATCH v4 6/7] media: videodev2: add a flag for MC-centric devices |
| Message-ID | <ujsh5-665-43@gated-at.bofh.it> |
| In reply to | #1721447 |
Em Mon, 28 Aug 2017 11:41:58 +0200
Hans Verkuil <hverkuil@xs4all.nl> escreveu:
> > + control, and thus can't be used by **v4l2-centric** applications.
>
> vdev-centric
>
> TBD: I still think I prefer V4L2-centric over vdev-centric.
I'm splitting it on a separate thread, to make easier for us to discuss.
For those that aren't tracking the patchset that are documenting those
terms, when MC was added, we got a hole new series of V4L2 devices that
are incompatible with standard V4L2 applications, as they require
knowledge about the hardware sub-devices. We are referring to such
devices as MC-centric. We need another term to refer to the V4L2 devices
that can be used by a generic application, and are fully controlled via a
V4L2 device (/dev/video*, /dev/radio*, /dev/swradio*, /dev/vbi*,
/dev/v4l-touch*).
The proposed documentation patch series solves this issue by
adding a glossary (patch 1) that defines what a "V4L2 device node"
as:
V4L2 device node
A device node that it is associated to a V4L2 main driver,
as specified at :ref:`v4l2_device_naming`.
And, at the device naming chapter, at the spec (patch 2), it
explicitly lists all V4L2 device node names:
.. _v4l2_device_naming:
V4L2 Device Node Naming
=======================
...
The existing V4L2 device node types are:
======================== ======================================================
Default device node name Usage
======================== ======================================================
``/dev/videoX`` Video input/output devices
``/dev/vbiX`` Vertical blank data (i.e. closed captions, teletext)
``/dev/radioX`` Radio tuners and modulators
``/dev/swradioX`` Software Defined Radio tuners and modulators
``/dev/v4l-touchX`` Touch sensors
======================== ======================================================
So, the concept of "V4L2 Device Node" is now clear, and doesn't
include V4L2 sub-device device nodes (/dev/v4l-subdev*).
For devices controlled via media controller, everybody seems to be
comfortable of calling them as MC-centric.
There are currently two proposals to refer to the media hardware that
is controlled via a V4L2 Device Node:
- vdev-centric
- V4L2-centric
The last one sounds confusing to me, as subdev API is part of the V4L2
specification. "V4L2-centric" name sounds to include subdevs.
That's why IMHO, vdev-centric is better.
We could go to some other naming for them, that would also be
an alias for "V4L2 Device Node":
- VD-centric
- VDN-centric
Comments?
Thanks,
Mauro
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web