Patch Detail
Show a patch.
GET /api/patches/24696/?format=api
{ "id": 24696, "url": "https://patchwork.libcamera.org/api/patches/24696/?format=api", "web_url": "https://patchwork.libcamera.org/patch/24696/", "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": "<20251017-exposure-limits-v1-3-6288cd86e719@ideasonboard.com>", "date": "2025-10-17T09:00:07", "name": "[3/3] DNI: cam: Test Camera::controls() update with capture script", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "8fbdf828df5bf94a8730bc69c3388f99f7d9cf0a", "submitter": { "id": 143, "url": "https://patchwork.libcamera.org/api/people/143/?format=api", "name": "Jacopo Mondi", "email": "jacopo.mondi@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/24696/mbox/", "series": [ { "id": 5508, "url": "https://patchwork.libcamera.org/api/series/5508/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5508", "date": "2025-10-17T09:00:04", "name": "rkisp1: Update exposure limits on vblank change", "version": 1, "mbox": "https://patchwork.libcamera.org/series/5508/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/24696/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/24696/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 E176CC3331\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 17 Oct 2025 09:00:22 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 34639606AB;\n\tFri, 17 Oct 2025 11:00:20 +0200 (CEST)", "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 68754606A2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 17 Oct 2025 11:00:16 +0200 (CEST)", "from [192.168.1.182] (93-46-82-201.ip106.fastwebnet.it\n\t[93.46.82.201])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 06A931E33;\n\tFri, 17 Oct 2025 10:58:35 +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=\"FLH/GLMN\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1760691516;\n\tbh=sPGToOju6+KA4WdoxnrOT31eTQJcw2spNsMittaieDY=;\n\th=From:Date:Subject:References:In-Reply-To:To:Cc:From;\n\tb=FLH/GLMNe5/k099IVUSJ6vKtmBqQ2/n9oICid042Y0QzqVr5xQqVW+57KyM65IRgW\n\tc2hAdQL1YOefUU3FxEPuNqHc1Ku3Y5lJ910yFkBXS6F7gRiGMYNC3ZAwYcGRnf7J4F\n\tjamJZ+zTACQaoypN3yjK6EsHlJsJkTwJri6gMef4=", "From": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>", "Date": "Fri, 17 Oct 2025 11:00:07 +0200", "Subject": "[PATCH 3/3] DNI: cam: Test Camera::controls() update with capture\n\tscript", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "7bit", "Message-Id": "<20251017-exposure-limits-v1-3-6288cd86e719@ideasonboard.com>", "References": "<20251017-exposure-limits-v1-0-6288cd86e719@ideasonboard.com>", "In-Reply-To": "<20251017-exposure-limits-v1-0-6288cd86e719@ideasonboard.com>", "To": "=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>,\n\tlibcamera-devel@lists.libcamera.org", "Cc": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>", "X-Mailer": "b4 0.14.2", "X-Developer-Signature": "v=1; a=openpgp-sha256; l=2583;\n\ti=jacopo.mondi@ideasonboard.com; h=from:subject:message-id;\n\tbh=sPGToOju6+KA4WdoxnrOT31eTQJcw2spNsMittaieDY=;\n\tb=owEBbQKS/ZANAwAKAXI0Bo8WoVY8AcsmYgBo8gWfAoB9TVMVFIttj+YIZx1Q8mpMvfxG93C3G\n\tOXXNUohSMGJAjMEAAEKAB0WIQS1xD1IgJogio9YOMByNAaPFqFWPAUCaPIFnwAKCRByNAaPFqFW\n\tPCE9D/9Zl5RfOPvkaEkRp2qIhCVFKdu1FuQO4p8zTm70AqeoTkBKQJVigJctiizbZCcpwzdjemh\n\tIo3xfZzZH9n7kmnzwQn0DOlBYmFvB94qWx8AOsujLXKAfz+uWOF4Oj9FqfjnH+dAuHv1PiDa0ou\n\tGvj7kn2RbuxnwxFJVdj1OqS4M55WCA5+CD52aJMesU4Td8koq6MBZKWHOO4rjxrngnRv/YGhVzL\n\tY77hv8lXDZj8+sCryLMBxwL7cMDy/Ow+b9147vEddGY1Bndbxw6YI5l1hCXCrxq2LzHtQpXaG1S\n\tqi4bkDj9pgB0ls6sQguRqgLHs3IMedcH39WSPFiBsHUM3bSx3woQaackeVv+GqhDRM9kRPKJnFN\n\tYGE567MYelhXWdrtpeRNbZp1WIONt71d6VB5cIzqiCopR8FDA9Z5U2sV32M/uMlhCjHYNZ/C4SY\n\t4HFO+UU/uH0r4bH6vfFhYZEdVJvUMyTFkcARMDRqmXF9hZcorMuM1rjbBQGiXtea9OpXyBKuJ+L\n\tbk92Ur9JXr/jfp23qyYt6i8joNkSuVnWJoBDymvNEblj8lqeB+PBTdRxOBPOp1pm/X7mAFI6AMP\n\teyWitXrcomusJFCROHWEPZE7ijHsb4KZz2e8eC6YAi7uWkKIuZEZonV1p/wZvQR/aYcikutEXaM\n\thlLGjkmDx+ToqbA==", "X-Developer-Key": "i=jacopo.mondi@ideasonboard.com; a=openpgp;\n\tfpr=72392EDC88144A65C701EA9BA5826A2587AD026B", "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 a per-frame printout of the ExposureTime and FrameDurationLimits\ncontrols to the 'cam' tool and change the FrameDurationLimits value\nduring a capture session using a capture script.\n\n$ cam -c1 -C100 --script ./capture-script.yaml\n\nup to frame 50:\n\n(30.07 fps) cam0-stream0 seq: 000050 bytesused: 2073600/1036800\nFrameDurationLimits: [21751, 1281893]\nExposure max: 33238\n\nThe FrameDuration is unbound and Exposure is limited by the driver\nprogrammed vblank of 627 lines (configuration for full-resolution 30\nfps) to 33,238 msecs.\n\nAfter frame 50:\n\n(15.00 fps) cam0-stream0 seq: 000055 bytesused: 2073600/1036800\nFrameDurationLimits: [66666, 66666]\nExposure max: 66652\n\nFrameDurationLimits is set to [66666, 66666] by the capture script\nand the control limits as fetched from the Camera are updated\naccordingly. The Exposure time is now bounded by a larger vblank of 2335\nlines to 66,652 msecs.\n\nSigned-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n---\n change-frame-duration.yaml | 4 ++++\n src/apps/cam/camera_session.cpp | 21 +++++++++++++++++++++\n 2 files changed, 25 insertions(+)", "diff": "diff --git a/change-frame-duration.yaml b/change-frame-duration.yaml\nnew file mode 100644\nindex 0000000000000000000000000000000000000000..b73d85b9a2625067e4955a7c1a15756ee08aec32\n--- /dev/null\n+++ b/change-frame-duration.yaml\n@@ -0,0 +1,4 @@\n+frames:\n+ - 50:\n+ FrameDurationLimits: [66666, 66666]\n+\ndiff --git a/src/apps/cam/camera_session.cpp b/src/apps/cam/camera_session.cpp\nindex 1596a25a3abed9c2d93e6657b92e35fdfd3d1a26..dde4b7b5a7bb907192e6a0d3b5fd7d097a719cb9 100644\n--- a/src/apps/cam/camera_session.cpp\n+++ b/src/apps/cam/camera_session.cpp\n@@ -544,6 +544,27 @@ void CameraSession::processRequest(Request *request)\n \tif (!requeue)\n \t\treturn;\n \n+\tauto camera = this->camera();\n+\tconst auto controlInfo = camera->controls();\n+\tfor (const auto &[id, ctrlInfo] : controlInfo) {\n+\t\tif (id->id() != libcamera::controls::EXPOSURE_TIME &&\n+\t\t id->id() != libcamera::controls::FRAME_DURATION_LIMITS)\n+\t\t\tcontinue;\n+\n+\t\tswitch (id->id()) {\n+\t\tcase libcamera::controls::EXPOSURE_TIME:\n+\t\t\tstd::cout << \"Exposure max: \"\n+\t\t\t\t << ctrlInfo.max().get<int32_t>() << std::endl;\n+\t\t\tbreak;\n+\t\tcase libcamera::controls::FRAME_DURATION_LIMITS:\n+\t\t\tstd::cout << \"FrameDurationLimits: [\"\n+\t\t\t\t << ctrlInfo.min().get<int32_t>() << \", \"\n+\t\t\t\t << ctrlInfo.max().get<int32_t>() << \"]\"\n+\t\t\t\t << std::endl;\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+\n \trequest->reuse(Request::ReuseBuffers);\n \tqueueRequest(request);\n }\n", "prefixes": [ "3/3" ] }