Patch Detail
Show a patch.
GET /api/patches/16882/?format=api
{ "id": 16882, "url": "https://patchwork.libcamera.org/api/patches/16882/?format=api", "web_url": "https://patchwork.libcamera.org/patch/16882/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20220801000543.3501-6-laurent.pinchart@ideasonboard.com>", "date": "2022-08-01T00:05:35", "name": "[libcamera-devel,05/13] include: linux: Add V4L2 subdev internal routing API", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "e6446e96febda41f63b350ff34430b4eaa96bc8d", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/16882/mbox/", "series": [ { "id": 3352, "url": "https://patchwork.libcamera.org/api/series/3352/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3352", "date": "2022-08-01T00:05:30", "name": "libcamera: pipeline: simple: Support the NXP i.MX8 ISI", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3352/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/16882/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/16882/checks/", "tags": {}, "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 02AA3BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 1 Aug 2022 00:05:59 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BC0766331E;\n\tMon, 1 Aug 2022 02:05:58 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 791DA63312\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 1 Aug 2022 02:05:56 +0200 (CEST)", "from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 1153230B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 1 Aug 2022 02:05:56 +0200 (CEST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1659312358;\n\tbh=IGc/r+0m2qkga4aLF205TJHij866JPZL/DlKApFCUpo=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=BLdLYet47eWXWAZVCasGdWxXwM3Coz0B1mQBxHCug8+mJy3gO9ebxWMUQ8ZKuFljg\n\th3vAz/ve+khelLML0IZ4SFmZN+AnMEil7Ufw1Hk+GyHneXFocm0SaaYP0s3AXas9Og\n\tpuv1Masqx/+xVjn1bwCP/PPhqCQ+RvF1Kt6AzLV/4/iZJANdttFhQlIrTeK9bvtiR7\n\tr/VWNjoUr2luL4ZrZDSPVwTki+3x2/WAeTCOeLeEMYYdkLMRpRkn8pVH2bpJmOhqeu\n\tGjMkzOms+xIq7iH7FtcV20VHdJPxbfyA3nsdh6uvH/wddJDuC3fC0aK3cntFvUR0jZ\n\tBfK1BDrpFAdaA==", "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1659312356;\n\tbh=IGc/r+0m2qkga4aLF205TJHij866JPZL/DlKApFCUpo=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=Q9v/i1h9AmE0om4hTlLaqdzrH7K62HgoKrfxpWHYcppFmvX71V4PMuPtvlU8euom9\n\tZBASm8sUaOsetI0cKQbjdbjD1M1tp/uMh2f7obWdxG0rZdudWifZhCGYzL47BRa4vm\n\tpmWUX0EpGq/RCBypepRHwkxThyzJVCUMg3Ow2rac=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"Q9v/i1h9\"; dkim-atps=neutral", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 1 Aug 2022 03:05:35 +0300", "Message-Id": "<20220801000543.3501-6-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.35.1", "In-Reply-To": "<20220801000543.3501-1-laurent.pinchart@ideasonboard.com>", "References": "<20220801000543.3501-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 05/13] include: linux: Add V4L2 subdev\n\tinternal routing API", "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": "Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "The V4L2 subdev internal routing API is under development. Add it\nmanually to the v4l2-subdev.h kernel header for now.\n\nThe code corresponds to the \"[PATCH v11 00/36] v4l: routing and streams\nsupport\" series as posted to the linux-media mailing list.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n include/linux/v4l2-subdev.h | 88 ++++++++++++++++++++++++++++++++++---\n 1 file changed, 81 insertions(+), 7 deletions(-)", "diff": "diff --git a/include/linux/v4l2-subdev.h b/include/linux/v4l2-subdev.h\nindex 658106f5b5dc..480891dba193 100644\n--- a/include/linux/v4l2-subdev.h\n+++ b/include/linux/v4l2-subdev.h\n@@ -44,13 +44,15 @@ enum v4l2_subdev_format_whence {\n * @which: format type (from enum v4l2_subdev_format_whence)\n * @pad: pad number, as reported by the media API\n * @format: media bus format (format code and frame size)\n+ * @stream: stream number, defined in subdev routing\n * @reserved: drivers and applications must zero this array\n */\n struct v4l2_subdev_format {\n \t__u32 which;\n \t__u32 pad;\n \tstruct v4l2_mbus_framefmt format;\n-\t__u32 reserved[8];\n+\t__u32 stream;\n+\t__u32 reserved[7];\n };\n \n /**\n@@ -58,13 +60,15 @@ struct v4l2_subdev_format {\n * @which: format type (from enum v4l2_subdev_format_whence)\n * @pad: pad number, as reported by the media API\n * @rect: pad crop rectangle boundaries\n+ * @stream: stream number, defined in subdev routing\n * @reserved: drivers and applications must zero this array\n */\n struct v4l2_subdev_crop {\n \t__u32 which;\n \t__u32 pad;\n \tstruct v4l2_rect rect;\n-\t__u32 reserved[8];\n+\t__u32 stream;\n+\t__u32 reserved[7];\n };\n \n #define V4L2_SUBDEV_MBUS_CODE_CSC_COLORSPACE\t0x00000001\n@@ -80,6 +84,7 @@ struct v4l2_subdev_crop {\n * @code: format code (MEDIA_BUS_FMT_ definitions)\n * @which: format type (from enum v4l2_subdev_format_whence)\n * @flags: flags set by the driver, (V4L2_SUBDEV_MBUS_CODE_*)\n+ * @stream: stream number, defined in subdev routing\n * @reserved: drivers and applications must zero this array\n */\n struct v4l2_subdev_mbus_code_enum {\n@@ -88,7 +93,8 @@ struct v4l2_subdev_mbus_code_enum {\n \t__u32 code;\n \t__u32 which;\n \t__u32 flags;\n-\t__u32 reserved[7];\n+\t__u32 stream;\n+\t__u32 reserved[6];\n };\n \n /**\n@@ -101,6 +107,7 @@ struct v4l2_subdev_mbus_code_enum {\n * @min_height: minimum frame height, in pixels\n * @max_height: maximum frame height, in pixels\n * @which: format type (from enum v4l2_subdev_format_whence)\n+ * @stream: stream number, defined in subdev routing\n * @reserved: drivers and applications must zero this array\n */\n struct v4l2_subdev_frame_size_enum {\n@@ -112,19 +119,22 @@ struct v4l2_subdev_frame_size_enum {\n \t__u32 min_height;\n \t__u32 max_height;\n \t__u32 which;\n-\t__u32 reserved[8];\n+\t__u32 stream;\n+\t__u32 reserved[7];\n };\n \n /**\n * struct v4l2_subdev_frame_interval - Pad-level frame rate\n * @pad: pad number, as reported by the media API\n * @interval: frame interval in seconds\n+ * @stream: stream number, defined in subdev routing\n * @reserved: drivers and applications must zero this array\n */\n struct v4l2_subdev_frame_interval {\n \t__u32 pad;\n \tstruct v4l2_fract interval;\n-\t__u32 reserved[9];\n+\t__u32 stream;\n+\t__u32 reserved[8];\n };\n \n /**\n@@ -136,6 +146,7 @@ struct v4l2_subdev_frame_interval {\n * @height: frame height in pixels\n * @interval: frame interval in seconds\n * @which: format type (from enum v4l2_subdev_format_whence)\n+ * @stream: stream number, defined in subdev routing\n * @reserved: drivers and applications must zero this array\n */\n struct v4l2_subdev_frame_interval_enum {\n@@ -146,7 +157,8 @@ struct v4l2_subdev_frame_interval_enum {\n \t__u32 height;\n \tstruct v4l2_fract interval;\n \t__u32 which;\n-\t__u32 reserved[8];\n+\t__u32 stream;\n+\t__u32 reserved[7];\n };\n \n /**\n@@ -158,6 +170,7 @@ struct v4l2_subdev_frame_interval_enum {\n *\t defined in v4l2-common.h; V4L2_SEL_TGT_* .\n * @flags: constraint flags, defined in v4l2-common.h; V4L2_SEL_FLAG_*.\n * @r: coordinates of the selection window\n+ * @stream: stream number, defined in subdev routing\n * @reserved: for future use, set to zero for now\n *\n * Hardware may use multiple helper windows to process a video stream.\n@@ -170,7 +183,8 @@ struct v4l2_subdev_selection {\n \t__u32 target;\n \t__u32 flags;\n \tstruct v4l2_rect r;\n-\t__u32 reserved[8];\n+\t__u32 stream;\n+\t__u32 reserved[7];\n };\n \n /**\n@@ -188,6 +202,64 @@ struct v4l2_subdev_capability {\n /* The v4l2 sub-device video device node is registered in read-only mode. */\n #define V4L2_SUBDEV_CAP_RO_SUBDEV\t\t0x00000001\n \n+/* The v4l2 sub-device supports multiplexed streams. */\n+#define V4L2_SUBDEV_CAP_MPLEXED\t\t\t0x00000002\n+\n+/*\n+ * Is the route active? An active route will start when streaming is enabled\n+ * on a video node.\n+ */\n+#define V4L2_SUBDEV_ROUTE_FL_ACTIVE\t\t_BITUL(0)\n+\n+/*\n+ * Is the route immutable, i.e. can it be activated and inactivated?\n+ * Set by the driver.\n+ */\n+#define V4L2_SUBDEV_ROUTE_FL_IMMUTABLE\t\t_BITUL(1)\n+\n+/*\n+ * Is the route a source endpoint? A source endpoint route refers to a stream\n+ * generated internally by the subdevice (usually a sensor), and thus there\n+ * is no sink-side endpoint for the route. The sink_pad and sink_stream\n+ * fields are unused.\n+ * Set by the driver.\n+ */\n+#define V4L2_SUBDEV_ROUTE_FL_SOURCE\t\t_BITUL(2)\n+\n+/**\n+ * struct v4l2_subdev_route - A route inside a subdev\n+ *\n+ * @sink_pad: the sink pad index\n+ * @sink_stream: the sink stream identifier\n+ * @source_pad: the source pad index\n+ * @source_stream: the source stream identifier\n+ * @flags: route flags V4L2_SUBDEV_ROUTE_FL_*\n+ * @reserved: drivers and applications must zero this array\n+ */\n+struct v4l2_subdev_route {\n+\t__u32 sink_pad;\n+\t__u32 sink_stream;\n+\t__u32 source_pad;\n+\t__u32 source_stream;\n+\t__u32 flags;\n+\t__u32 reserved[5];\n+};\n+\n+/**\n+ * struct v4l2_subdev_routing - Subdev routing information\n+ *\n+ * @which: configuration type (from enum v4l2_subdev_format_whence)\n+ * @num_routes: the total number of routes in the routes array\n+ * @routes: pointer to the routes array\n+ * @reserved: drivers and applications must zero this array\n+ */\n+struct v4l2_subdev_routing {\n+\t__u32 which;\n+\t__u32 num_routes;\n+\t__u64 routes;\n+\t__u32 reserved[6];\n+};\n+\n /* Backwards compatibility define --- to be removed */\n #define v4l2_subdev_edid v4l2_edid\n \n@@ -203,6 +275,8 @@ struct v4l2_subdev_capability {\n #define VIDIOC_SUBDEV_S_CROP\t\t\t_IOWR('V', 60, struct v4l2_subdev_crop)\n #define VIDIOC_SUBDEV_G_SELECTION\t\t_IOWR('V', 61, struct v4l2_subdev_selection)\n #define VIDIOC_SUBDEV_S_SELECTION\t\t_IOWR('V', 62, struct v4l2_subdev_selection)\n+#define VIDIOC_SUBDEV_G_ROUTING\t\t\t_IOWR('V', 38, struct v4l2_subdev_routing)\n+#define VIDIOC_SUBDEV_S_ROUTING\t\t\t_IOWR('V', 39, struct v4l2_subdev_routing)\n /* The following ioctls are identical to the ioctls in videodev2.h */\n #define VIDIOC_SUBDEV_G_STD\t\t\t_IOR('V', 23, v4l2_std_id)\n #define VIDIOC_SUBDEV_S_STD\t\t\t_IOW('V', 24, v4l2_std_id)\n", "prefixes": [ "libcamera-devel", "05/13" ] }