Patch Detail
Show a patch.
GET /api/1.1/patches/10813/?format=api
{ "id": 10813, "url": "https://patchwork.libcamera.org/api/1.1/patches/10813/?format=api", "web_url": "https://patchwork.libcamera.org/patch/10813/", "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": "<20210105123128.617543-11-jacopo@jmondi.org>", "date": "2021-01-05T12:31:28", "name": "[libcamera-devel,v5,10/10] android: camera_device: Do not default pixel array properties", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "a91a9e178210f85f579dae81c64e7eab18a59ebe", "submitter": { "id": 3, "url": "https://patchwork.libcamera.org/api/1.1/people/3/?format=api", "name": "Jacopo Mondi", "email": "jacopo@jmondi.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/10813/mbox/", "series": [ { "id": 1567, "url": "https://patchwork.libcamera.org/api/1.1/series/1567/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1567", "date": "2021-01-05T12:31:18", "name": "libcamera: camera_sensor: Make validation more strict", "version": 5, "mbox": "https://patchwork.libcamera.org/series/1567/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/10813/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/10813/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 D688FC0F1E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 5 Jan 2021 12:31:25 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 81DF2632EE;\n\tTue, 5 Jan 2021 13:31:25 +0100 (CET)", "from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net\n\t[217.70.183.196])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DA80162012\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 5 Jan 2021 13:31:22 +0100 (CET)", "from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 916BCE0003\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 5 Jan 2021 12:31:22 +0000 (UTC)" ], "X-Originating-IP": "2.224.242.101", "From": "Jacopo Mondi <jacopo@jmondi.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 5 Jan 2021 13:31:28 +0100", "Message-Id": "<20210105123128.617543-11-jacopo@jmondi.org>", "X-Mailer": "git-send-email 2.29.2", "In-Reply-To": "<20210105123128.617543-1-jacopo@jmondi.org>", "References": "<20210105123128.617543-1-jacopo@jmondi.org>", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH v5 10/10] android: camera_device: Do not\n\tdefault pixel array 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": "Now that the pixel array properties have been defaulted in the\nCameraSensor class (or in the pipeline handler, for the UVC use case),\nthey will always be reported by the libcamera::Camera and there's no\nneed to default them in the Camera HAL.\n\nRemove defaults and assume properties are always there.\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 src/android/camera_device.cpp | 20 ++------------------\n 1 file changed, 2 insertions(+), 18 deletions(-)", "diff": "diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex 23be2a593a2a..a136f8e33843 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -851,7 +851,7 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()\n \tstaticMetadata_->addEntry(ANDROID_JPEG_MAX_SIZE, &maxJpegBufferSize_, 1);\n \n \t/* Sensor static metadata. */\n-\tif (properties.contains(properties::PixelArraySize)) {\n+\t{\n \t\tconst Size &size =\n \t\t\tproperties.get(properties::PixelArraySize);\n \t\tstd::vector<int32_t> data{\n@@ -860,17 +860,9 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()\n \t\t};\n \t\tstaticMetadata_->addEntry(ANDROID_SENSOR_INFO_PIXEL_ARRAY_SIZE,\n \t\t\t\t\t data.data(), data.size());\n-\t} else {\n-\t\t/*\n-\t\t * \\todo Drop the default once the ov5670 and ov13858 drivers\n-\t\t * are updated to report the pixel array size.\n-\t\t */\n-\t\tint32_t data[] = { 2592, 1944 };\n-\t\tstaticMetadata_->addEntry(ANDROID_SENSOR_INFO_PIXEL_ARRAY_SIZE,\n-\t\t\t\t\t data, 2);\n \t}\n \n-\tif (properties.contains(properties::PixelArrayActiveAreas)) {\n+\t{\n \t\tconst Span<const Rectangle> &rects =\n \t\t\tproperties.get(properties::PixelArrayActiveAreas);\n \t\tstd::vector<int32_t> data{\n@@ -881,14 +873,6 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()\n \t\t};\n \t\tstaticMetadata_->addEntry(ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE,\n \t\t\t\t\t data.data(), data.size());\n-\t} else {\n-\t\t/*\n-\t\t * \\todo Drop the default once the ov5670 and ov13858 drivers\n-\t\t * are updated to report the pixel array size.\n-\t\t */\n-\t\tint32_t data[] = { 0, 0, 2560, 1920 };\n-\t\tstaticMetadata_->addEntry(ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE,\n-\t\t\t\t\t data, 4);\n \t}\n \n \tint32_t sensitivityRange[] = {\n", "prefixes": [ "libcamera-devel", "v5", "10/10" ] }