Patch Detail
Show a patch.
GET /api/patches/19960/?format=api
{ "id": 19960, "url": "https://patchwork.libcamera.org/api/patches/19960/?format=api", "web_url": "https://patchwork.libcamera.org/patch/19960/", "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": "<20240426111815.10763-1-naush@raspberrypi.com>", "date": "2024-04-26T11:18:15", "name": "ipa: rpi: Fix for incorrectly reported max shutter speed", "commit_ref": "299e5278bd7657c785b7adac0c4f02d7e42f22c2", "pull_url": null, "state": "accepted", "archived": false, "hash": "df7cf36a3fef05a92d8e8ba1724362a7e1bbc479", "submitter": { "id": 34, "url": "https://patchwork.libcamera.org/api/people/34/?format=api", "name": "Naushir Patuck", "email": "naush@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/19960/mbox/", "series": [ { "id": 4276, "url": "https://patchwork.libcamera.org/api/series/4276/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4276", "date": "2024-04-26T11:18:15", "name": "ipa: rpi: Fix for incorrectly reported max shutter speed", "version": 1, "mbox": "https://patchwork.libcamera.org/series/4276/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/19960/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/19960/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 CE7C3C3220\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 26 Apr 2024 11:18:21 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9F23161A9B;\n\tFri, 26 Apr 2024 13:18:20 +0200 (CEST)", "from mail-wm1-x335.google.com (mail-wm1-x335.google.com\n\t[IPv6:2a00:1450:4864:20::335])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 12B1A61A94\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 26 Apr 2024 13:18:18 +0200 (CEST)", "by mail-wm1-x335.google.com with SMTP id\n\t5b1f17b1804b1-41ba1ba5591so1909125e9.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 26 Apr 2024 04:18:18 -0700 (PDT)", "from localhost.localdomain ([188.39.149.98])\n\tby smtp.gmail.com with ESMTPSA id\n\tr18-20020a05600c35d200b00418d434ae4esm30603601wmq.10.2024.04.26.04.18.17\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 26 Apr 2024 04:18:17 -0700 (PDT)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"UbK5C7fB\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1714130298; x=1714735098;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:from:to:cc:subject:date:message-id:reply-to;\n\tbh=CKGn4xzWxKwyv9CxdgoXw6UX34fFBuMprm8x1M8OE3s=;\n\tb=UbK5C7fBLq7mMhRweJPcpUsTiM5vqxnGN32UztJgPNSUZbjO5U2Cn+BcuVn9aAbN5v\n\ttLpJG6al5ORv7Rvf3snSq7VS8WIR5Vl2nJGnvANTVtTCx3ruLYma2vda7svysugJ5n0B\n\tKeusmclAVPcn9koyYkWuUdEw6FCAj+NkGQXi8NoBTrSTEtA4IuAyL50cU33wQiMgcQ6g\n\tlzAEsVImI2lzmLDT7IvlURexKgGoVfkzqw086Yaapc81EUdLvULM9Aa/dt80sSq4kMjo\n\t3+6+nZPMgQl0tngJUfsns+5UWpfY0mnAcwHL3Y79o6ShPN8jFiw8hAPRoQNkM/3Bl6kA\n\tvfVw==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1714130298; x=1714735098;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=CKGn4xzWxKwyv9CxdgoXw6UX34fFBuMprm8x1M8OE3s=;\n\tb=p0/W8ALfO5g/Op8q3tjOzSCsE8+XCrhzaA4ZwgBU26vPDrdunK6+tKpBn58VhB9Vql\n\tCSgEov1+Z30LQKepK1ngHNSwg9fNwiJsSnQte9+QVwJjwXaWky3bnPg/mPJYRJizJhhK\n\tuUkGVCoJHzqcbSmruJSGdZx7I1DPwEnYLo671Q/6RxOM8nrTA1wc28EKShetPXSz774F\n\tZ4U6eKOePqeynbOIftzlf2z/0PPCqKYL7WYil22UbKWasDSObTfUIWEYHZLhK8yAqD6Q\n\t77AO8/RtpPTJ85RlX16ATI7dd7VkPO09wsx9k4NdJJNDL8EuNZHWH7qG8l+9eDPsP/F3\n\ttgBA==", "X-Gm-Message-State": "AOJu0Yxp1xD4GSBfDhEJqngwy/DFPWM9quJuRBKCeRgj9slR62s6q9/J\n\t1QFaP+TpjOC4ex0TDUG0OwgBmbf4+6XbpcuKYOD7eC5RgveJy9SNPn9hOCBqn7/J5WxCBSPNp53\n\ts", "X-Google-Smtp-Source": "AGHT+IGljUc+d8p0TX7jXexYNvn/KqjdkWrWeoVg7k93IqOUJE6on9k2bywCpxYbqeDAl8fwSJQ8qA==", "X-Received": "by 2002:a05:600c:a54:b0:41a:aad8:e393 with SMTP id\n\tc20-20020a05600c0a5400b0041aaad8e393mr1780400wmq.30.1714130297889; \n\tFri, 26 Apr 2024 04:18:17 -0700 (PDT)", "From": "Naushir Patuck <naush@raspberrypi.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "david.plowman@raspberrypi.com,\n\tNaushir Patuck <naush@raspberrypi.com>", "Subject": "[PATCH] ipa: rpi: Fix for incorrectly reported max shutter speed", "Date": "Fri, 26 Apr 2024 12:18:15 +0100", "Message-Id": "<20240426111815.10763-1-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.34.1", "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": "The maximum shutter speed calculation in the cam-helper relied on\nthe frame duration limits being correctly set in the cam-helper's mode\nstructure. This was not the case on first startup, so the maximum\nshutter speed reported back via the ControlInfo was incorrect.\n\nFix this by setting up the camera mode in the cam-helper before querying\nfor the max shutter value.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/ipa/rpi/common/ipa_base.cpp | 6 ++++++\n 1 file changed, 6 insertions(+)", "diff": "diff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp\nindex 149a133ab662..1d12262bda01 100644\n--- a/src/ipa/rpi/common/ipa_base.cpp\n+++ b/src/ipa/rpi/common/ipa_base.cpp\n@@ -592,6 +592,12 @@ void IpaBase::setMode(const IPACameraSensorInfo &sensorInfo)\n \tmode_.minAnalogueGain = helper_->gain(gainCtrl.min().get<int32_t>());\n \tmode_.maxAnalogueGain = helper_->gain(gainCtrl.max().get<int32_t>());\n \n+\t/*\n+\t * We need to give the helper the min/max frame durations so it can calculate\n+\t * the correct exposure limits below.\n+\t */\n+\thelper_->setCameraMode(mode_);\n+\n \t/* Shutter speed is calculated based on the limits of the frame durations. */\n \tmode_.minShutter = helper_->exposure(shutterCtrl.min().get<int32_t>(), mode_.minLineLength);\n \tmode_.maxShutter = Duration::max();\n", "prefixes": [] }