Patch Detail
Show a patch.
GET /api/1.1/patches/10579/?format=api
{ "id": 10579, "url": "https://patchwork.libcamera.org/api/1.1/patches/10579/?format=api", "web_url": "https://patchwork.libcamera.org/patch/10579/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/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": "<20201205103106.242080-17-paul.elder@ideasonboard.com>", "date": "2020-12-05T10:30:59", "name": "[libcamera-devel,v5,16/23] ipa: raspberrypi: Add mojom data definition file", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "fd10980cb1b90f5c7a29e31fa8fe8fc9e8b2054c", "submitter": { "id": 17, "url": "https://patchwork.libcamera.org/api/1.1/people/17/?format=api", "name": "Paul Elder", "email": "paul.elder@ideasonboard.com" }, "delegate": { "id": 17, "url": "https://patchwork.libcamera.org/api/1.1/users/17/?format=api", "username": "epaul", "first_name": "Paul", "last_name": "Elder", "email": "paul.elder@ideasonboard.com" }, "mbox": "https://patchwork.libcamera.org/patch/10579/mbox/", "series": [ { "id": 1506, "url": "https://patchwork.libcamera.org/api/1.1/series/1506/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1506", "date": "2020-12-05T10:30:43", "name": "IPA isolation implementation", "version": 5, "mbox": "https://patchwork.libcamera.org/series/1506/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/10579/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/10579/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 713E2BDB20\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 5 Dec 2020 10:31:54 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3C6EB6360A;\n\tSat, 5 Dec 2020 11:31:54 +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 485D36360A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 5 Dec 2020 11:31:53 +0100 (CET)", "from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id AF37A2A4;\n\tSat, 5 Dec 2020 11:31:51 +0100 (CET)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"tf7PL/Wy\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1607164312;\n\tbh=jkMmEfmBZu75bYo9vyv++4LTDqQ7RFD8v5WM+5tUKO4=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=tf7PL/Wyoam7SiXAg1DjG8D+Md5w1+NXJuRIqL5NvTgYaMMj0xaCRDT80w/PG+z1A\n\tv5+2/RzKCtot4xCRFS1Vbfi9mRU7gyn+G+y2jRgOXCi0Ds4ceIJ/Td4rzlbIrVUelm\n\trlwG7DOubvdcAXsHt7ZrzogyfGXweUubcAr3s8g0=", "From": "Paul Elder <paul.elder@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Sat, 5 Dec 2020 19:30:59 +0900", "Message-Id": "<20201205103106.242080-17-paul.elder@ideasonboard.com>", "X-Mailer": "git-send-email 2.27.0", "In-Reply-To": "<20201205103106.242080-1-paul.elder@ideasonboard.com>", "References": "<20201205103106.242080-1-paul.elder@ideasonboard.com>", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH v5 16/23] ipa: raspberrypi: Add mojom data\n\tdefinition file", "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>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Add a mojom data definition for raspberrypi pipeline handler's IPAs.\nThis is a direct translation of what the raspberrypi pipeline handler\nand IPA was using before with IPAOperationData.\n\nAlso move the enums from raspberrypi.h to raspberrypi.mojom\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n\n---\nChanges in v5:\n- rename some structs\n\nChanges in v4:\n- rename IPARPiCallbackInterface to IPARPiEventInterface\n\nChanges in v3:\n- remove stray comment about how our compiler will generate code\n- add ipa.rpi namespace\n - not ipa.RPi, because namespace conflict\n- remove RPi prefix from struct and enum names\n- add transform parameter to struct ConfigInput\n\nChanges in v2:\n- rebased on \"libcamera: pipeline: ipa: raspberrypi: Rework drop frame\n signalling\"\n- add license\n- move generic documentation to core.mojom\n- move documentation from IPA interface\n- customize the RPi IPA interface to make the pipeline and IPA code\n cleaner\n---\n include/libcamera/ipa/meson.build | 4 +-\n include/libcamera/ipa/raspberrypi.h | 18 ----\n include/libcamera/ipa/raspberrypi.mojom | 119 ++++++++++++++++++++++++\n 3 files changed, 122 insertions(+), 19 deletions(-)\n create mode 100644 include/libcamera/ipa/raspberrypi.mojom", "diff": "diff --git a/include/libcamera/ipa/meson.build b/include/libcamera/ipa/meson.build\nindex 087f5bbd..5c838d5c 100644\n--- a/include/libcamera/ipa/meson.build\n+++ b/include/libcamera/ipa/meson.build\n@@ -24,7 +24,9 @@ ipa_mojom_core = custom_target(core_mojom_file.split('.')[0] + '_mojom_module',\n '--mojoms', '@INPUT@'\n ])\n \n-ipa_mojom_files = []\n+ipa_mojom_files = [\n+ 'raspberrypi.mojom',\n+]\n \n ipa_mojoms = []\n \ndiff --git a/include/libcamera/ipa/raspberrypi.h b/include/libcamera/ipa/raspberrypi.h\nindex 2b55dbfc..df30b4a2 100644\n--- a/include/libcamera/ipa/raspberrypi.h\n+++ b/include/libcamera/ipa/raspberrypi.h\n@@ -16,24 +16,6 @@ namespace libcamera {\n \n namespace RPi {\n \n-enum ConfigParameters {\n-\tIPA_CONFIG_LS_TABLE = (1 << 0),\n-\tIPA_CONFIG_STAGGERED_WRITE = (1 << 1),\n-\tIPA_CONFIG_SENSOR = (1 << 2),\n-\tIPA_CONFIG_DROP_FRAMES = (1 << 3),\n-};\n-\n-enum Operations {\n-\tIPA_ACTION_V4L2_SET_STAGGERED = 1,\n-\tIPA_ACTION_V4L2_SET_ISP,\n-\tIPA_ACTION_STATS_METADATA_COMPLETE,\n-\tIPA_ACTION_RUN_ISP,\n-\tIPA_ACTION_EMBEDDED_COMPLETE,\n-\tIPA_EVENT_SIGNAL_STAT_READY,\n-\tIPA_EVENT_SIGNAL_ISP_PREPARE,\n-\tIPA_EVENT_QUEUE_REQUEST,\n-};\n-\n enum BufferMask {\n \tID\t\t= 0x00ffff,\n \tSTATS\t\t= 0x010000,\ndiff --git a/include/libcamera/ipa/raspberrypi.mojom b/include/libcamera/ipa/raspberrypi.mojom\nnew file mode 100644\nindex 00000000..81744ac6\n--- /dev/null\n+++ b/include/libcamera/ipa/raspberrypi.mojom\n@@ -0,0 +1,119 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+\n+module ipa.rpi;\n+\n+import \"include/libcamera/ipa/core.mojom\";\n+\n+enum ConfigParameters {\n+\tConfigLsTable = 0x01,\n+\tConfigStaggeredWrite = 0x02,\n+\tConfigSensor = 0x04,\n+\tConfigDropFrames = 0x08,\n+};\n+\n+struct SensorConfig {\n+\tuint32 gainDelay;\n+\tuint32 exposureDelay;\n+\tuint32 sensorMetadata;\n+};\n+\n+struct ISPConfig {\n+\tuint32 embeddedbufferId;\n+\tuint32 bayerbufferId;\n+};\n+\n+struct ConfigInput {\n+\tuint32 op;\n+\tuint32 transform;\n+\tFileDescriptor lsTableHandle;\n+\tint32 lsTableHandleStatic = -1;\n+};\n+\n+struct ConfigOutput {\n+\tuint32 op;\n+\tSensorConfig sensorConfig;\n+\tControlList controls;\n+\tint32 dropFrameCount;\n+};\n+\n+interface IPARPiInterface {\n+\tinit(IPASettings settings) => (int32 ret);\n+\tstart() => (int32 ret);\n+\tstop();\n+\n+\t/**\n+\t * \\fn configure()\n+\t * \\brief Configure the IPA stream and sensor settings\n+\t * \\param[in] sensorInfo Camera sensor information\n+\t * \\param[in] streamConfig Configuration of all active streams\n+\t * \\param[in] entityControls Controls provided by the pipeline entities\n+\t * \\param[in] ipaConfig Pipeline-handler-specific configuration data\n+\t * \\param[out] result Pipeline-handler-specific configuration result\n+\t *\n+\t * This method shall be called when the camera is started to inform the IPA of\n+\t * the camera's streams and the sensor settings.\n+\t *\n+\t * The \\a sensorInfo conveys information about the camera sensor settings that\n+\t * the pipeline handler has selected for the configuration.\n+\t *\n+\t * The \\a ipaConfig and \\a result parameters carry data passed by the\n+\t * pipeline handler to the IPA and back.\n+\t */\n+\tconfigure(CameraSensorInfo sensorInfo,\n+\t\t map<uint32, IPAStream> streamConfig,\n+\t\t map<uint32, ControlInfoMap> entityControls,\n+\t\t ConfigInput ipaConfig)\n+\t\t=> (ConfigOutput results);\n+\n+\t/**\n+\t * \\fn mapBuffers()\n+\t * \\brief Map buffers shared between the pipeline handler and the IPA\n+\t * \\param[in] buffers List of buffers to map\n+\t *\n+\t * This method informs the IPA module of memory buffers set up by the pipeline\n+\t * handler that the IPA needs to access. It provides dmabuf file handles for\n+\t * each buffer, and associates the buffers with unique numerical IDs.\n+\t *\n+\t * IPAs shall map the dmabuf file handles to their address space and keep a\n+\t * cache of the mappings, indexed by the buffer numerical IDs. The IDs are used\n+\t * in all other IPA interface methods to refer to buffers, including the\n+\t * unmapBuffers() method.\n+\t *\n+\t * All buffers that the pipeline handler wishes to share with an IPA shall be\n+\t * mapped with this method. Buffers may be mapped all at once with a single\n+\t * call, or mapped and unmapped dynamically at runtime, depending on the IPA\n+\t * protocol. Regardless of the protocol, all buffers mapped at a given time\n+\t * shall have unique numerical IDs.\n+\t *\n+\t * The numerical IDs have no meaning defined by the IPA interface, and \n+\t * should be treated as opaque handles by IPAs, with the only exception\n+\t * that ID zero is invalid.\n+\t *\n+\t * \\sa unmapBuffers()\n+\t */\n+\tmapBuffers(array<IPABuffer> buffers);\n+\n+\t/**\n+\t * \\fn unmapBuffers()\n+\t * \\brief Unmap buffers shared by the pipeline to the IPA\n+\t * \\param[in] ids List of buffer IDs to unmap\n+\t *\n+\t * This method removes mappings set up with mapBuffers(). Numerical IDs\n+\t * of unmapped buffers may be reused when mapping new buffers.\n+\t *\n+\t * \\sa mapBuffers()\n+\t */\n+\tunmapBuffers(array<uint32> ids);\n+\n+\t[async] signalStatReady(uint32 bufferId);\n+\t[async] signalQueueRequest(ControlList controls);\n+\t[async] signalIspPrepare(ISPConfig data);\n+};\n+\n+interface IPARPiEventInterface {\n+\tstatsMetadataComplete(uint32 bufferId, ControlList controls);\n+\trunIsp(uint32 bufferId);\n+\tembeddedComplete(uint32 bufferId);\n+\tsetIsp(ControlList controls);\n+\tsetStaggered(ControlList controls);\n+};\n", "prefixes": [ "libcamera-devel", "v5", "16/23" ] }