Show a patch.

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

{
    "id": 15396,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/15396/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/15396/",
    "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": "<20220301075919.201968-1-umang.jain@ideasonboard.com>",
    "date": "2022-03-01T07:59:19",
    "name": "[libcamera-devel,v2] ipa: ipu3: Consolidate querying of exposure and gain limits",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "df594484da6a0112a72fe0bdec9dc224e7fae6b9",
    "submitter": {
        "id": 86,
        "url": "https://patchwork.libcamera.org/api/1.1/people/86/?format=api",
        "name": "Umang Jain",
        "email": "umang.jain@ideasonboard.com"
    },
    "delegate": {
        "id": 12,
        "url": "https://patchwork.libcamera.org/api/1.1/users/12/?format=api",
        "username": "uajain",
        "first_name": "Umang",
        "last_name": "Jain",
        "email": "umang.jain@ideasonboard.com"
    },
    "mbox": "https://patchwork.libcamera.org/patch/15396/mbox/",
    "series": [
        {
            "id": 2945,
            "url": "https://patchwork.libcamera.org/api/1.1/series/2945/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2945",
            "date": "2022-03-01T07:59:19",
            "name": "[libcamera-devel,v2] ipa: ipu3: Consolidate querying of exposure and gain limits",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/2945/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/15396/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/15396/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 0D3A3BE08A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  1 Mar 2022 07:59:30 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5FDBE61166;\n\tTue,  1 Mar 2022 08:59:29 +0100 (CET)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A3795604ED\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  1 Mar 2022 08:59:28 +0100 (CET)",
            "from perceval.ideasonboard.com (unknown [103.251.226.77])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 3723E478;\n\tTue,  1 Mar 2022 08:59:26 +0100 (CET)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"HMv/AnAI\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1646121568;\n\tbh=CBorNZRKGUit1VO0vApRkeK2qU8sy04nVtGQasmr6Ts=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=HMv/AnAIcVShV4zhiAFS51Chqh+WPqNyYs1o1ws9W0QGOZloNRyoDuGPtpkOaMiFU\n\tUMxN2KUruyT1RxxuFqPa9f4MKmGLwwZcsO4z7LGsQXHzluq2/kgQYRulvIQLaEx7AT\n\tgW1XgqxSmoMFO8k/wen3cx1r58AlheIDuFab5pOA=",
        "From": "Umang Jain <umang.jain@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue,  1 Mar 2022 13:29:19 +0530",
        "Message-Id": "<20220301075919.201968-1-umang.jain@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.31.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v2] 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>",
        "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>\n---\nChanges in v2:\n - Split into separate patch\n - Prepped over \"v4 ipa: ipu3: Misc clean up\"\n - Don't include max/min exposure/gain members in\n   IPASessionConfiguration, as they aren't used anywhere. \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 17324616..4b6852a7 100644\n--- a/src/ipa/ipu3/ipu3.cpp\n+++ b/src/ipa/ipu3/ipu3.cpp\n@@ -167,11 +167,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@@ -192,10 +188,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@@ -429,32 +427,12 @@ int IPAIPU3::configure(const IPAConfigInfo &configInfo,\n \t */\n \tctrls_ = configInfo.sensorControls;\n \n-\tconst auto itExp = ctrls_.find(V4L2_CID_EXPOSURE);\n-\tif (itExp == ctrls_.end()) {\n-\t\tLOG(IPAIPU3, Error) << \"Can't find exposure control\";\n-\t\treturn -EINVAL;\n-\t}\n-\n-\tconst auto itGain = ctrls_.find(V4L2_CID_ANALOGUE_GAIN);\n-\tif (itGain == ctrls_.end()) {\n-\t\tLOG(IPAIPU3, Error) << \"Can't find gain control\";\n-\t\treturn -EINVAL;\n-\t}\n-\n \tconst auto itVBlank = ctrls_.find(V4L2_CID_VBLANK);\n \tif (itVBlank == ctrls_.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",
        "v2"
    ]
}