Show a patch.

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

{
    "id": 15406,
    "url": "https://patchwork.libcamera.org/api/patches/15406/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/15406/",
    "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": "<20220303155322.525946-1-umang.jain@ideasonboard.com>",
    "date": "2022-03-03T15:53:22",
    "name": "[libcamera-devel,2/2] ipa: ipu3: Ensure controls exists in updateSessionConfiguration()",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "ffa5f72bcc58c36156b2c5dd05ae02c3afd85493",
    "submitter": {
        "id": 86,
        "url": "https://patchwork.libcamera.org/api/people/86/?format=api",
        "name": "Umang Jain",
        "email": "umang.jain@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/15406/mbox/",
    "series": [
        {
            "id": 2945,
            "url": "https://patchwork.libcamera.org/api/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/15406/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/15406/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 2B860BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  3 Mar 2022 15:53:38 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CEA1A60475;\n\tThu,  3 Mar 2022 16:53:37 +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 8DEF5601FF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  3 Mar 2022 16:53:36 +0100 (CET)",
            "from perceval.ideasonboard.com (unknown [103.251.226.47])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 3DBC9885;\n\tThu,  3 Mar 2022 16:53:34 +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=\"oxpYR1c9\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1646322816;\n\tbh=hF/YEMh/XHW/4FWsj5zrsbFi1cD4pp/tDPJQuo2ZL0w=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=oxpYR1c9bBPrHulUgBg6u7RHku/OT+WDo0EDEmY9Fpe2yNVLz6zNd7optnnZgr4nb\n\tZOspq/UkxAQawupSfwlwxHd9PiGZT4xEuRBS+2f1Xqk+6zwWsph7psVDhCgU/Mo5UM\n\t4j4pJS1Q3urdWt6OrG2eSD8qrnSCqvAdbX0URYwI=",
        "From": "Umang Jain <umang.jain@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu,  3 Mar 2022 21:23:22 +0530",
        "Message-Id": "<20220303155322.525946-1-umang.jain@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.31.1",
        "In-Reply-To": "<20220301075919.201968-1-umang.jain@ideasonboard.com>",
        "References": "<20220301075919.201968-1-umang.jain@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 2/2] ipa: ipu3: Ensure controls exists in\n\tupdateSessionConfiguration()",
        "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 control-not-found error checking for the controls being\nqueried in IPAIPU3::updateSessionConfiguration().\n\nSigned-off-by: Umang Jain <umang.jain@ideasonboard.com>\n---\n src/ipa/ipu3/ipu3.cpp | 31 +++++++++++++++++++++++--------\n 1 file changed, 23 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\nindex 7b190217..6e4aa674 100644\n--- a/src/ipa/ipu3/ipu3.cpp\n+++ b/src/ipa/ipu3/ipu3.cpp\n@@ -180,16 +180,31 @@ private:\n  */\n void IPAIPU3::updateSessionConfiguration(const ControlInfoMap &sensorControls)\n {\n-\tconst ControlInfo vBlank = sensorControls.find(V4L2_CID_VBLANK)->second;\n-\tcontext_.configuration.sensor.defVBlank = vBlank.def().get<int32_t>();\n+\tconst auto itVBlank = sensorControls.find(V4L2_CID_VBLANK);\n+\tif (itVBlank == sensorControls.end()) {\n+\t\tLOG(IPAIPU3, Error) << \"Can't find vblank control\";\n+\t\treturn;\n+\t}\n \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+\tcontext_.configuration.sensor.defVBlank = itVBlank->second.def().get<int32_t>();\n+\n+\tconst auto itExp = sensorControls.find(V4L2_CID_EXPOSURE);\n+\tif (itExp == sensorControls.end()) {\n+\t\tLOG(IPAIPU3, Error) << \"Can't find exposure control\";\n+\t\treturn;\n+\t}\n+\n+\tint32_t minExposure = itExp->second.min().get<int32_t>();\n+\tint32_t maxExposure = itExp->second.max().get<int32_t>();\n+\n+\tconst auto itGain = sensorControls.find(V4L2_CID_ANALOGUE_GAIN);\n+\tif (itGain == sensorControls.end()) {\n+\t\tLOG(IPAIPU3, Error) << \"Can't find analogue gain control\";\n+\t\treturn;\n+\t}\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+\tint32_t minGain = itGain->second.min().get<int32_t>();\n+\tint32_t maxGain = itGain->second.max().get<int32_t>();\n \n \t/*\n \t * When the AGC computes the new exposure values for a frame, it needs\n",
    "prefixes": [
        "libcamera-devel",
        "2/2"
    ]
}