Show a patch.

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

{
    "id": 15537,
    "url": "https://patchwork.libcamera.org/api/patches/15537/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/15537/",
    "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": "<20220324142035.47338-2-umang.jain@ideasonboard.com>",
    "date": "2022-03-24T14:20:33",
    "name": "[libcamera-devel,v3,1/3] ipa: ipu3: Consolidate querying of exposure and gain limits",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "86dccda865935b81e35ce129581843efab569566",
    "submitter": {
        "id": 86,
        "url": "https://patchwork.libcamera.org/api/people/86/?format=api",
        "name": "Umang Jain",
        "email": "umang.jain@ideasonboard.com"
    },
    "delegate": {
        "id": 12,
        "url": "https://patchwork.libcamera.org/api/users/12/?format=api",
        "username": "uajain",
        "first_name": "Umang",
        "last_name": "Jain",
        "email": "umang.jain@ideasonboard.com"
    },
    "mbox": "https://patchwork.libcamera.org/patch/15537/mbox/",
    "series": [
        {
            "id": 2997,
            "url": "https://patchwork.libcamera.org/api/series/2997/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2997",
            "date": "2022-03-24T14:20:32",
            "name": "ipa: ipu3: Consolidate querying of exposure and gain limits",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/2997/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/15537/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/15537/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 27730C0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 24 Mar 2022 14:20:51 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D683B604DC;\n\tThu, 24 Mar 2022 15:20:50 +0100 (CET)",
            "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 00E36604C5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 24 Mar 2022 15:20:50 +0100 (CET)",
            "from perceval.ideasonboard.com (unknown [103.86.18.100])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id CF6EC1844;\n\tThu, 24 Mar 2022 15:20:47 +0100 (CET)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1648131650;\n\tbh=fJGnPQcF6+WjdHb+G9AEYuD6P2KgQ6wmQ0JA0UEGD8U=;\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=mQdNzwBBvQe2P46EtPwUzI7s/iLHQCTgOC94dk2iFCsDeuJmwTS5LpJu2msyZDnhO\n\tPrsqk4XGHZqhnHUk20fAPGi+a4X0gaGJ65MibFKqaMxBCX5pgpIIXjE9ybs8BsbPvE\n\teClp/T69RnuqPkxVYir0pOJKy2iUX0BN/tVkwLl4koDy5tGOjvB1hu8c6jLncz1o//\n\tgs6FJR8B7ci4dyakzZEZG9cpz8vK6PLGfpnyMW8sNOmYa0MEVHboSdzQwJ8cSEVLef\n\tIPxexJ3sDUMiksxXtND1pCPY9Umbr90pj+vK1YmjVVdR3KO5aw+0QBt28Q3/m7vcY8\n\t6m2pspE8xJB0Q==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1648131649;\n\tbh=fJGnPQcF6+WjdHb+G9AEYuD6P2KgQ6wmQ0JA0UEGD8U=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=qRDIlR0Ojznxl+w31qbOUbaOmcsQthdtbmu5W6b0PcESoYww0c7csB/qVEtg/WEJm\n\tDsLx5lWKpMeywcRLHdr8iHmfbyODoI/KbKvlR9NO5Cqpfhts7muDeS83FXnrDiLzZ/\n\te+symclSGMVkawvz54ZvKEp1IR/ufJPZbUkBKCFs="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"qRDIlR0O\"; dkim-atps=neutral",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 24 Mar 2022 19:50:33 +0530",
        "Message-Id": "<20220324142035.47338-2-umang.jain@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.31.1",
        "In-Reply-To": "<20220324142035.47338-1-umang.jain@ideasonboard.com>",
        "References": "<20220324142035.47338-1-umang.jain@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v3 1/3] ipa: ipu3: Consolidate querying of\n\texposure and gain limits",
        "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": "Umang Jain via libcamera-devel <libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Umang Jain <umang.jain@ideasonboard.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "The exposure and gain limits are required for AGC configuration\nhandled in IPAIPU3::updateSessionConfiguration(), which is happening\nalready. Therefore the max/min private members in IPAIPU3 class for\nexposure/gain serve no use except setting initial values of exposure_\nand gain_ members.\n\nDrop the max/min private members from IPAIPU3 class and set initial\ngain_ and exposure_ in  IPAIPU3::updateSessionConfiguration().\n\nSigned-off-by: Umang Jain <umang.jain@ideasonboard.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n src/ipa/ipu3/ipu3.cpp | 26 ++------------------------\n 1 file changed, 2 insertions(+), 24 deletions(-)",
    "diff": "diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\nindex 1ea2c898..a8cc2f6c 100644\n--- a/src/ipa/ipu3/ipu3.cpp\n+++ b/src/ipa/ipu3/ipu3.cpp\n@@ -169,11 +169,7 @@ private:\n \t/* Camera sensor controls. */\n \tuint32_t defVBlank_;\n \tuint32_t exposure_;\n-\tuint32_t minExposure_;\n-\tuint32_t maxExposure_;\n \tuint32_t gain_;\n-\tuint32_t minGain_;\n-\tuint32_t maxGain_;\n \n \t/* Interface to the Camera Helper */\n \tstd::unique_ptr<CameraSensorHelper> camHelper_;\n@@ -194,10 +190,12 @@ void IPAIPU3::updateSessionConfiguration(const ControlInfoMap &sensorControls)\n \tconst ControlInfo &v4l2Exposure = sensorControls.find(V4L2_CID_EXPOSURE)->second;\n \tint32_t minExposure = v4l2Exposure.min().get<int32_t>();\n \tint32_t maxExposure = v4l2Exposure.max().get<int32_t>();\n+\texposure_ = minExposure;\n \n \tconst ControlInfo &v4l2Gain = sensorControls.find(V4L2_CID_ANALOGUE_GAIN)->second;\n \tint32_t minGain = v4l2Gain.min().get<int32_t>();\n \tint32_t maxGain = v4l2Gain.max().get<int32_t>();\n+\tgain_ = minGain;\n \n \t/*\n \t * When the AGC computes the new exposure values for a frame, it needs\n@@ -434,32 +432,12 @@ int IPAIPU3::configure(const IPAConfigInfo &configInfo,\n \t */\n \tsensorCtrls_ = configInfo.sensorControls;\n \n-\tconst auto itExp = sensorCtrls_.find(V4L2_CID_EXPOSURE);\n-\tif (itExp == sensorCtrls_.end()) {\n-\t\tLOG(IPAIPU3, Error) << \"Can't find exposure control\";\n-\t\treturn -EINVAL;\n-\t}\n-\n-\tconst auto itGain = sensorCtrls_.find(V4L2_CID_ANALOGUE_GAIN);\n-\tif (itGain == sensorCtrls_.end()) {\n-\t\tLOG(IPAIPU3, Error) << \"Can't find gain control\";\n-\t\treturn -EINVAL;\n-\t}\n-\n \tconst auto itVBlank = sensorCtrls_.find(V4L2_CID_VBLANK);\n \tif (itVBlank == sensorCtrls_.end()) {\n \t\tLOG(IPAIPU3, Error) << \"Can't find VBLANK control\";\n \t\treturn -EINVAL;\n \t}\n \n-\tminExposure_ = itExp->second.min().get<int32_t>();\n-\tmaxExposure_ = itExp->second.max().get<int32_t>();\n-\texposure_ = minExposure_;\n-\n-\tminGain_ = itGain->second.min().get<int32_t>();\n-\tmaxGain_ = itGain->second.max().get<int32_t>();\n-\tgain_ = minGain_;\n-\n \tdefVBlank_ = itVBlank->second.def().get<int32_t>();\n \n \tcalculateBdsGrid(configInfo.bdsOutputSize);\n",
    "prefixes": [
        "libcamera-devel",
        "v3",
        "1/3"
    ]
}