Show a patch.

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

{
    "id": 15420,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/15420/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/15420/",
    "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": "<20220305172849.1022923-4-umang.jain@ideasonboard.com>",
    "date": "2022-03-05T17:28:49",
    "name": "[libcamera-devel,v2,3/3] 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/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/15420/mbox/",
    "series": [
        {
            "id": 2951,
            "url": "https://patchwork.libcamera.org/api/1.1/series/2951/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2951",
            "date": "2022-03-05T17:28:46",
            "name": "ipa: ipu3: Consolidate control limits into IPAContext",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/2951/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/15420/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/15420/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\r\n\t[92.243.16.209])\r\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 2D29ABE08A\r\n\tfor <parsemail@patchwork.libcamera.org>;\r\n\tSat,  5 Mar 2022 17:29:06 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\r\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E29156118E;\r\n\tSat,  5 Mar 2022 18:29:05 +0100 (CET)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\r\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\r\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A4EC061190\r\n\tfor <libcamera-devel@lists.libcamera.org>;\r\n\tSat,  5 Mar 2022 18:29:04 +0100 (CET)",
            "from perceval.ideasonboard.com (unknown [103.251.226.47])\r\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 51F1F486;\r\n\tSat,  5 Mar 2022 18:29:03 +0100 (CET)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\r\n\ts=mail; t=1646501345;\r\n\tbh=Dra6j4U9wXK1bxGWxix8iPA+iBh2aObdr9gHvtZO8yQ=;\r\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\r\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\r\n\tFrom;\r\n\tb=k/P+F6sYbtaKrKeAYdGJP+Lgu9jRcQb8NjrKwPK50FtHZynyRLIeH2gCbdouO1T4+\r\n\t7jXESkZU+3IsmvJfcTmoW2+5+zdbkptvAVwi+2cPuQfaAmYpghaeBcCMdmnrPoGmqM\r\n\tBfSXNK02QBLVEE0e48PCVKm1Fu1voM9ncd6jTYfWa5loN1+AhWfUxvFVIKpD6Rx28y\r\n\tznxTJly1DzxQZQ9O8838lFoDOdD5tyCKLHd6eMQoxy39V6td0QZMjTArJDAPQ1jISI\r\n\tDOZ7gDqzy8q7l5oxYGFbuMo2PVnPybbGa2zsMiGd0hKQlFaE/+KGLeY8QV8RJiJ0t3\r\n\tP4/8vuz2pDpdg==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\r\n\ts=mail; t=1646501344;\r\n\tbh=Dra6j4U9wXK1bxGWxix8iPA+iBh2aObdr9gHvtZO8yQ=;\r\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\r\n\tb=oeaboy7rDCcmiw9C9s6wSSRmEl1RmfUzu6u7MkiXjKb06T1wO7wf7BUA0XbG6MTd7\r\n\tS6L7JAs0sw5t8BZLvDIZiWmY0cbvxnawWoYMKRbBIKSaxuHO4Ss/Z0fPd8+czg3Qcv\r\n\tWgvO/ZsRxe+/8h6kryZojqCszJaps+aqehjFA8p8="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \r\n\tunprotected) header.d=ideasonboard.com\r\n\theader.i=@ideasonboard.com\r\n\theader.b=\"oeaboy7r\"; dkim-atps=neutral",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Sat,  5 Mar 2022 22:58:49 +0530",
        "Message-Id": "<20220305172849.1022923-4-umang.jain@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.31.1",
        "In-Reply-To": "<20220305172849.1022923-1-umang.jain@ideasonboard.com>",
        "References": "<20220305172849.1022923-1-umang.jain@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v2 3/3] ipa: ipu3: Ensure controls exists\r\n\tin updateSessionConfiguration()",
        "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>,\r\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>,\r\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": "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\r\nindex 0df358ba..583d6b9a 100644\r\n--- a/src/ipa/ipu3/ipu3.cpp\r\n+++ b/src/ipa/ipu3/ipu3.cpp\r\n@@ -180,16 +180,31 @@ private:\r\n  */\r\n void IPAIPU3::updateSessionConfiguration(const ControlInfoMap &sensorControls)\r\n {\r\n-\tconst ControlInfo vBlank = sensorControls.find(V4L2_CID_VBLANK)->second;\r\n-\tcontext_.configuration.sensor.defVBlank = vBlank.def().get<int32_t>();\r\n+\tconst auto itVBlank = sensorControls.find(V4L2_CID_VBLANK);\r\n+\tif (itVBlank == sensorControls.end()) {\r\n+\t\tLOG(IPAIPU3, Error) << \"Can't find vblank control\";\r\n+\t\treturn;\r\n+\t}\r\n \r\n-\tconst ControlInfo &v4l2Exposure = sensorControls.find(V4L2_CID_EXPOSURE)->second;\r\n-\tint32_t minExposure = v4l2Exposure.min().get<int32_t>();\r\n-\tint32_t maxExposure = v4l2Exposure.max().get<int32_t>();\r\n+\tcontext_.configuration.sensor.defVBlank = itVBlank->second.def().get<int32_t>();\r\n+\r\n+\tconst auto itExp = sensorControls.find(V4L2_CID_EXPOSURE);\r\n+\tif (itExp == sensorControls.end()) {\r\n+\t\tLOG(IPAIPU3, Error) << \"Can't find exposure control\";\r\n+\t\treturn;\r\n+\t}\r\n+\r\n+\tint32_t minExposure = itExp->second.min().get<int32_t>();\r\n+\tint32_t maxExposure = itExp->second.max().get<int32_t>();\r\n+\r\n+\tconst auto itGain = sensorControls.find(V4L2_CID_ANALOGUE_GAIN);\r\n+\tif (itGain == sensorControls.end()) {\r\n+\t\tLOG(IPAIPU3, Error) << \"Can't find analogue gain control\";\r\n+\t\treturn;\r\n+\t}\r\n \r\n-\tconst ControlInfo &v4l2Gain = sensorControls.find(V4L2_CID_ANALOGUE_GAIN)->second;\r\n-\tint32_t minGain = v4l2Gain.min().get<int32_t>();\r\n-\tint32_t maxGain = v4l2Gain.max().get<int32_t>();\r\n+\tint32_t minGain = itGain->second.min().get<int32_t>();\r\n+\tint32_t maxGain = itGain->second.max().get<int32_t>();\r\n \r\n \t/*\r\n \t * When the AGC computes the new exposure values for a frame, it needs",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "3/3"
    ]
}