Show a patch.

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

{
    "id": 18151,
    "url": "https://patchwork.libcamera.org/api/patches/18151/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/18151/",
    "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": "<20230119104544.9456-4-naush@raspberrypi.com>",
    "date": "2023-01-19T10:45:33",
    "name": "[libcamera-devel,v1,03/14] pipeline: ipa: raspberrypi: Replace entityControls",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "f02809680cdd634d976944e4c036cc10e1bac481",
    "submitter": {
        "id": 34,
        "url": "https://patchwork.libcamera.org/api/people/34/?format=api",
        "name": "Naushir Patuck",
        "email": "naush@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/18151/mbox/",
    "series": [
        {
            "id": 3715,
            "url": "https://patchwork.libcamera.org/api/series/3715/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3715",
            "date": "2023-01-19T10:45:30",
            "name": "Raspberry Pi: Camera Module 3 support",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/3715/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/18151/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/18151/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 32662BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 19 Jan 2023 10:46:01 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id ECF9F625FA;\n\tThu, 19 Jan 2023 11:46:00 +0100 (CET)",
            "from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com\n\t[IPv6:2a00:1450:4864:20::32b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D2AC7625EA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 19 Jan 2023 11:45:54 +0100 (CET)",
            "by mail-wm1-x32b.google.com with SMTP id\n\td4-20020a05600c3ac400b003db1de2aef0so929578wms.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 19 Jan 2023 02:45:54 -0800 (PST)",
            "from localhost.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tbe12-20020a05600c1e8c00b003db06224953sm5332029wmb.41.2023.01.19.02.45.53\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 19 Jan 2023 02:45:53 -0800 (PST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1674125160;\n\tbh=xfPh4Disv4iEifN3/oiLgQOVZPel27wJl9JloUjFs6w=;\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:Cc:\n\tFrom;\n\tb=g7CAzrSyzZQAanKkyQXjkYzxClL93Kz9JrSPlH70HR4CTUGawnqBpDlU9xyXDTIzm\n\t6qnBrz0Kz6Pvq9O0oYTiFBCxH76T8Sck7Y5RT0KdcFjwUKJDBiTqxWbaR0lJjV8S/B\n\t0vX4CEIqTTeJN+KcDylSzvzuP2p8KecfUfTvyN+CBB8urb7Bg2+5Ne/N3gFu9BINbc\n\teFPzMYrgGcwReOqSalWbAwo7JrrSXVNRKotwYeueL05SCEwVq9s8IGAFAM704KhB4d\n\t5IPfQOJ7QMr+HjOFpv9oyYpJGp/dGFaB3WPoTLHo6qyj+154Zi+BfEkRPqEKOUBh8D\n\tiidpafIYTlgng==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=ezly2RwbrTh/0/n2/4eff8d0vIHmHXT728mYO/WrJoo=;\n\tb=FbbEYBJL7pmI5YNGBxf/07v08Lr3TE61GrMeMg3s5lZdYnTcrETDZUfoNEOrlNfHTY\n\tIloZdo/8GVHWArxvRSxLgbuBaGiEulbBQU4Y0qJv6rlE70idoOPC6BXExBfTdR01neiJ\n\tNuC/eByKQOCiZDDUfvNW0ZQS1XETCwJjWUbvpFrdx9Kw1d6oO3QMgTV+DM73Mmr55ELJ\n\tg7BaOGm7+OF0c4tel+sMWOPGwPtRghVc1M2A+st0rwOPBAUNLC3IR3E5Lf0Bf6/ZC/DW\n\t9X42vqqZtqlqNVokuS63rI0AkDII1v09fx0d7fT7ij1sjYbdrnSSowINwf/Qm5GG9WtC\n\ty6Zg=="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"FbbEYBJL\"; dkim-atps=neutral",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=ezly2RwbrTh/0/n2/4eff8d0vIHmHXT728mYO/WrJoo=;\n\tb=OPpRjqmIqwEeaoeDStJ66W7HG/CdLTxJu5COErHkD6s3JhU5B/z52IdvEDr4tP+F/t\n\t6Kg9PsYIsV78PO00x9SumAIiDs4OyksCo8MB5J33NO2Lnm5DjMc35PkqAUuGAWo+sCC+\n\toyItiE+Hd1PgwphtdO23NafS2j/SJiGBGu3is6S6OLJ1s1RWEjf/GtJ1NNMHAFgxkeZ2\n\tgRQG7nuE3n14S4HjXWacpdjWl51ZqjIGNBc6JS1gHwNLazhg5jSYepDOxsLt+Xz/UzEE\n\tixGoYeEhRt2plpNyHtjE5gvTpd/+phSywH8pIFBpPH0JyMup2mHupZuKcWu9ml31IViV\n\tyE4g==",
        "X-Gm-Message-State": "AFqh2koHphb/DfZfqc3gLoqKacv9ruc0Td+YyRnyvqpW9Sm1Egxv1XkI\n\t/gIEbYAM/8+NAHdAd2HwJx+9OS8TnM9NyXQh0Wc=",
        "X-Google-Smtp-Source": "AMrXdXvCc40UAm8C7T0Z1zNusQ9VG5JdC/lXBUTDcxnqu09qSUJ2QsgFc4x3Ew+MIET1AYscyIfY8w==",
        "X-Received": "by 2002:a05:600c:224b:b0:3d2:640:c4e5 with SMTP id\n\ta11-20020a05600c224b00b003d20640c4e5mr9842512wmm.8.1674125153842; \n\tThu, 19 Jan 2023 02:45:53 -0800 (PST)",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 19 Jan 2023 10:45:33 +0000",
        "Message-Id": "<20230119104544.9456-4-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20230119104544.9456-1-naush@raspberrypi.com>",
        "References": "<20230119104544.9456-1-naush@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v1 03/14] pipeline: ipa: raspberrypi:\n\tReplace entityControls",
        "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": "Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Naushir Patuck <naush@raspberrypi.com>",
        "Cc": "Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Replace the legacy entityControls map passed into ipa::configure() with explicit\nfields for sensor and ISP controls. This removes any ambiguity over which set of\ncontrols corresponds with specific integer keys.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>\nReviewed-by: David Plowman <david.plowman@raspberrypi.com>\n---\n include/libcamera/ipa/raspberrypi.mojom         |  4 ++--\n src/ipa/raspberrypi/raspberrypi.cpp             | 17 ++++-------------\n .../pipeline/raspberrypi/raspberrypi.cpp        |  7 +++----\n 3 files changed, 9 insertions(+), 19 deletions(-)",
    "diff": "diff --git a/include/libcamera/ipa/raspberrypi.mojom b/include/libcamera/ipa/raspberrypi.mojom\nindex 0732496968ed..2a4821fbc0ef 100644\n--- a/include/libcamera/ipa/raspberrypi.mojom\n+++ b/include/libcamera/ipa/raspberrypi.mojom\n@@ -36,6 +36,8 @@ struct ISPConfig {\n struct IPAConfig {\n \tuint32 transform;\n \tlibcamera.SharedFD lsTableHandle;\n+\tlibcamera.ControlInfoMap sensorControls;\n+\tlibcamera.ControlInfoMap ispControls;\n };\n \n struct IPAConfigResult {\n@@ -59,7 +61,6 @@ interface IPARPiInterface {\n \t * \\fn configure()\n \t * \\brief Configure the IPA stream and sensor settings\n \t * \\param[in] sensorInfo Camera sensor information\n-\t * \\param[in] entityControls Controls provided by the pipeline entities\n \t * \\param[in] ipaConfig Pipeline-handler-specific configuration data\n \t * \\param[out] controls Controls to apply by the pipeline entity\n \t * \\param[out] result Other results that the pipeline handler may require\n@@ -74,7 +75,6 @@ interface IPARPiInterface {\n \t * pipeline handler to the IPA and back.\n \t */\n \tconfigure(libcamera.IPACameraSensorInfo sensorInfo,\n-\t\t  map<uint32, libcamera.ControlInfoMap> entityControls,\n \t\t  IPAConfig ipaConfig)\n \t\t=> (int32 ret, libcamera.ControlList controls, IPAConfigResult result);\n \ndiff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\nindex f748b6e2dac7..aa18ed750370 100644\n--- a/src/ipa/raspberrypi/raspberrypi.cpp\n+++ b/src/ipa/raspberrypi/raspberrypi.cpp\n@@ -119,9 +119,7 @@ public:\n \tvoid start(const ControlList &controls, StartConfig *startConfig) override;\n \tvoid stop() override {}\n \n-\tint configure(const IPACameraSensorInfo &sensorInfo,\n-\t\t      const std::map<unsigned int, ControlInfoMap> &entityControls,\n-\t\t      const IPAConfig &data,\n+\tint configure(const IPACameraSensorInfo &sensorInfo, const IPAConfig &data,\n \t\t      ControlList *controls, IPAConfigResult *result) override;\n \tvoid mapBuffers(const std::vector<IPABuffer> &buffers) override;\n \tvoid unmapBuffers(const std::vector<unsigned int> &ids) override;\n@@ -380,18 +378,11 @@ void IPARPi::setMode(const IPACameraSensorInfo &sensorInfo)\n \tmode_.sensitivity = helper_->getModeSensitivity(mode_);\n }\n \n-int IPARPi::configure(const IPACameraSensorInfo &sensorInfo,\n-\t\t      const std::map<unsigned int, ControlInfoMap> &entityControls,\n-\t\t      const IPAConfig &ipaConfig,\n+int IPARPi::configure(const IPACameraSensorInfo &sensorInfo, const IPAConfig &ipaConfig,\n \t\t      ControlList *controls, IPAConfigResult *result)\n {\n-\tif (entityControls.size() != 2) {\n-\t\tLOG(IPARPI, Error) << \"No ISP or sensor controls found.\";\n-\t\treturn -1;\n-\t}\n-\n-\tsensorCtrls_ = entityControls.at(0);\n-\tispCtrls_ = entityControls.at(1);\n+\tsensorCtrls_ = ipaConfig.sensorControls;\n+\tispCtrls_ = ipaConfig.ispControls;\n \n \tif (!validateSensorControls()) {\n \t\tLOG(IPARPI, Error) << \"Sensor control validation failed.\";\ndiff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex 272767b5263b..9dd36cbaea78 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -1615,8 +1615,8 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config, ipa::RPi::IPA\n \tstd::map<unsigned int, ControlInfoMap> entityControls;\n \tipa::RPi::IPAConfig ipaConfig;\n \n-\tentityControls.emplace(0, sensor_->controls());\n-\tentityControls.emplace(1, isp_[Isp::Input].dev()->controls());\n+\tipaConfig.sensorControls = sensor_->controls();\n+\tipaConfig.ispControls = isp_[Isp::Input].dev()->controls();\n \n \t/* Always send the user transform to the IPA. */\n \tipaConfig.transform = static_cast<unsigned int>(config->transform);\n@@ -1644,8 +1644,7 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config, ipa::RPi::IPA\n \n \t/* Ready the IPA - it must know about the sensor resolution. */\n \tControlList controls;\n-\tret = ipa_->configure(sensorInfo_, entityControls, ipaConfig,\n-\t\t\t      &controls, result);\n+\tret = ipa_->configure(sensorInfo_, ipaConfig, &controls, result);\n \tif (ret < 0) {\n \t\tLOG(RPI, Error) << \"IPA configuration failed!\";\n \t\treturn -EPIPE;\n",
    "prefixes": [
        "libcamera-devel",
        "v1",
        "03/14"
    ]
}