Patch Detail
Show a patch.
GET /api/patches/10841/?format=api
{ "id": 10841, "url": "https://patchwork.libcamera.org/api/patches/10841/?format=api", "web_url": "https://patchwork.libcamera.org/patch/10841/", "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": "<20210107094735.11673-10-jacopo@jmondi.org>", "date": "2021-01-07T09:47:34", "name": "[libcamera-devel,v6,09/10] libcamera: camera_sensor: Initialize VIMC properties", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "0635408cb2ca1a9cfd4cd16cf4c8abe3c64b28a6", "submitter": { "id": 3, "url": "https://patchwork.libcamera.org/api/people/3/?format=api", "name": "Jacopo Mondi", "email": "jacopo@jmondi.org" }, "delegate": { "id": 15, "url": "https://patchwork.libcamera.org/api/users/15/?format=api", "username": "jmondi", "first_name": "Jacopo", "last_name": "Mondi", "email": "jacopo@jmondi.org" }, "mbox": "https://patchwork.libcamera.org/patch/10841/mbox/", "series": [ { "id": 1571, "url": "https://patchwork.libcamera.org/api/series/1571/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1571", "date": "2021-01-07T09:47:25", "name": "libcamera: camera_sensor: Make validation more strict", "version": 6, "mbox": "https://patchwork.libcamera.org/series/1571/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/10841/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/10841/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 7819CC0F1A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 7 Jan 2021 09:47:35 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 53E9963494;\n\tThu, 7 Jan 2021 10:47:35 +0100 (CET)", "from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net\n\t[217.70.183.199])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 827F06344D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 7 Jan 2021 10:47:34 +0100 (CET)", "from uno.localdomain (unknown [93.56.74.111])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 69896FF808;\n\tThu, 7 Jan 2021 09:47:33 +0000 (UTC)" ], "X-Originating-IP": "93.56.74.111", "From": "Jacopo Mondi <jacopo@jmondi.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 7 Jan 2021 10:47:34 +0100", "Message-Id": "<20210107094735.11673-10-jacopo@jmondi.org>", "X-Mailer": "git-send-email 2.29.2", "In-Reply-To": "<20210107094735.11673-1-jacopo@jmondi.org>", "References": "<20210107094735.11673-1-jacopo@jmondi.org>", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH v6 09/10] libcamera: camera_sensor:\n\tInitialize VIMC properties", "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=\"utf-8\"", "Content-Transfer-Encoding": "base64", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "The VIMC driver does not yet support all the features required\nfor all sensor drivers. As it is the main testing platforms and the\ndriver changes might take a long time to land in the developments\nand testing platforms, temporary close the gap by skipping driver\nvalidation and initializing properties with static information such\nas the sensor resolution.\n\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n include/libcamera/internal/camera_sensor.h | 1 +\n src/libcamera/camera_sensor.cpp | 26 ++++++++++++++++++++++\n 2 files changed, 27 insertions(+)", "diff": "diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h\nindex 86902b85ada8..fed36bf26e47 100644\n--- a/include/libcamera/internal/camera_sensor.h\n+++ b/include/libcamera/internal/camera_sensor.h\n@@ -70,6 +70,7 @@ protected:\n private:\n \tint generateId();\n \tint validateSensorDriver();\n+\tvoid initVimcDefaultProperties();\n \tint initProperties();\n \n \tconst MediaEntity *entity_;\ndiff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\nindex e9c80c304dd4..251691aedfa3 100644\n--- a/src/libcamera/camera_sensor.cpp\n+++ b/src/libcamera/camera_sensor.cpp\n@@ -6,6 +6,7 @@\n */\n \n #include \"libcamera/internal/camera_sensor.h\"\n+#include \"libcamera/internal/media_device.h\"\n \n #include <algorithm>\n #include <float.h>\n@@ -207,6 +208,21 @@ int CameraSensor::init()\n \t */\n \tresolution_ = sizes_.back();\n \n+\t/*\n+\t * VIMC is a bit special, as it does not yet support all the mandatory\n+\t * requirements regular sensors have to respect.\n+\t *\n+\t * Do not validate the driver if it's VIMC and initialize the sensor\n+\t * properties with static information.\n+\t *\n+\t * \\todo Remove the special case once the VIMC driver has been\n+\t * updated in all test platforms.\n+\t */\n+\tif (entity_->device()->driver() == \"vimc\") {\n+\t\tinitVimcDefaultProperties();\n+\t\treturn initProperties();\n+\t}\n+\n \tret = validateSensorDriver();\n \tif (ret)\n \t\treturn ret;\n@@ -304,6 +320,16 @@ int CameraSensor::validateSensorDriver()\n \treturn 0;\n }\n \n+/*\n+ * \\brief Initialize properties that cannot be intialized by the\n+ * regular initProperties() function for VIMC\n+ */\n+void CameraSensor::initVimcDefaultProperties()\n+{\n+\tpixelArraySize_ = resolution();\n+\tactiveArea_ = Rectangle(pixelArraySize_);\n+}\n+\n int CameraSensor::initProperties()\n {\n \t/*\n", "prefixes": [ "libcamera-devel", "v6", "09/10" ] }