{"id":22462,"url":"https://patchwork.libcamera.org/api/1.1/patches/22462/?format=json","web_url":"https://patchwork.libcamera.org/patch/22462/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20250108104924.163077-3-jacopo.mondi@ideasonboard.com>","date":"2025-01-08T10:49:19","name":"[v3,2/6] include: linux: videodev2: Add generic line based pixel formats","commit_ref":"57d13c2c63a54f6f822d51abe7998ed15088d1d9","pull_url":null,"state":"accepted","archived":false,"hash":"75012f4c7b03e1b2a6013c4cae74792a1332ed9e","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/1.1/people/143/?format=json","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/22462/mbox/","series":[{"id":4933,"url":"https://patchwork.libcamera.org/api/1.1/series/4933/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4933","date":"2025-01-08T10:49:17","name":"libcamera: Initial support for generic line based metadata","version":3,"mbox":"https://patchwork.libcamera.org/series/4933/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/22462/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/22462/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 A0BB5C32EF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  8 Jan 2025 10:49:43 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 51EBC684D6;\n\tWed,  8 Jan 2025 11:49:43 +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 26AF061891\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  8 Jan 2025 11:49:37 +0100 (CET)","from ideasonboard.com (mob-5-90-140-184.net.vodafone.it\n\t[5.90.140.184])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 0D3ABAB5;\n\tWed,  8 Jan 2025 11:48:43 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"f6b50I41\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1736333324;\n\tbh=AAKoByudh7/qWndR6uEzWHD+4Y5og1nGB2I2O7fc5Ww=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=f6b50I41Hj+a4Os9C0PxWjCivUdscaBFF16nFqmVU/V1WvOj+9G/oQSpuNgaHSPDD\n\tFEutwDp8dsS6D6+6PC9Z50wNlfnYWL8SY1GGzn1oxzv/XmK3Gcoi0ppsdFEV5BiufY\n\tYBoXIsnVMTxdQ2Y1RsZy3mQMmX+nFfqKsqv5+Pfw=","From":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>, naush@raspberrypi.com,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>","Subject":"[PATCH v3 2/6] include: linux: videodev2: Add generic line based\n\tpixel formats","Date":"Wed,  8 Jan 2025 11:49:19 +0100","Message-ID":"<20250108104924.163077-3-jacopo.mondi@ideasonboard.com>","X-Mailer":"git-send-email 2.47.1","In-Reply-To":"<20250108104924.163077-1-jacopo.mondi@ideasonboard.com>","References":"<20250108104924.163077-1-jacopo.mondi@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":"Add the definition for the generic line based pixelformats.\n\nThe formats has been added in upstream Linux by commit\n1d9215233958 (\"media: uapi: v4l: Add generic 8-bit metadata format\ndefinitions\") which got merged in Linux v6.10.\n\nThe formats however are not yet available to userspace, as they\nhave been made only available to the kernel by commit\nd69c8429ea80 (\"media: uapi: v4l: Don't expose generic metadata formats\nto userspace\") to let the line-based metadata support stabilize before\nallowing applications to use it.\n\nWith the forthcoming completion of the line-based metadata upstreaming\nmanually add the generic line based pixel format to prepare libcamera\nto support them.\n\nSigned-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\nAcked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n include/linux/videodev2.h | 12 ++++++++++++\n 1 file changed, 12 insertions(+)","diff":"diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h\nindex d2653b2e9eca..317d063a7e2b 100644\n--- a/include/linux/videodev2.h\n+++ b/include/linux/videodev2.h\n@@ -843,6 +843,18 @@ struct v4l2_pix_format {\n #define V4L2_META_FMT_MALI_C55_PARAMS\tv4l2_fourcc('C', '5', '5', 'P') /* ARM Mali-C55 Parameters */\n #define V4L2_META_FMT_MALI_C55_3A_STATS        v4l2_fourcc('C', '5', '5', 'S') /* ARM Mali-C55 3A Statistics */\n \n+/*\n+ * Line-based metadata formats. Remember to update v4l_fill_fmtdesc() when\n+ * adding new ones!\n+ */\n+#define V4L2_META_FMT_GENERIC_8\t\tv4l2_fourcc('M', 'E', 'T', '8') /* Generic 8-bit metadata */\n+#define V4L2_META_FMT_GENERIC_CSI2_10\tv4l2_fourcc('M', 'C', '1', 'A') /* 10-bit CSI-2 packed 8-bit metadata */\n+#define V4L2_META_FMT_GENERIC_CSI2_12\tv4l2_fourcc('M', 'C', '1', 'C') /* 12-bit CSI-2 packed 8-bit metadata */\n+#define V4L2_META_FMT_GENERIC_CSI2_14\tv4l2_fourcc('M', 'C', '1', 'E') /* 14-bit CSI-2 packed 8-bit metadata */\n+#define V4L2_META_FMT_GENERIC_CSI2_16\tv4l2_fourcc('M', 'C', '1', 'G') /* 16-bit CSI-2 packed 8-bit metadata */\n+#define V4L2_META_FMT_GENERIC_CSI2_20\tv4l2_fourcc('M', 'C', '1', 'K') /* 20-bit CSI-2 packed 8-bit metadata */\n+#define V4L2_META_FMT_GENERIC_CSI2_24\tv4l2_fourcc('M', 'C', '1', 'O') /* 24-bit CSI-2 packed 8-bit metadata */\n+\n /* priv field value to indicates that subsequent fields are valid. */\n #define V4L2_PIX_FMT_PRIV_MAGIC\t\t0xfeedcafe\n \n","prefixes":["v3","2/6"]}