Show a patch.

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

{
    "id": 11673,
    "url": "https://patchwork.libcamera.org/api/patches/11673/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/11673/",
    "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": "<20210323143610.787760-8-naush@raspberrypi.com>",
    "date": "2021-03-23T14:36:10",
    "name": "[libcamera-devel,v3,7/7] ipa: raspberrypi: Rationalise parameters to ipa::configure()",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "ec416ab71ee6c1d0c03c44c9e3e8b10c47d9570f",
    "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/11673/mbox/",
    "series": [
        {
            "id": 1823,
            "url": "https://patchwork.libcamera.org/api/series/1823/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1823",
            "date": "2021-03-23T14:36:03",
            "name": "Raspberry Pi: ipa::init() restructuring",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/1823/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/11673/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/11673/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 3ECCAC32E5\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 23 Mar 2021 14:36:30 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EFFA468D79;\n\tTue, 23 Mar 2021 15:36:29 +0100 (CET)",
            "from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com\n\t[IPv6:2a00:1450:4864:20::52d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A607B68D70\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 23 Mar 2021 15:36:23 +0100 (CET)",
            "by mail-ed1-x52d.google.com with SMTP id j3so23673193edp.11\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 23 Mar 2021 07:36:23 -0700 (PDT)",
            "from naush-laptop.patuck.local ([88.97.76.4])\n\tby smtp.gmail.com with ESMTPSA id\n\tn6sm11282430eji.37.2021.03.23.07.36.22\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 23 Mar 2021 07:36:22 -0700 (PDT)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"d38wnSNI\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=MjuUN3XXLe4QH8PuBMguhkBjRZOS/nt2VbKQfSafdxw=;\n\tb=d38wnSNIZItkiM8HZv2YsHDoKqHzGrKxUJFJ0VZAAYgLiaMA0lX+dFUhWh7ersvIDI\n\tE1UqFFBroKDnL1JSXA/e9f8qV/Aw8tQxiIjhkOU2VlVN/3IIeTBj5Ljy+vMoK5KtTOm/\n\thU1tnhPPqiIT9h0GbvUtqRx2Awd/0YxSRi+GyMOstYeKPnFanH3ISxkJ42C0F85UfCXq\n\t6P9cx8iQVtfIixtmbsCAEWoMfa29Irnwuq2qF74CIaIw7ZEMKMP+kyhC+zNyutMkVXLM\n\tUxm0uB+n3wT600XQDVn85iuGrzYU1505jdQK98fVmhb+V+tNqALXT4x1x55nJ8cCW/Kh\n\tio4Q==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=MjuUN3XXLe4QH8PuBMguhkBjRZOS/nt2VbKQfSafdxw=;\n\tb=MlcQgblgNxqA/9faD3uBbmchLsh8lUODFEJxdDg4vNxxSu4ZH8xhF6r/ZYCpSBUiEO\n\t90pBjmMHYc6vYK/yx2GHdv4+ue01MGUSJsWvC9JfxrltkeleW6Y23gH9ed7eH3lJd50g\n\t1GmRt7vQkDdGUGYznVtOsEo+1uDSr+zKf+Y1x6WZu+f1yRIhMwxwL7daYQJoTKYpw/5N\n\t+rXgI8XuIve5Zp+se//kVFUejpQDjjeXSr5kfZPrnXi/B18fQsKb/dVeUWjFJ1lo9pae\n\t4swXMtG3b4MpMd0b2EBhCPF6cdtavX0I3BtiigsM8sre/1CgengLtpzFpIq+qwFtQ9mO\n\tgbuQ==",
        "X-Gm-Message-State": "AOAM5333qLC+SxQyzQDtiSLp10g6I0tqfBMpQ61tIVljyVstVOEdyf92\n\tzh0H6do+pvf99OysZeTy27Wqeo026ZsLiw==",
        "X-Google-Smtp-Source": "ABdhPJz97f1EnFFz5pzLkR8Gps0U6YMGwlb6LZOmbPhy8Nqfz4ohwrZ2cmY4MXY4Qzc5Csgfv79aqw==",
        "X-Received": "by 2002:aa7:c398:: with SMTP id k24mr4911468edq.61.1616510183064;\n\tTue, 23 Mar 2021 07:36:23 -0700 (PDT)",
        "From": "Naushir Patuck <naush@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue, 23 Mar 2021 14:36:10 +0000",
        "Message-Id": "<20210323143610.787760-8-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20210323143610.787760-1-naush@raspberrypi.com>",
        "References": "<20210323143610.787760-1-naush@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH v3 7/7] ipa: raspberrypi: Rationalise\n\tparameters to ipa::configure()",
        "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>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Rename ConfigInput to IPAConfig to be more consistent with the naming,\nand remove ConfigInput::op, as it is never used.\n\nReplace ConfigOutput with a ControlList type, as that is the only return\ntype from ipa::configure().\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nTested-by: David Plowman <david.plowman@raspberrypi.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n include/libcamera/ipa/raspberrypi.mojom           | 15 +++++----------\n src/ipa/raspberrypi/raspberrypi.cpp               | 11 ++++++-----\n .../pipeline/raspberrypi/raspberrypi.cpp          | 13 +++++--------\n 3 files changed, 16 insertions(+), 23 deletions(-)",
    "diff": "diff --git a/include/libcamera/ipa/raspberrypi.mojom b/include/libcamera/ipa/raspberrypi.mojom\nindex 55824eebb700..f38c22611cc4 100644\n--- a/include/libcamera/ipa/raspberrypi.mojom\n+++ b/include/libcamera/ipa/raspberrypi.mojom\n@@ -29,16 +29,11 @@ struct ISPConfig {\n \tControlList controls;\n };\n \n-struct ConfigInput {\n-\tuint32 op;\n+struct IPAConfig {\n \tuint32 transform;\n \tFileDescriptor lsTableHandle;\n };\n \n-struct ConfigOutput {\n-\tControlList controls;\n-};\n-\n struct StartConfig {\n \tControlList controls;\n \tint32 dropFrameCount;\n@@ -56,7 +51,7 @@ interface IPARPiInterface {\n \t * \\param[in] streamConfig Configuration of all active streams\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] results Pipeline-handler-specific configuration result\n+\t * \\param[out] controls Controls to apply by the pipeline entity\n \t *\n \t * This method shall be called when the camera is configured to inform\n \t * the IPA of the camera's streams and the sensor settings.\n@@ -64,14 +59,14 @@ interface IPARPiInterface {\n \t * The \\a sensorInfo conveys information about the camera sensor settings that\n \t * the pipeline handler has selected for the configuration.\n \t *\n-\t * The \\a ipaConfig and \\a results parameters carry data passed by the\n+\t * The \\a ipaConfig and \\a controls parameters carry data passed by the\n \t * pipeline handler to the IPA and back.\n \t */\n \tconfigure(CameraSensorInfo sensorInfo,\n \t\t  map<uint32, IPAStream> streamConfig,\n \t\t  map<uint32, ControlInfoMap> entityControls,\n-\t\t  ConfigInput ipaConfig)\n-\t\t=> (int32 ret, ConfigOutput results);\n+\t\t  IPAConfig ipaConfig)\n+\t\t=> (int32 ret, ControlList controls);\n \n \t/**\n \t * \\fn mapBuffers()\ndiff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\nindex b717a83e14b5..1c928b72fbd0 100644\n--- a/src/ipa/raspberrypi/raspberrypi.cpp\n+++ b/src/ipa/raspberrypi/raspberrypi.cpp\n@@ -85,8 +85,8 @@ public:\n \tint configure(const CameraSensorInfo &sensorInfo,\n \t\t      const std::map<unsigned int, IPAStream> &streamConfig,\n \t\t      const std::map<unsigned int, ControlInfoMap> &entityControls,\n-\t\t      const ipa::RPi::ConfigInput &data,\n-\t\t      ipa::RPi::ConfigOutput *response) override;\n+\t\t      const ipa::RPi::IPAConfig &data,\n+\t\t      ControlList *controls) override;\n \tvoid mapBuffers(const std::vector<IPABuffer> &buffers) override;\n \tvoid unmapBuffers(const std::vector<unsigned int> &ids) override;\n \tvoid signalStatReady(const uint32_t bufferId) override;\n@@ -313,8 +313,8 @@ void IPARPi::setMode(const CameraSensorInfo &sensorInfo)\n int IPARPi::configure(const CameraSensorInfo &sensorInfo,\n \t\t      [[maybe_unused]] const std::map<unsigned int, IPAStream> &streamConfig,\n \t\t      const std::map<unsigned int, ControlInfoMap> &entityControls,\n-\t\t      const ipa::RPi::ConfigInput &ipaConfig,\n-\t\t      ipa::RPi::ConfigOutput *result)\n+\t\t      const ipa::RPi::IPAConfig &ipaConfig,\n+\t\t      ControlList *controls)\n {\n \tif (entityControls.size() != 2) {\n \t\tLOG(IPARPI, Error) << \"No ISP or sensor controls found.\";\n@@ -377,7 +377,8 @@ int IPARPi::configure(const CameraSensorInfo &sensorInfo,\n \t\tagcStatus.analogue_gain = DefaultAnalogueGain;\n \t\tapplyAGC(&agcStatus, ctrls);\n \n-\t\tresult->controls = std::move(ctrls);\n+\t\tASSERT(controls);\n+\t\t*controls = std::move(ctrls);\n \t}\n \n \treturn 0;\ndiff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex a65d53898362..2cac802c72e5 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -1236,7 +1236,7 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config)\n \n \tstd::map<unsigned int, IPAStream> streamConfig;\n \tstd::map<unsigned int, ControlInfoMap> entityControls;\n-\tipa::RPi::ConfigInput ipaConfig;\n+\tipa::RPi::IPAConfig ipaConfig;\n \n \t/* Get the device format to pass to the IPA. */\n \tV4L2DeviceFormat sensorFormat;\n@@ -1279,19 +1279,16 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config)\n \t}\n \n \t/* Ready the IPA - it must know about the sensor resolution. */\n-\tipa::RPi::ConfigOutput result;\n-\n+\tControlList controls;\n \tret = ipa_->configure(sensorInfo_, streamConfig, entityControls, ipaConfig,\n-\t\t\t      &result);\n+\t\t\t      &controls);\n \tif (ret < 0) {\n \t\tLOG(RPI, Error) << \"IPA configuration failed!\";\n \t\treturn -EPIPE;\n \t}\n \n-\tif (!result.controls.empty()) {\n-\t\tControlList &ctrls = result.controls;\n-\t\tunicam_[Unicam::Image].dev()->setControls(&ctrls);\n-\t}\n+\tif (!controls.empty())\n+\t\tunicam_[Unicam::Image].dev()->setControls(&controls);\n \n \t/*\n \t * Configure the H/V flip controls based on the combination of\n",
    "prefixes": [
        "libcamera-devel",
        "v3",
        "7/7"
    ]
}