From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org, Hans Verkuil <hansverk@cisco.com>
Subject: Re: [PATCHv5 12/12] media-ioc-enum-entities.rst/-g-topology.rst: clarify ID/name usage
Date: Mon, 09 Jul 2018 16:12:57 +0300 [thread overview]
Message-ID: <1910449.xYJzjsU7bm@avalon> (raw)
In-Reply-To: <20180629114331.7617-13-hverkuil@xs4all.nl>
Hi Hans,
Thank you for the patch.
On Friday, 29 June 2018 14:43:31 EEST Hans Verkuil wrote:
> From: Hans Verkuil <hansverk@cisco.com>
>
> Mention that IDs should not be hardcoded in applications and that the
> entity name must be unique within the media topology.
>
> Signed-off-by: Hans Verkuil <hansverk@cisco.com>
> ---
> .../uapi/mediactl/media-ioc-enum-entities.rst | 9 +++++---
> .../uapi/mediactl/media-ioc-g-topology.rst | 22 ++++++++++++++-----
> 2 files changed, 22 insertions(+), 9 deletions(-)
>
> diff --git a/Documentation/media/uapi/mediactl/media-ioc-enum-entities.rst
> b/Documentation/media/uapi/mediactl/media-ioc-enum-entities.rst index
> 961466ae821d..a4aa7deef690 100644
> --- a/Documentation/media/uapi/mediactl/media-ioc-enum-entities.rst
> +++ b/Documentation/media/uapi/mediactl/media-ioc-enum-entities.rst
> @@ -62,15 +62,18 @@ id's until they get an error.
> - ``id``
> -
> -
> - - Entity id, set by the application. When the id is or'ed with
> + - Entity id, set by the application. When the ID is or'ed with
Should you also s/Entity id/Entity ID/ for consistency ?
Apart from that,
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ``MEDIA_ENT_ID_FLAG_NEXT``, the driver clears the flag and returns
> - the first entity with a larger id.
> + the first entity with a larger ID. Do not expect that the ID will
> + always be the same for each instance of the device. In other words,
> + do not hardcode entity IDs in an application.
>
> * - char
> - ``name``\ [32]
> -
> -
> - - Entity name as an UTF-8 NULL-terminated string.
> + - Entity name as an UTF-8 NULL-terminated string. This name must be
> unique
> + within the media topology.
>
> * - __u32
> - ``type``
> diff --git a/Documentation/media/uapi/mediactl/media-ioc-g-topology.rst
> b/Documentation/media/uapi/mediactl/media-ioc-g-topology.rst index
> e572dd0d806d..3a5f165d9811 100644
> --- a/Documentation/media/uapi/mediactl/media-ioc-g-topology.rst
> +++ b/Documentation/media/uapi/mediactl/media-ioc-g-topology.rst
> @@ -131,11 +131,14 @@ desired arrays with the media graph elements.
>
> * - __u32
> - ``id``
> - - Unique ID for the entity.
> + - Unique ID for the entity. Do not expect that the ID will
> + always be the same for each instance of the device. In other words,
> + do not hardcode entity IDs in an application.
>
> * - char
> - ``name``\ [64]
> - - Entity name as an UTF-8 NULL-terminated string.
> + - Entity name as an UTF-8 NULL-terminated string. This name must be
> unique
> + within the media topology.
>
> * - __u32
> - ``function``
> @@ -166,7 +169,9 @@ desired arrays with the media graph elements.
>
> * - __u32
> - ``id``
> - - Unique ID for the interface.
> + - Unique ID for the interface. Do not expect that the ID will
> + always be the same for each instance of the device. In other words,
> + do not hardcode interface IDs in an application.
>
> * - __u32
> - ``intf_type``
> @@ -215,7 +220,9 @@ desired arrays with the media graph elements.
>
> * - __u32
> - ``id``
> - - Unique ID for the pad.
> + - Unique ID for the pad. Do not expect that the ID will
> + always be the same for each instance of the device. In other words,
> + do not hardcode pad IDs in an application.
>
> * - __u32
> - ``entity_id``
> @@ -231,7 +238,8 @@ desired arrays with the media graph elements.
> returns true. The ``media_version`` is defined in struct
>
> :c:type:`media_device_info` and can be retrieved using
> :ref:`MEDIA_IOC_DEVICE_INFO`. Pad indices are stable. If new pads are
> :added
>
> - for an entity in the future, then those will be added at the end.
> + for an entity in the future, then those will be added at the end of the
> + entity's pad array.
>
> * - __u32
> - ``reserved``\ [4]
> @@ -250,7 +258,9 @@ desired arrays with the media graph elements.
>
> * - __u32
> - ``id``
> - - Unique ID for the link.
> + - Unique ID for the link. Do not expect that the ID will
> + always be the same for each instance of the device. In other words,
> + do not hardcode link IDs in an application.
>
> * - __u32
> - ``source_id``
--
Regards,
Laurent Pinchart
prev parent reply other threads:[~2018-07-09 13:12 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-29 11:43 [PATCHv5 00/12] media/mc: fix inconsistencies Hans Verkuil
2018-06-29 11:43 ` [PATCHv5 01/12] media: add 'index' to struct media_v2_pad Hans Verkuil
2018-07-09 12:55 ` Laurent Pinchart
2018-07-09 13:40 ` Hans Verkuil
2018-07-11 11:33 ` Laurent Pinchart
2018-07-11 11:45 ` Hans Verkuil
2018-08-03 12:34 ` Sakari Ailus
2018-08-03 14:47 ` Mauro Carvalho Chehab
2018-06-29 11:43 ` [PATCHv5 02/12] media-ioc-g-topology.rst: document new 'index' field Hans Verkuil
2018-07-09 12:57 ` Laurent Pinchart
2018-06-29 11:43 ` [PATCHv5 03/12] media: add flags field to struct media_v2_entity Hans Verkuil
2018-07-09 12:58 ` Laurent Pinchart
2018-06-29 11:43 ` [PATCHv5 04/12] media-ioc-g-topology.rst: document new 'flags' field Hans Verkuil
2018-06-29 11:43 ` [PATCHv5 05/12] media: rename MEDIA_ENT_F_DTV_DECODER to MEDIA_ENT_F_DV_DECODER Hans Verkuil
2018-06-29 17:40 ` Ezequiel Garcia
2018-07-09 13:00 ` Laurent Pinchart
2018-07-09 13:42 ` Hans Verkuil
2018-07-11 11:36 ` Laurent Pinchart
2018-06-29 11:43 ` [PATCHv5 06/12] media.h: add MEDIA_ENT_F_DV_ENCODER Hans Verkuil
2018-07-09 13:02 ` Laurent Pinchart
2018-06-29 11:43 ` [PATCHv5 07/12] media.h: reorder video en/decoder functions Hans Verkuil
2018-07-09 13:02 ` Laurent Pinchart
2018-06-29 11:43 ` [PATCHv5 08/12] ad9389b/adv7511: set proper media entity function Hans Verkuil
2018-07-09 13:04 ` Laurent Pinchart
2018-07-09 13:44 ` Hans Verkuil
2018-06-29 11:43 ` [PATCHv5 09/12] adv7180/tvp514x/tvp7002: fix " Hans Verkuil
2018-07-09 13:04 ` Laurent Pinchart
2018-06-29 11:43 ` [PATCHv5 10/12] media/i2c: add missing entity functions Hans Verkuil
2018-07-09 13:05 ` Laurent Pinchart
2018-06-29 11:43 ` [PATCHv5 11/12] media-ioc-enum-links.rst: improve pad index description Hans Verkuil
2018-07-09 13:10 ` Laurent Pinchart
2018-07-09 13:47 ` Hans Verkuil
2018-06-29 11:43 ` [PATCHv5 12/12] media-ioc-enum-entities.rst/-g-topology.rst: clarify ID/name usage Hans Verkuil
2018-07-09 13:12 ` Laurent Pinchart [this message]
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=1910449.xYJzjsU7bm@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=hansverk@cisco.com \
--cc=hverkuil@xs4all.nl \
--cc=linux-media@vger.kernel.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