Patch Detail
Show a patch.
GET /api/patches/20183/?format=api
{ "id": 20183, "url": "https://patchwork.libcamera.org/api/patches/20183/?format=api", "web_url": "https://patchwork.libcamera.org/patch/20183/", "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": "<20240601220320.6484-3-laurent.pinchart@ideasonboard.com>", "date": "2024-06-01T22:03:19", "name": "[2/3] include: linux: Update kernel headers to version v6.10-rc1", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "47258c7eaa5421398310451b7d22391a25cff90d", "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/20183/mbox/", "series": [ { "id": 4349, "url": "https://patchwork.libcamera.org/api/series/4349/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4349", "date": "2024-06-01T22:03:17", "name": "libcamera: Update to the new upstream subdev routing API", "version": 1, "mbox": "https://patchwork.libcamera.org/series/4349/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/20183/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/20183/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 150B1C32C8\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 1 Jun 2024 22:03:42 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E75D7634D1;\n\tSun, 2 Jun 2024 00:03:40 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6A17B634C9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 2 Jun 2024 00:03:37 +0200 (CEST)", "from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 09E28ABD;\n\tSun, 2 Jun 2024 00:03:30 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Z4VIJqN/\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1717279411;\n\tbh=Ofmx85sXH0fM14gqCp/ZUCbrYXXh4F1qS00y2sOpnCw=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=Z4VIJqN/Pcj33i+Dd49RjrNE7hxWAKL8PaDgCyr2u4T5V+IHaeBfZghAEmK8X20KP\n\trsRkxhxD500z76nIBgjeh6hTdnAnqjF1viPfp8GDExoG3xywHuGygBMzTkpJkgJ6lt\n\t0NKhUEjHQmbPCs0JRBt3SVdqbWswsRsKrrCizT38=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tHans de Goede <hdegoede@redhat.com>", "Subject": "[PATCH 2/3] include: linux: Update kernel headers to version\n\tv6.10-rc1", "Date": "Sun, 2 Jun 2024 01:03:19 +0300", "Message-ID": "<20240601220320.6484-3-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.44.2", "In-Reply-To": "<20240601220320.6484-1-laurent.pinchart@ideasonboard.com>", "References": "<20240601220320.6484-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "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>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "From: Hans de Goede <hdegoede@redhat.com>\n\nUpdated kernel headers to v6.10-rc1 using utils/update-kernel-headers.sh\nand re-instating libcamera local modifications.\n\nThis includes adding include/linux/udmabuf.h which was not part\nof libcamera's include/linux headers before.\n\nSigned-off-by: Hans de Goede <hdegoede@redhat.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\nChanges since Hans' v2:\n\n- Reinstate intel-ipu3.h modifications from mainline\n---\n include/linux/README | 2 +-\n include/linux/drm_fourcc.h | 10 ++---\n include/linux/intel-ipu3.h | 3 --\n include/linux/media-bus-format.h | 9 ++++\n include/linux/rkisp1-config.h | 56 +++++++++++++------------\n include/linux/udmabuf.h | 33 +++++++++++++++\n include/linux/v4l2-controls.h | 6 +++\n include/linux/v4l2-mediabus.h | 18 +++++---\n include/linux/v4l2-subdev.h | 29 ++++++++++---\n include/linux/videodev2.h | 72 ++++++++++++++++++++++++--------\n 10 files changed, 172 insertions(+), 66 deletions(-)\n create mode 100644 include/linux/udmabuf.h", "diff": "diff --git a/include/linux/README b/include/linux/README\nindex 101e49970af2..b7795309a216 100644\n--- a/include/linux/README\n+++ b/include/linux/README\n@@ -1,4 +1,4 @@\n # SPDX-License-Identifier: CC0-1.0\n \n-Files in this directory are imported from v6.7 of the Linux kernel. Do not\n+Files in this directory are imported from v6.10-rc1 of the Linux kernel. Do not\n modify them manually.\ndiff --git a/include/linux/drm_fourcc.h b/include/linux/drm_fourcc.h\nindex b4e1a09271f5..d8e999400d85 100644\n--- a/include/linux/drm_fourcc.h\n+++ b/include/linux/drm_fourcc.h\n@@ -54,7 +54,7 @@ extern \"C\" {\n * Format modifiers may change any property of the buffer, including the number\n * of planes and/or the required allocation size. Format modifiers are\n * vendor-namespaced, and as such the relationship between a fourcc code and a\n- * modifier is specific to the modifer being used. For example, some modifiers\n+ * modifier is specific to the modifier being used. For example, some modifiers\n * may preserve meaning - such as number of planes - from the fourcc code,\n * whereas others may not.\n *\n@@ -79,7 +79,7 @@ extern \"C\" {\n * format.\n * - Higher-level programs interfacing with KMS/GBM/EGL/Vulkan/etc: these users\n * see modifiers as opaque tokens they can check for equality and intersect.\n- * These users musn't need to know to reason about the modifier value\n+ * These users mustn't need to know to reason about the modifier value\n * (i.e. they are not expected to extract information out of the modifier).\n *\n * Vendors should document their modifier usage in as much detail as\n@@ -610,7 +610,7 @@ extern \"C\" {\n * This is a tiled layout using 4Kb tiles in row-major layout.\n * Within the tile pixels are laid out in 16 256 byte units / sub-tiles which\n * are arranged in four groups (two wide, two high) with column-major layout.\n- * Each group therefore consits out of four 256 byte units, which are also laid\n+ * Each group therefore consists out of four 256 byte units, which are also laid\n * out as 2x2 column-major.\n * 256 byte units are made out of four 64 byte blocks of pixels, producing\n * either a square block or a 2:1 unit.\n@@ -1183,7 +1183,7 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)\n */\n \n /*\n- * The top 4 bits (out of the 56 bits alloted for specifying vendor specific\n+ * The top 4 bits (out of the 56 bits allotted for specifying vendor specific\n * modifiers) denote the category for modifiers. Currently we have three\n * categories of modifiers ie AFBC, MISC and AFRC. We can have a maximum of\n * sixteen different categories.\n@@ -1499,7 +1499,7 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)\n * Amlogic FBC Memory Saving mode\n *\n * Indicates the storage is packed when pixel size is multiple of word\n- * boudaries, i.e. 8bit should be stored in this mode to save allocation\n+ * boundaries, i.e. 8bit should be stored in this mode to save allocation\n * memory.\n *\n * This mode reduces body layout to 3072 bytes per 64x32 superblock with\ndiff --git a/include/linux/intel-ipu3.h b/include/linux/intel-ipu3.h\nindex bd771f1b4f6d..8c192f352e13 100644\n--- a/include/linux/intel-ipu3.h\n+++ b/include/linux/intel-ipu3.h\n@@ -2485,11 +2485,9 @@ struct ipu3_uapi_anr_config {\n *\t\t&ipu3_uapi_yuvp1_y_ee_nr_config\n * @yds:\ty down scaler config. See &ipu3_uapi_yuvp1_yds_config\n * @chnr:\tchroma noise reduction config. See &ipu3_uapi_yuvp1_chnr_config\n- * @reserved1: reserved\n * @yds2:\ty channel down scaler config. See &ipu3_uapi_yuvp1_yds_config\n * @tcc:\ttotal color correction config as defined in struct\n *\t\t&ipu3_uapi_yuvp2_tcc_static_config\n- * @reserved2: reserved\n * @anr:\tadvanced noise reduction config.See &ipu3_uapi_anr_config\n * @awb_fr:\tAWB filter response config. See ipu3_uapi_awb_fr_config\n * @ae:\tauto exposure config As specified by &ipu3_uapi_ae_config\n@@ -2724,7 +2722,6 @@ struct ipu3_uapi_obgrid_param {\n * @acc_ae: 0 = no update, 1 = update.\n * @acc_af: 0 = no update, 1 = update.\n * @acc_awb: 0 = no update, 1 = update.\n- * @__acc_osys: 0 = no update, 1 = update.\n * @reserved3: Not used.\n * @lin_vmem_params: 0 = no update, 1 = update.\n * @tnr3_vmem_params: 0 = no update, 1 = update.\ndiff --git a/include/linux/media-bus-format.h b/include/linux/media-bus-format.h\nindex f05f747e444d..d4c1d991014b 100644\n--- a/include/linux/media-bus-format.h\n+++ b/include/linux/media-bus-format.h\n@@ -174,4 +174,13 @@\n */\n #define MEDIA_BUS_FMT_METADATA_FIXED\t\t0x7001\n \n+/* Generic line based metadata formats for serial buses. Next is 0x8008. */\n+#define MEDIA_BUS_FMT_META_8\t\t\t0x8001\n+#define MEDIA_BUS_FMT_META_10\t\t\t0x8002\n+#define MEDIA_BUS_FMT_META_12\t\t\t0x8003\n+#define MEDIA_BUS_FMT_META_14\t\t\t0x8004\n+#define MEDIA_BUS_FMT_META_16\t\t\t0x8005\n+#define MEDIA_BUS_FMT_META_20\t\t\t0x8006\n+#define MEDIA_BUS_FMT_META_24\t\t\t0x8007\n+\n #endif /* __LINUX_MEDIA_BUS_FORMAT_H */\ndiff --git a/include/linux/rkisp1-config.h b/include/linux/rkisp1-config.h\nindex 2d1c448a6ab8..f87c6bd49a5b 100644\n--- a/include/linux/rkisp1-config.h\n+++ b/include/linux/rkisp1-config.h\n@@ -4,8 +4,8 @@\n * Copyright (C) 2017 Rockchip Electronics Co., Ltd.\n */\n \n-#ifndef _UAPI_RKISP1_CONFIG_H\n-#define _UAPI_RKISP1_CONFIG_H\n+#ifndef _RKISP1_CONFIG_H\n+#define _RKISP1_CONFIG_H\n \n #include <linux/types.h>\n \n@@ -175,11 +175,14 @@\n /**\n * enum rkisp1_cif_isp_version - ISP variants\n *\n- * @RKISP1_V10: used at least in rk3288 and rk3399\n- * @RKISP1_V11: declared in the original vendor code, but not used\n- * @RKISP1_V12: used at least in rk3326 and px30\n- * @RKISP1_V13: used at least in rk1808\n- * @RKISP1_V_IMX8MP: used in at least imx8mp\n+ * @RKISP1_V10: Used at least in RK3288 and RK3399.\n+ * @RKISP1_V11: Declared in the original vendor code, but not used. Same number\n+ *\tof entries in grids and histogram as v10.\n+ * @RKISP1_V12: Used at least in RK3326 and PX30.\n+ * @RKISP1_V13: Used at least in RK1808. Same number of entries in grids and\n+ *\thistogram as v12.\n+ * @RKISP1_V_IMX8MP: Used in at least i.MX8MP. Same number of entries in grids\n+ *\tand histogram as v10.\n */\n enum rkisp1_cif_isp_version {\n \tRKISP1_V10 = 10,\n@@ -586,10 +589,9 @@ enum rkisp1_cif_isp_goc_mode {\n * as is reported by the hw_revision field of the struct media_device_info\n * that is returned by ioctl MEDIA_IOC_DEVICE_INFO.\n *\n- * Versions <= V11 have RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V10\n- * entries, versions >= V12 have RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V12\n- * entries. RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES is equal to the maximum\n- * of the two.\n+ * V10 has RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V10 entries, V12 has\n+ * RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V12 entries.\n+ * RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES is equal to the maximum of the two.\n */\n struct rkisp1_cif_isp_goc_config {\n \t__u32 mode;\n@@ -609,10 +611,10 @@ struct rkisp1_cif_isp_goc_config {\n * as is reported by the hw_revision field of the struct media_device_info\n * that is returned by ioctl MEDIA_IOC_DEVICE_INFO.\n *\n- * Versions <= V11 have RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V10\n- * entries, versions >= V12 have RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V12\n- * entries. RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE is equal to the maximum\n- * of the two.\n+ * V10 has RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V10 entries, V12 has\n+ * RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V12 entries.\n+ * RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE is equal to the maximum of the\n+ * two.\n */\n struct rkisp1_cif_isp_hst_config {\n \t__u32 mode;\n@@ -904,9 +906,9 @@ struct rkisp1_cif_isp_bls_meas_val {\n * as is reported by the hw_revision field of the struct media_device_info\n * that is returned by ioctl MEDIA_IOC_DEVICE_INFO.\n *\n- * Versions <= V11 have RKISP1_CIF_ISP_AE_MEAN_MAX_V10 entries,\n- * versions >= V12 have RKISP1_CIF_ISP_AE_MEAN_MAX_V12 entries.\n- * RKISP1_CIF_ISP_AE_MEAN_MAX is equal to the maximum of the two.\n+ * V10 has RKISP1_CIF_ISP_AE_MEAN_MAX_V10 entries, V12 has\n+ * RKISP1_CIF_ISP_AE_MEAN_MAX_V12 entries. RKISP1_CIF_ISP_AE_MEAN_MAX is equal\n+ * to the maximum of the two.\n *\n * Image is divided into 5x5 blocks on V10 and 9x9 blocks on V12.\n */\n@@ -946,21 +948,21 @@ struct rkisp1_cif_isp_af_stat {\n *\t integer part.\n *\n * The window of the measurements area is divided to 5x5 sub-windows for\n- * V10/V11 and to 9x9 sub-windows for V12. The histogram is then computed for\n- * each sub-window independently and the final result is a weighted average of\n- * the histogram measurements on all sub-windows. The window of the\n- * measurements area and the weight of each sub-window are configurable using\n+ * V10 and to 9x9 sub-windows for V12. The histogram is then computed for each\n+ * sub-window independently and the final result is a weighted average of the\n+ * histogram measurements on all sub-windows. The window of the measurements\n+ * area and the weight of each sub-window are configurable using\n * struct @rkisp1_cif_isp_hst_config.\n *\n- * The histogram contains 16 bins in V10/V11 and 32 bins in V12/V13.\n+ * The histogram contains 16 bins in V10 and 32 bins in V12.\n *\n * The number of entries of @hist_bins depends on the hardware revision\n * as is reported by the hw_revision field of the struct media_device_info\n * that is returned by ioctl MEDIA_IOC_DEVICE_INFO.\n *\n- * Versions <= V11 have RKISP1_CIF_ISP_HIST_BIN_N_MAX_V10 entries,\n- * versions >= V12 have RKISP1_CIF_ISP_HIST_BIN_N_MAX_V12 entries.\n- * RKISP1_CIF_ISP_HIST_BIN_N_MAX is equal to the maximum of the two.\n+ * V10 has RKISP1_CIF_ISP_HIST_BIN_N_MAX_V10 entries, V12 has\n+ * RKISP1_CIF_ISP_HIST_BIN_N_MAX_V12 entries. RKISP1_CIF_ISP_HIST_BIN_N_MAX is\n+ * equal to the maximum of the two.\n */\n struct rkisp1_cif_isp_hist_stat {\n \t__u32 hist_bins[RKISP1_CIF_ISP_HIST_BIN_N_MAX];\n@@ -994,4 +996,4 @@ struct rkisp1_stat_buffer {\n \tstruct rkisp1_cif_isp_stat params;\n };\n \n-#endif /* _UAPI_RKISP1_CONFIG_H */\n+#endif /* _RKISP1_CONFIG_H */\ndiff --git a/include/linux/udmabuf.h b/include/linux/udmabuf.h\nnew file mode 100644\nindex 000000000000..76cc7de93012\n--- /dev/null\n+++ b/include/linux/udmabuf.h\n@@ -0,0 +1,33 @@\n+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */\n+#ifndef _LINUX_UDMABUF_H\n+#define _LINUX_UDMABUF_H\n+\n+#include <linux/types.h>\n+#include <linux/ioctl.h>\n+\n+#define UDMABUF_FLAGS_CLOEXEC\t0x01\n+\n+struct udmabuf_create {\n+\t__u32 memfd;\n+\t__u32 flags;\n+\t__u64 offset;\n+\t__u64 size;\n+};\n+\n+struct udmabuf_create_item {\n+\t__u32 memfd;\n+\t__u32 __pad;\n+\t__u64 offset;\n+\t__u64 size;\n+};\n+\n+struct udmabuf_create_list {\n+\t__u32 flags;\n+\t__u32 count;\n+\tstruct udmabuf_create_item list[];\n+};\n+\n+#define UDMABUF_CREATE _IOW('u', 0x42, struct udmabuf_create)\n+#define UDMABUF_CREATE_LIST _IOW('u', 0x43, struct udmabuf_create_list)\n+\n+#endif /* _LINUX_UDMABUF_H */\ndiff --git a/include/linux/v4l2-controls.h b/include/linux/v4l2-controls.h\nindex b9f6481092c7..1e6e816b34b4 100644\n--- a/include/linux/v4l2-controls.h\n+++ b/include/linux/v4l2-controls.h\n@@ -211,6 +211,12 @@ enum v4l2_colorfx {\n */\n #define V4L2_CID_USER_NPCM_BASE\t\t\t(V4L2_CID_USER_BASE + 0x11b0)\n \n+/*\n+ * The base for THine THP7312 driver controls.\n+ * We reserve 32 controls for this driver.\n+ */\n+#define V4L2_CID_USER_THP7312_BASE\t\t(V4L2_CID_USER_BASE + 0x11c0)\n+\n /* MPEG-class control IDs */\n /* The MPEG controls are applicable to all codec controls\n * and the 'MPEG' part of the define is historical */\ndiff --git a/include/linux/v4l2-mediabus.h b/include/linux/v4l2-mediabus.h\nindex 2c318de10485..097ef73924f8 100644\n--- a/include/linux/v4l2-mediabus.h\n+++ b/include/linux/v4l2-mediabus.h\n@@ -19,12 +19,18 @@\n * @width:\timage width\n * @height:\timage height\n * @code:\tdata format code (from enum v4l2_mbus_pixelcode)\n- * @field:\tused interlacing type (from enum v4l2_field)\n- * @colorspace:\tcolorspace of the data (from enum v4l2_colorspace)\n- * @ycbcr_enc:\tYCbCr encoding of the data (from enum v4l2_ycbcr_encoding)\n- * @hsv_enc:\tHSV encoding of the data (from enum v4l2_hsv_encoding)\n- * @quantization: quantization of the data (from enum v4l2_quantization)\n- * @xfer_func: transfer function of the data (from enum v4l2_xfer_func)\n+ * @field:\tused interlacing type (from enum v4l2_field), zero for metadata\n+ *\t\tmbus codes\n+ * @colorspace:\tcolorspace of the data (from enum v4l2_colorspace), zero on\n+ *\t\tmetadata mbus codes\n+ * @ycbcr_enc:\tYCbCr encoding of the data (from enum v4l2_ycbcr_encoding), zero\n+ *\t\tfor metadata mbus codes\n+ * @hsv_enc:\tHSV encoding of the data (from enum v4l2_hsv_encoding), zero for\n+ *\t\tmetadata mbus codes\n+ * @quantization: quantization of the data (from enum v4l2_quantization), zero\n+ *\t\tfor metadata mbus codes\n+ * @xfer_func: transfer function of the data (from enum v4l2_xfer_func), zero\n+ *\t\tfor metadata mbus codes\n * @flags:\tflags (V4L2_MBUS_FRAMEFMT_*)\n * @reserved: reserved bytes that can be later used\n */\ndiff --git a/include/linux/v4l2-subdev.h b/include/linux/v4l2-subdev.h\nindex b383c2fe0cf3..2347e266cf75 100644\n--- a/include/linux/v4l2-subdev.h\n+++ b/include/linux/v4l2-subdev.h\n@@ -50,6 +50,10 @@ struct v4l2_subdev_format {\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+ * The subdev crop API is an obsolete interface and may be removed in the\n+ * future. It is superseded by the selection API. No new extensions to this\n+ * structure will be accepted.\n */\n struct v4l2_subdev_crop {\n \t__u32 which;\n@@ -116,13 +120,15 @@ struct v4l2_subdev_frame_size_enum {\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+ * @which: interval type (from enum v4l2_subdev_format_whence)\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 stream;\n-\t__u32 reserved[8];\n+\t__u32 which;\n+\t__u32 reserved[7];\n };\n \n /**\n@@ -133,7 +139,7 @@ struct v4l2_subdev_frame_interval {\n * @width: frame width in pixels\n * @height: frame height in pixels\n * @interval: frame interval in seconds\n- * @which: format type (from enum v4l2_subdev_format_whence)\n+ * @which: interval 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@@ -222,15 +228,19 @@ struct v4l2_subdev_route {\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+ * @len_routes: the length of the routes array, in routes; set by the user, not\n+ *\t\tmodified by the kernel\n * @routes: pointer to the routes array\n+ * @num_routes: the total number of routes, possibly more than fits in the\n+ *\t\troutes 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__u32 len_routes;\n \t__u64 routes;\n-\t__u32 reserved[6];\n+\t__u32 num_routes;\n+\t__u32 reserved[11];\n };\n \n /*\n@@ -239,7 +249,14 @@ struct v4l2_subdev_routing {\n * set (which is the default), the 'stream' fields will be forced to 0 by the\n * kernel.\n */\n- #define V4L2_SUBDEV_CLIENT_CAP_STREAMS\t\t(1ULL << 0)\n+#define V4L2_SUBDEV_CLIENT_CAP_STREAMS\t\t\t(1ULL << 0)\n+\n+/*\n+ * The client is aware of the struct v4l2_subdev_frame_interval which field. If\n+ * this is not set (which is the default), the which field is forced to\n+ * V4L2_SUBDEV_FORMAT_ACTIVE by the kernel.\n+ */\n+#define V4L2_SUBDEV_CLIENT_CAP_INTERVAL_USES_WHICH\t(1ULL << 1)\n \n /**\n * struct v4l2_subdev_client_capability - Capabilities of the client accessing\ndiff --git a/include/linux/videodev2.h b/include/linux/videodev2.h\nindex 0b5482a07ae4..7fe522e85249 100644\n--- a/include/linux/videodev2.h\n+++ b/include/linux/videodev2.h\n@@ -574,6 +574,8 @@ struct v4l2_pix_format {\n #define V4L2_PIX_FMT_Y10BPACK v4l2_fourcc('Y', '1', '0', 'B') /* 10 Greyscale bit-packed */\n #define V4L2_PIX_FMT_Y10P v4l2_fourcc('Y', '1', '0', 'P') /* 10 Greyscale, MIPI RAW10 packed */\n #define V4L2_PIX_FMT_IPU3_Y10\t\tv4l2_fourcc('i', 'p', '3', 'y') /* IPU3 packed 10-bit greyscale */\n+#define V4L2_PIX_FMT_Y12P v4l2_fourcc('Y', '1', '2', 'P') /* 12 Greyscale, MIPI RAW12 packed */\n+#define V4L2_PIX_FMT_Y14P v4l2_fourcc('Y', '1', '4', 'P') /* 14 Greyscale, MIPI RAW14 packed */\n \n /* Palette formats */\n #define V4L2_PIX_FMT_PAL8 v4l2_fourcc('P', 'A', 'L', '8') /* 8 8-bit palette */\n@@ -867,6 +869,7 @@ struct v4l2_fmtdesc {\n #define V4L2_FMT_FLAG_CSC_YCBCR_ENC\t\t0x0080\n #define V4L2_FMT_FLAG_CSC_HSV_ENC\t\tV4L2_FMT_FLAG_CSC_YCBCR_ENC\n #define V4L2_FMT_FLAG_CSC_QUANTIZATION\t\t0x0100\n+#define V4L2_FMT_FLAG_META_LINE_BASED\t\t0x0200\n \n \t/* Frame Size and frame rate enumeration */\n /*\n@@ -1016,18 +1019,20 @@ struct v4l2_requestbuffers {\n #define V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS\t\t(1 << 4)\n #define V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF\t(1 << 5)\n #define V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS\t\t(1 << 6)\n+#define V4L2_BUF_CAP_SUPPORTS_MAX_NUM_BUFFERS\t\t(1 << 7)\n+#define V4L2_BUF_CAP_SUPPORTS_REMOVE_BUFS\t\t(1 << 8)\n \n /**\n * struct v4l2_plane - plane info for multi-planar buffers\n * @bytesused:\t\tnumber of bytes occupied by data in the plane (payload)\n * @length:\t\tsize of this plane (NOT the payload) in bytes\n- * @mem_offset:\t\twhen memory in the associated struct v4l2_buffer is\n+ * @m.mem_offset:\twhen memory in the associated struct v4l2_buffer is\n *\t\t\tV4L2_MEMORY_MMAP, equals the offset from the start of\n *\t\t\tthe device memory for this plane (or is a \"cookie\" that\n *\t\t\tshould be passed to mmap() called on the video node)\n- * @userptr:\t\twhen memory is V4L2_MEMORY_USERPTR, a userspace pointer\n+ * @m.userptr:\t\twhen memory is V4L2_MEMORY_USERPTR, a userspace pointer\n *\t\t\tpointing to this plane\n- * @fd:\t\t\twhen memory is V4L2_MEMORY_DMABUF, a userspace file\n+ * @m.fd:\t\twhen memory is V4L2_MEMORY_DMABUF, a userspace file\n *\t\t\tdescriptor associated with this plane\n * @m:\t\t\tunion of @mem_offset, @userptr and @fd\n * @data_offset:\toffset in the plane to the start of data; usually 0,\n@@ -1065,14 +1070,14 @@ struct v4l2_plane {\n * @sequence:\tsequence count of this frame\n * @memory:\tenum v4l2_memory; the method, in which the actual video data is\n *\t\tpassed\n- * @offset:\tfor non-multiplanar buffers with memory == V4L2_MEMORY_MMAP;\n+ * @m.offset:\tfor non-multiplanar buffers with memory == V4L2_MEMORY_MMAP;\n *\t\toffset from the start of the device memory for this plane,\n *\t\t(or a \"cookie\" that should be passed to mmap() as offset)\n- * @userptr:\tfor non-multiplanar buffers with memory == V4L2_MEMORY_USERPTR;\n+ * @m.userptr:\tfor non-multiplanar buffers with memory == V4L2_MEMORY_USERPTR;\n *\t\ta userspace pointer pointing to this buffer\n- * @fd:\t\tfor non-multiplanar buffers with memory == V4L2_MEMORY_DMABUF;\n+ * @m.fd:\t\tfor non-multiplanar buffers with memory == V4L2_MEMORY_DMABUF;\n *\t\ta userspace file descriptor associated with this buffer\n- * @planes:\tfor multiplanar buffers; userspace pointer to the array of plane\n+ * @m.planes:\tfor multiplanar buffers; userspace pointer to the array of plane\n *\t\tinfo structs for this buffer\n * @m:\t\tunion of @offset, @userptr, @planes and @fd\n * @length:\tsize in bytes of the buffer (NOT its payload) for single-plane\n@@ -1810,8 +1815,10 @@ struct v4l2_ext_control {\n \t\tstruct v4l2_ctrl_av1_tile_group_entry *p_av1_tile_group_entry;\n \t\tstruct v4l2_ctrl_av1_frame *p_av1_frame;\n \t\tstruct v4l2_ctrl_av1_film_grain *p_av1_film_grain;\n+\t\tstruct v4l2_ctrl_hdr10_cll_info *p_hdr10_cll_info;\n+\t\tstruct v4l2_ctrl_hdr10_mastering_display *p_hdr10_mastering_display;\n \t\tvoid *ptr;\n-\t};\n+\t} __attribute__ ((packed));\n } __attribute__ ((packed));\n \n struct v4l2_ext_controls {\n@@ -2381,23 +2388,32 @@ struct v4l2_sdr_format {\n * struct v4l2_meta_format - metadata format definition\n * @dataformat:\t\tlittle endian four character code (fourcc)\n * @buffersize:\t\tmaximum size in bytes required for data\n+ * @width:\t\tnumber of data units of data per line (valid for line\n+ *\t\t\tbased formats only, see format documentation)\n+ * @height:\t\tnumber of lines of data per buffer (valid for line based\n+ *\t\t\tformats only)\n+ * @bytesperline:\toffset between the beginnings of two adjacent lines in\n+ *\t\t\tbytes (valid for line based formats only)\n */\n struct v4l2_meta_format {\n \t__u32\t\t\t\tdataformat;\n \t__u32\t\t\t\tbuffersize;\n+\t__u32\t\t\t\twidth;\n+\t__u32\t\t\t\theight;\n+\t__u32\t\t\t\tbytesperline;\n } __attribute__ ((packed));\n \n /**\n * struct v4l2_format - stream data format\n- * @type:\tenum v4l2_buf_type; type of the data stream\n- * @pix:\tdefinition of an image format\n- * @pix_mp:\tdefinition of a multiplanar image format\n- * @win:\tdefinition of an overlaid image\n- * @vbi:\traw VBI capture or output parameters\n- * @sliced:\tsliced VBI capture or output parameters\n- * @raw_data:\tplaceholder for future extensions and custom formats\n- * @fmt:\tunion of @pix, @pix_mp, @win, @vbi, @sliced, @sdr, @meta\n- *\t\tand @raw_data\n+ * @type:\t\tenum v4l2_buf_type; type of the data stream\n+ * @fmt.pix:\t\tdefinition of an image format\n+ * @fmt.pix_mp:\t\tdefinition of a multiplanar image format\n+ * @fmt.win:\t\tdefinition of an overlaid image\n+ * @fmt.vbi:\t\traw VBI capture or output parameters\n+ * @fmt.sliced:\t\tsliced VBI capture or output parameters\n+ * @fmt.raw_data:\tplaceholder for future extensions and custom formats\n+ * @fmt:\t\tunion of @pix, @pix_mp, @win, @vbi, @sliced, @sdr,\n+ *\t\t\t@meta and @raw_data\n */\n struct v4l2_format {\n \t__u32\t type;\n@@ -2570,6 +2586,9 @@ struct v4l2_dbg_chip_info {\n * @flags:\tadditional buffer management attributes (ignored unless the\n *\t\tqueue has V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS capability\n *\t\tand configured for MMAP streaming I/O).\n+ * @max_num_buffers: if V4L2_BUF_CAP_SUPPORTS_MAX_NUM_BUFFERS capability flag is set\n+ *\t\tthis field indicate the maximum possible number of buffers\n+ *\t\tfor this queue.\n * @reserved:\tfuture extensions\n */\n struct v4l2_create_buffers {\n@@ -2579,7 +2598,22 @@ struct v4l2_create_buffers {\n \tstruct v4l2_format\tformat;\n \t__u32\t\t\tcapabilities;\n \t__u32\t\t\tflags;\n-\t__u32\t\t\treserved[6];\n+\t__u32\t\t\tmax_num_buffers;\n+\t__u32\t\t\treserved[5];\n+};\n+\n+/**\n+ * struct v4l2_remove_buffers - VIDIOC_REMOVE_BUFS argument\n+ * @index:\tthe first buffer to be removed\n+ * @count:\tnumber of buffers to removed\n+ * @type:\tenum v4l2_buf_type\n+ * @reserved:\tfuture extensions\n+ */\n+struct v4l2_remove_buffers {\n+\t__u32\t\t\tindex;\n+\t__u32\t\t\tcount;\n+\t__u32\t\t\ttype;\n+\t__u32\t\t\treserved[13];\n };\n \n /*\n@@ -2681,6 +2715,8 @@ struct v4l2_create_buffers {\n #define VIDIOC_DBG_G_CHIP_INFO _IOWR('V', 102, struct v4l2_dbg_chip_info)\n \n #define VIDIOC_QUERY_EXT_CTRL\t_IOWR('V', 103, struct v4l2_query_ext_ctrl)\n+#define VIDIOC_REMOVE_BUFS\t_IOWR('V', 104, struct v4l2_remove_buffers)\n+\n \n /* Reminder: when adding new ioctls please add support for them to\n drivers/media/v4l2-core/v4l2-compat-ioctl32.c as well! */\n", "prefixes": [ "2/3" ] }