[{"id":22246,"web_url":"https://patchwork.libcamera.org/comment/22246/","msgid":"<98056b10-32da-4a17-6235-ccb6101db2aa@gmail.com>","date":"2022-03-09T15:43:22","subject":"Re: [libcamera-devel] [PATCH v3 2/5] media: media.h: Add new media\n\tlink type","submitter":{"id":97,"url":"https://patchwork.libcamera.org/api/people/97/","name":"Nicolas Dufresne via libcamera-devel","email":"libcamera-devel@lists.libcamera.org"},"content":"Hi !\n\nThanks for the patch !\n\nOn 02/03/2022 23:03, Daniel Scally wrote:\n> To describe in the kernel the connection between devices and their\n> supporting peripherals (for example, a camera sensor and the vcm\n> driving the focusing lens for it), add a new type of media link\n> to introduce the concept of these ancillary links.\n> \n> Add some elements to the uAPI documentation to explain the new link\n> type, their purpose and some aspects of their current implementation.\n> \n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> Signed-off-by: Daniel Scally <djrscally@gmail.com>\n\nReviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n> ---\n> \n> Changes since v1:\n> \n> \t- None\n> \n> changes since the rfc:\n> \n> \t- Split out into its own patch (mostly so it can be followed by patch\n> \t#3, which corrects some media-core code that is otherwise broken by the\n> \tnew links)\n> \n>   .../media/mediactl/media-controller-model.rst   |  6 ++++++\n>   .../media/mediactl/media-types.rst              | 17 ++++++++++++-----\n>   include/uapi/linux/media.h                      |  1 +\n>   3 files changed, 19 insertions(+), 5 deletions(-)\n> \n> diff --git a/Documentation/userspace-api/media/mediactl/media-controller-model.rst b/Documentation/userspace-api/media/mediactl/media-controller-model.rst\n> index 222cb99debb5..78bfdfb2a322 100644\n> --- a/Documentation/userspace-api/media/mediactl/media-controller-model.rst\n> +++ b/Documentation/userspace-api/media/mediactl/media-controller-model.rst\n> @@ -33,3 +33,9 @@ are:\n>   \n>   -  An **interface link** is a point-to-point bidirectional control\n>      connection between a Linux Kernel interface and an entity.\n> +\n> +- An **ancillary link** is a point-to-point connection denoting that two\n> +  entities form a single logical unit. For example this could represent the\n> +  fact that a particular camera sensor and lens controller form a single\n> +  physical module, meaning this lens controller drives the lens for this\n> +  camera sensor.\n> \\ No newline at end of file\n> diff --git a/Documentation/userspace-api/media/mediactl/media-types.rst b/Documentation/userspace-api/media/mediactl/media-types.rst\n> index 0a26397bd01d..60747251d409 100644\n> --- a/Documentation/userspace-api/media/mediactl/media-types.rst\n> +++ b/Documentation/userspace-api/media/mediactl/media-types.rst\n> @@ -412,14 +412,21 @@ must be set for every pad.\n>   \t  is set by drivers and is read-only for applications.\n>   \n>       *  -  ``MEDIA_LNK_FL_LINK_TYPE``\n> -       -  This is a bitmask that defines the type of the link. Currently,\n> -\t  two types of links are supported:\n> +       -  This is a bitmask that defines the type of the link. The following\n> +\t  link types are currently supported:\n>   \n>   \t  .. _MEDIA-LNK-FL-DATA-LINK:\n>   \n> -\t  ``MEDIA_LNK_FL_DATA_LINK`` if the link is between two pads\n> +\t  ``MEDIA_LNK_FL_DATA_LINK`` for links that represent a data connection\n> +     between two pads.\n>   \n>   \t  .. _MEDIA-LNK-FL-INTERFACE-LINK:\n>   \n> -\t  ``MEDIA_LNK_FL_INTERFACE_LINK`` if the link is between an\n> -\t  interface and an entity\n> +\t  ``MEDIA_LNK_FL_INTERFACE_LINK`` for links that associate an entity to its\n> +     interface.\n> +\n> +\t  .. _MEDIA-LNK-FL-ANCILLARY-LINK:\n> +\n> +\t  ``MEDIA_LNK_FL_ANCILLARY_LINK`` for links that represent a physical\n> +     relationship between two entities. The link may or may not be ummutable, so\n> +     applications must not assume either case.\n> \\ No newline at end of file\n> diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h\n> index 200fa8462b90..afbae7213d35 100644\n> --- a/include/uapi/linux/media.h\n> +++ b/include/uapi/linux/media.h\n> @@ -226,6 +226,7 @@ struct media_pad_desc {\n>   #define MEDIA_LNK_FL_LINK_TYPE\t\t\t(0xf << 28)\n>   #  define MEDIA_LNK_FL_DATA_LINK\t\t(0 << 28)\n>   #  define MEDIA_LNK_FL_INTERFACE_LINK\t\t(1 << 28)\n> +#  define MEDIA_LNK_FL_ANCILLARY_LINK\t\t(2 << 28)\n>   \n>   struct media_link_desc {\n>   \tstruct media_pad_desc source;","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 1CADBBE08A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  9 Mar 2022 15:43:27 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D8EDB61189;\n\tWed,  9 Mar 2022 16:43:26 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A5ED360475\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  9 Mar 2022 16:43:25 +0100 (CET)","from [IPV6:2a01:e0a:169:7140:3734:287e:1a7f:9772] (unknown\n\t[IPv6:2a01:e0a:169:7140:3734:287e:1a7f:9772])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 3E9D3A50;\n\tWed,  9 Mar 2022 16:43:25 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1646840606;\n\tbh=Q1L+ucFFLxSpIhuDgKsJrEze/YApLQx3juVU/fyWubI=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=vn2TZmyrM6Ynyc9dLkYBj+3NG8lFlLRYUUQ1haNcfe9zDMzF4OWa7rsTxji/8CQv5\n\tex3oS9l8UgmyjDhbds7naDiFLxbc8FEhEJQXcfle2QHmI4pSiNLgVzsCmSM77w3q02\n\tqF7KArPrL/RnV9shgKvNhv1krS79PLNMToaxSqOja7/uCwB9EV72KvgX8Ca186TiZs\n\trSHQYLFZxL39klSXUERWZ5rHqBJVPpcLEQ1eyb49WQbqa5Tex0GgCU8Q9ZhNcaMH4R\n\tQXhkvIodcBnortQVr5FC/CPyk8+s9MsUIUKCYV772nE5oWKEMi/iUrzoxiGXIJLIke\n\tvWOqzX4iaTp9A==","Message-ID":"<98056b10-32da-4a17-6235-ccb6101db2aa@gmail.com>","Date":"Wed, 9 Mar 2022 16:43:22 +0100","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101\n\tThunderbird/91.5.0","Content-Language":"en-US","To":"Daniel Scally <djrscally@gmail.com>, linux-media@vger.kernel.org,\n\tlibcamera-devel@lists.libcamera.org","References":"<20220302220304.1327896-1-djrscally@gmail.com>\n\t<20220302220304.1327896-3-djrscally@gmail.com>","In-Reply-To":"<20220302220304.1327896-3-djrscally@gmail.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH v3 2/5] media: media.h: Add new media\n\tlink type","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Jean-Michel Hautbois via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Jean-Michel Hautbois <jeanmichel.hautbois@gmail.com>","Cc":"sakari.ailus@linux.intel.com","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]