Show a patch.

GET /api/1.1/patches/17167/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 17167,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/17167/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/17167/",
    "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": "<20220818094410.1671-13-jacopo@jmondi.org>",
    "date": "2022-08-18T09:44:05",
    "name": "[libcamera-devel,v3,12/17] ipa: ipu3: Compute line duration at configure() time",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "7b96a2989398e90905793b31227ac970370f10f9",
    "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/17167/mbox/",
    "series": [
        {
            "id": 3426,
            "url": "https://patchwork.libcamera.org/api/1.1/series/3426/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3426",
            "date": "2022-08-18T09:43:53",
            "name": "libcamera: Align IPU3 and RKISP1 interfaces",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/3426/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/17167/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/17167/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 36097C3275\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 18 Aug 2022 09:44:40 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E972961FD4;\n\tThu, 18 Aug 2022 11:44:39 +0200 (CEST)",
            "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 0C73E61FCD\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 18 Aug 2022 11:44:35 +0200 (CEST)",
            "(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id 3454FFF808;\n\tThu, 18 Aug 2022 09:44:33 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1660815879;\n\tbh=+uybV4qf1Od8cQF4W78+yEOQts6G9bmIEMK8TVkNhb4=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=RG2nAC31cAHURskJ9qN9hYAMCOV5nWRgS/4GI9TT19axSzu65N3gUIiropNYCBQzt\n\tUQg7T63Hm/LgEKDwQOjvyKtmVh2ZzBXQA6mhGCXWVZMudkinKtymhn0PBTUak4ca3s\n\tcVug6twIRPe0eTs7C/gGsRAiqfmk1xEHgQGXgcbqmxRJWwcZQW82FxKNe+Q+PoTXJu\n\tbg4d05fS8Qa/GX4A7CGUEiGehWbsWeNh3JQ5LNb+FXTLvvImNHxu0pZqm7BhIT3uSw\n\tk3DIPHIvbvvlhrf1l1R3L5jhmbgFHh2itwbJCw84RsB7Bs012LRKKczHx++8VMJejp\n\tJA3gjFoQdjAzA==",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 18 Aug 2022 11:44:05 +0200",
        "Message-Id": "<20220818094410.1671-13-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.37.2",
        "In-Reply-To": "<20220818094410.1671-1-jacopo@jmondi.org>",
        "References": "<20220818094410.1671-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v3 12/17] ipa: ipu3: Compute line duration\n\tat configure() time",
        "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>",
        "From": "Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Jacopo Mondi <jacopo@jmondi.org>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "The IPU3 IPA module computes the sensor line duration at initialization\ntime only. As the sensor line duration varies according to the applied\nconfiguration, re-compute it at IPA::configure() time as well.\n\nWhile at it, remove the initialization of lineDuration_ from IPA::init()\nas it only generates confusion to see it there.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/ipa/ipu3/ipu3.cpp | 12 ++++++++----\n 1 file changed, 8 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\nindex eabf179aaa0a..077cf8050508 100644\n--- a/src/ipa/ipu3/ipu3.cpp\n+++ b/src/ipa/ipu3/ipu3.cpp\n@@ -164,7 +164,7 @@ private:\n \tvoid updateControls(const IPACameraSensorInfo &sensorInfo,\n \t\t\t    const ControlInfoMap &sensorControls,\n \t\t\t    ControlInfoMap *ipaControls);\n-\tvoid updateSessionConfiguration(const ControlInfoMap &sensorControls);\n+\tvoid updateSessionConfiguration(const IPAConfigInfo &configInfo);\n \n \tbool validateSensorControls();\n \n@@ -194,8 +194,11 @@ std::string IPAIPU3::logPrefix() const\n  * \\brief Compute IPASessionConfiguration using the sensor information and the\n  * sensor V4L2 controls\n  */\n-void IPAIPU3::updateSessionConfiguration(const ControlInfoMap &sensorControls)\n+void IPAIPU3::updateSessionConfiguration(const IPAConfigInfo &configInfo)\n {\n+\tconst IPACameraSensorInfo &sensorInfo = configInfo.sensorInfo;\n+\tconst ControlInfoMap &sensorControls = configInfo.sensorControls;\n+\n \tconst ControlInfo vBlank = sensorControls.find(V4L2_CID_VBLANK)->second;\n \tcontext_.configuration.sensor.defVBlank = vBlank.def().get<int32_t>();\n \n@@ -218,6 +221,8 @@ void IPAIPU3::updateSessionConfiguration(const ControlInfoMap &sensorControls)\n \t *\n \t * \\todo take VBLANK into account for maximum shutter speed\n \t */\n+\tcontext_.configuration.sensor.lineDuration = sensorInfo.lineLength * 1.0s\n+\t\t\t\t\t\t   / sensorInfo.pixelRate;\n \tcontext_.configuration.agc.minShutterSpeed = minExposure * context_.configuration.sensor.lineDuration;\n \tcontext_.configuration.agc.maxShutterSpeed = maxExposure * context_.configuration.sensor.lineDuration;\n \tcontext_.configuration.agc.minAnalogueGain = camHelper_->gain(minGain);\n@@ -330,7 +335,6 @@ int IPAIPU3::init(const IPASettings &settings,\n \n \t/* Clean context */\n \tcontext_.configuration = {};\n-\tcontext_.configuration.sensor.lineDuration = sensorInfo.lineLength * 1.0s / sensorInfo.pixelRate;\n \n \t/* Load the tuning data file. */\n \tFile file(settings.configurationFile.c_str());\n@@ -504,7 +508,7 @@ int IPAIPU3::configure(const IPAConfigInfo &configInfo,\n \tupdateControls(sensorInfo_, sensorCtrls_, ipaControls);\n \n \t/* Update the IPASessionConfiguration using the sensor settings. */\n-\tupdateSessionConfiguration(sensorCtrls_);\n+\tupdateSessionConfiguration(configInfo);\n \n \tfor (auto const &algo : algorithms()) {\n \t\tint ret = algo->configure(context_, configInfo);\n",
    "prefixes": [
        "libcamera-devel",
        "v3",
        "12/17"
    ]
}