Show a patch.

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

{
    "id": 10525,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/10525/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/10525/",
    "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": "<20201201095942.7280-1-laurent.pinchart@ideasonboard.com>",
    "date": "2020-12-01T09:59:42",
    "name": "[libcamera-devel] libcamera: ipa_interface: Make configure() return an int",
    "commit_ref": null,
    "pull_url": null,
    "state": "rejected",
    "archived": false,
    "hash": "6e9d7bf1e60bcf4b11ad90c88d8fa7e522bfcea3",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/10525/mbox/",
    "series": [
        {
            "id": 1493,
            "url": "https://patchwork.libcamera.org/api/1.1/series/1493/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1493",
            "date": "2020-12-01T09:59:42",
            "name": "[libcamera-devel] libcamera: ipa_interface: Make configure() return an int",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/1493/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/10525/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/10525/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 3E9E3BE177\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  1 Dec 2020 09:59:57 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C69EE634A1;\n\tTue,  1 Dec 2020 10:59:56 +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 7DF7D6032B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  1 Dec 2020 10:59:55 +0100 (CET)",
            "from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id CF072538;\n\tTue,  1 Dec 2020 10:59:54 +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=\"Ji0p6Zjo\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1606816795;\n\tbh=xfAEkFKUZrOV1uL+f5kJ4Ism49BJpN2arCWIhBFzKOc=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=Ji0p6Zjow74KN5H2psGFb3xTuaCsbhx4hXTDx5RgorvF7KqxOWbIv6ciCBdO2BLvk\n\tqI2EFCjzy4MHjqzw2D3VgRg4aopBp/gaSGhspY2VZHGzY5/uCCpyR/4iBNRe2kokLJ\n\tBQApfJBiPL5wRCfSmdOfDkie0k4aUAeswOnZIQ6Y=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue,  1 Dec 2020 11:59:42 +0200",
        "Message-Id": "<20201201095942.7280-1-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH] libcamera: ipa_interface: Make\n\tconfigure() return an int",
        "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": "It's useful for the IPAInterface::configure() function to be able to\nreturn a status. Make it return an int, to avoid forcing IPAs to return\na status encoded in the IPAOperationData in a custom way.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n .../libcamera/internal/ipa_context_wrapper.h  | 10 +++---\n include/libcamera/ipa/ipa_interface.h         | 22 ++++++------\n src/ipa/libipa/ipa_interface_wrapper.cpp      | 16 ++++-----\n src/ipa/libipa/ipa_interface_wrapper.h        | 12 +++----\n src/ipa/raspberrypi/raspberrypi.cpp           | 23 +++++++------\n src/ipa/rkisp1/rkisp1.cpp                     | 27 ++++++++-------\n src/ipa/vimc/vimc.cpp                         | 10 +++---\n src/libcamera/ipa_context_wrapper.cpp         | 17 +++++-----\n src/libcamera/ipa_interface.cpp               |  4 +++\n src/libcamera/proxy/ipa_proxy_linux.cpp       | 10 +++---\n src/libcamera/proxy/ipa_proxy_thread.cpp      | 24 ++++++-------\n test/ipa/ipa_wrappers_test.cpp                | 34 ++++++++++++-------\n 12 files changed, 113 insertions(+), 96 deletions(-)",
    "diff": "diff --git a/include/libcamera/internal/ipa_context_wrapper.h b/include/libcamera/internal/ipa_context_wrapper.h\nindex 8f767e844221..a00b5e7b92eb 100644\n--- a/include/libcamera/internal/ipa_context_wrapper.h\n+++ b/include/libcamera/internal/ipa_context_wrapper.h\n@@ -22,11 +22,11 @@ public:\n \tint init(const IPASettings &settings) override;\n \tint start() override;\n \tvoid stop() override;\n-\tvoid configure(const CameraSensorInfo &sensorInfo,\n-\t\t       const std::map<unsigned int, IPAStream> &streamConfig,\n-\t\t       const std::map<unsigned int, const ControlInfoMap &> &entityControls,\n-\t\t       const IPAOperationData &ipaConfig,\n-\t\t       IPAOperationData *result) override;\n+\tint configure(const CameraSensorInfo &sensorInfo,\n+\t\t      const std::map<unsigned int, IPAStream> &streamConfig,\n+\t\t      const std::map<unsigned int, const ControlInfoMap &> &entityControls,\n+\t\t      const IPAOperationData &ipaConfig,\n+\t\t      IPAOperationData *result) override;\n \n \tvoid mapBuffers(const std::vector<IPABuffer> &buffers) override;\n \tvoid unmapBuffers(const std::vector<unsigned int> &ids) override;\ndiff --git a/include/libcamera/ipa/ipa_interface.h b/include/libcamera/ipa/ipa_interface.h\nindex 322b7079070e..1d8cf8dc1c56 100644\n--- a/include/libcamera/ipa/ipa_interface.h\n+++ b/include/libcamera/ipa/ipa_interface.h\n@@ -95,12 +95,12 @@ struct ipa_context_ops {\n \tvoid (*register_callbacks)(struct ipa_context *ctx,\n \t\t\t\t   const struct ipa_callback_ops *callbacks,\n \t\t\t\t   void *cb_ctx);\n-\tvoid (*configure)(struct ipa_context *ctx,\n-\t\t\t  const struct ipa_sensor_info *sensor_info,\n-\t\t\t  const struct ipa_stream *streams,\n-\t\t\t  unsigned int num_streams,\n-\t\t\t  const struct ipa_control_info_map *maps,\n-\t\t\t  unsigned int num_maps);\n+\tint (*configure)(struct ipa_context *ctx,\n+\t\t\t const struct ipa_sensor_info *sensor_info,\n+\t\t\t const struct ipa_stream *streams,\n+\t\t\t unsigned int num_streams,\n+\t\t\t const struct ipa_control_info_map *maps,\n+\t\t\t unsigned int num_maps);\n \tvoid (*map_buffers)(struct ipa_context *ctx,\n \t\t\t    const struct ipa_buffer *buffers,\n \t\t\t    size_t num_buffers);\n@@ -156,11 +156,11 @@ public:\n \tvirtual int start() = 0;\n \tvirtual void stop() = 0;\n \n-\tvirtual void configure(const CameraSensorInfo &sensorInfo,\n-\t\t\t       const std::map<unsigned int, IPAStream> &streamConfig,\n-\t\t\t       const std::map<unsigned int, const ControlInfoMap &> &entityControls,\n-\t\t\t       const IPAOperationData &ipaConfig,\n-\t\t\t       IPAOperationData *result) = 0;\n+\tvirtual int configure(const CameraSensorInfo &sensorInfo,\n+\t\t\t      const std::map<unsigned int, IPAStream> &streamConfig,\n+\t\t\t      const std::map<unsigned int, const ControlInfoMap &> &entityControls,\n+\t\t\t      const IPAOperationData &ipaConfig,\n+\t\t\t      IPAOperationData *result) = 0;\n \n \tvirtual void mapBuffers(const std::vector<IPABuffer> &buffers) = 0;\n \tvirtual void unmapBuffers(const std::vector<unsigned int> &ids) = 0;\ndiff --git a/src/ipa/libipa/ipa_interface_wrapper.cpp b/src/ipa/libipa/ipa_interface_wrapper.cpp\nindex cee532e3a747..74d7bc6e1c9b 100644\n--- a/src/ipa/libipa/ipa_interface_wrapper.cpp\n+++ b/src/ipa/libipa/ipa_interface_wrapper.cpp\n@@ -115,12 +115,12 @@ void IPAInterfaceWrapper::register_callbacks(struct ipa_context *_ctx,\n \tctx->cb_ctx_ = cb_ctx;\n }\n \n-void IPAInterfaceWrapper::configure(struct ipa_context *_ctx,\n-\t\t\t\t    const struct ipa_sensor_info *sensor_info,\n-\t\t\t\t    const struct ipa_stream *streams,\n-\t\t\t\t    unsigned int num_streams,\n-\t\t\t\t    const struct ipa_control_info_map *maps,\n-\t\t\t\t    unsigned int num_maps)\n+int IPAInterfaceWrapper::configure(struct ipa_context *_ctx,\n+\t\t\t\t   const struct ipa_sensor_info *sensor_info,\n+\t\t\t\t   const struct ipa_stream *streams,\n+\t\t\t\t   unsigned int num_streams,\n+\t\t\t\t   const struct ipa_control_info_map *maps,\n+\t\t\t\t   unsigned int num_maps)\n {\n \tIPAInterfaceWrapper *ctx = static_cast<IPAInterfaceWrapper *>(_ctx);\n \n@@ -168,8 +168,8 @@ void IPAInterfaceWrapper::configure(struct ipa_context *_ctx,\n \n \t/* \\todo Translate the ipaConfig and result. */\n \tIPAOperationData ipaConfig;\n-\tctx->ipa_->configure(sensorInfo, ipaStreams, entityControls, ipaConfig,\n-\t\t\t     nullptr);\n+\treturn ctx->ipa_->configure(sensorInfo, ipaStreams, entityControls,\n+\t\t\t\t    ipaConfig, nullptr);\n }\n \n void IPAInterfaceWrapper::map_buffers(struct ipa_context *_ctx,\ndiff --git a/src/ipa/libipa/ipa_interface_wrapper.h b/src/ipa/libipa/ipa_interface_wrapper.h\nindex a1c701599b56..acd3160039b1 100644\n--- a/src/ipa/libipa/ipa_interface_wrapper.h\n+++ b/src/ipa/libipa/ipa_interface_wrapper.h\n@@ -30,12 +30,12 @@ private:\n \tstatic void register_callbacks(struct ipa_context *ctx,\n \t\t\t\t       const struct ipa_callback_ops *callbacks,\n \t\t\t\t       void *cb_ctx);\n-\tstatic void configure(struct ipa_context *ctx,\n-\t\t\t      const struct ipa_sensor_info *sensor_info,\n-\t\t\t      const struct ipa_stream *streams,\n-\t\t\t      unsigned int num_streams,\n-\t\t\t      const struct ipa_control_info_map *maps,\n-\t\t\t      unsigned int num_maps);\n+\tstatic int configure(struct ipa_context *ctx,\n+\t\t\t     const struct ipa_sensor_info *sensor_info,\n+\t\t\t     const struct ipa_stream *streams,\n+\t\t\t     unsigned int num_streams,\n+\t\t\t     const struct ipa_control_info_map *maps,\n+\t\t\t     unsigned int num_maps);\n \tstatic void map_buffers(struct ipa_context *ctx,\n \t\t\t\tconst struct ipa_buffer *c_buffers,\n \t\t\t\tsize_t num_buffers);\ndiff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\nindex 9853a343c892..75f7af3430ef 100644\n--- a/src/ipa/raspberrypi/raspberrypi.cpp\n+++ b/src/ipa/raspberrypi/raspberrypi.cpp\n@@ -81,11 +81,11 @@ public:\n \tint start() override { return 0; }\n \tvoid stop() override {}\n \n-\tvoid configure(const CameraSensorInfo &sensorInfo,\n-\t\t       const std::map<unsigned int, IPAStream> &streamConfig,\n-\t\t       const std::map<unsigned int, const ControlInfoMap &> &entityControls,\n-\t\t       const IPAOperationData &data,\n-\t\t       IPAOperationData *response) override;\n+\tint configure(const CameraSensorInfo &sensorInfo,\n+\t\t      const std::map<unsigned int, IPAStream> &streamConfig,\n+\t\t      const std::map<unsigned int, const ControlInfoMap &> &entityControls,\n+\t\t      const IPAOperationData &data,\n+\t\t      IPAOperationData *response) override;\n \tvoid mapBuffers(const std::vector<IPABuffer> &buffers) override;\n \tvoid unmapBuffers(const std::vector<unsigned int> &ids) override;\n \tvoid processEvent(const IPAOperationData &event) override;\n@@ -191,14 +191,14 @@ void IPARPi::setMode(const CameraSensorInfo &sensorInfo)\n \tmode_.line_length = 1e9 * sensorInfo.lineLength / sensorInfo.pixelRate;\n }\n \n-void 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, const ControlInfoMap &> &entityControls,\n-\t\t       const IPAOperationData &ipaConfig,\n-\t\t       IPAOperationData *result)\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, const ControlInfoMap &> &entityControls,\n+\t\t      const IPAOperationData &ipaConfig,\n+\t\t      IPAOperationData *result)\n {\n \tif (entityControls.empty())\n-\t\treturn;\n+\t\treturn -EINVAL;\n \n \tresult->operation = 0;\n \n@@ -314,6 +314,7 @@ void IPARPi::configure(const CameraSensorInfo &sensorInfo,\n \t}\n \n \tlastMode_ = mode_;\n+\treturn 0;\n }\n \n void IPARPi::mapBuffers(const std::vector<IPABuffer> &buffers)\ndiff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\nindex 07d7f1b2ddd8..78d78c5ac521 100644\n--- a/src/ipa/rkisp1/rkisp1.cpp\n+++ b/src/ipa/rkisp1/rkisp1.cpp\n@@ -40,11 +40,11 @@ public:\n \tint start() override { return 0; }\n \tvoid stop() override {}\n \n-\tvoid configure(const CameraSensorInfo &info,\n-\t\t       const std::map<unsigned int, IPAStream> &streamConfig,\n-\t\t       const std::map<unsigned int, const ControlInfoMap &> &entityControls,\n-\t\t       const IPAOperationData &ipaConfig,\n-\t\t       IPAOperationData *response) override;\n+\tint configure(const CameraSensorInfo &info,\n+\t\t      const std::map<unsigned int, IPAStream> &streamConfig,\n+\t\t      const std::map<unsigned int, const ControlInfoMap &> &entityControls,\n+\t\t      const IPAOperationData &ipaConfig,\n+\t\t      IPAOperationData *response) override;\n \tvoid mapBuffers(const std::vector<IPABuffer> &buffers) override;\n \tvoid unmapBuffers(const std::vector<unsigned int> &ids) override;\n \tvoid processEvent(const IPAOperationData &event) override;\n@@ -79,27 +79,27 @@ private:\n  * assemble one. Make sure the reported sensor information are relevant\n  * before accessing them.\n  */\n-void IPARkISP1::configure([[maybe_unused]] const CameraSensorInfo &info,\n-\t\t\t  [[maybe_unused]] const std::map<unsigned int, IPAStream> &streamConfig,\n-\t\t\t  const std::map<unsigned int, const ControlInfoMap &> &entityControls,\n-\t\t\t  [[maybe_unused]] const IPAOperationData &ipaConfig,\n-\t\t\t  [[maybe_unused]] IPAOperationData *result)\n+int IPARkISP1::configure([[maybe_unused]] const CameraSensorInfo &info,\n+\t\t\t [[maybe_unused]] const std::map<unsigned int, IPAStream> &streamConfig,\n+\t\t\t const std::map<unsigned int, const ControlInfoMap &> &entityControls,\n+\t\t\t [[maybe_unused]] const IPAOperationData &ipaConfig,\n+\t\t\t [[maybe_unused]] IPAOperationData *result)\n {\n \tif (entityControls.empty())\n-\t\treturn;\n+\t\treturn -EINVAL;\n \n \tctrls_ = entityControls.at(0);\n \n \tconst auto itExp = ctrls_.find(V4L2_CID_EXPOSURE);\n \tif (itExp == ctrls_.end()) {\n \t\tLOG(IPARkISP1, Error) << \"Can't find exposure control\";\n-\t\treturn;\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(IPARkISP1, Error) << \"Can't find gain control\";\n-\t\treturn;\n+\t\treturn -EINVAL;\n \t}\n \n \tautoExposure_ = true;\n@@ -117,6 +117,7 @@ void IPARkISP1::configure([[maybe_unused]] const CameraSensorInfo &info,\n \t\t<< \" Gain: \" << minGain_ << \"-\" << maxGain_;\n \n \tsetControls(0);\n+\treturn 0;\n }\n \n void IPARkISP1::mapBuffers(const std::vector<IPABuffer> &buffers)\ndiff --git a/src/ipa/vimc/vimc.cpp b/src/ipa/vimc/vimc.cpp\nindex cf8411359e40..79c8c2fb8927 100644\n--- a/src/ipa/vimc/vimc.cpp\n+++ b/src/ipa/vimc/vimc.cpp\n@@ -37,11 +37,11 @@ public:\n \tint start() override;\n \tvoid stop() override;\n \n-\tvoid configure([[maybe_unused]] const CameraSensorInfo &sensorInfo,\n-\t\t       [[maybe_unused]] const std::map<unsigned int, IPAStream> &streamConfig,\n-\t\t       [[maybe_unused]] const std::map<unsigned int, const ControlInfoMap &> &entityControls,\n-\t\t       [[maybe_unused]] const IPAOperationData &ipaConfig,\n-\t\t       [[maybe_unused]] IPAOperationData *result) override {}\n+\tint configure([[maybe_unused]] const CameraSensorInfo &sensorInfo,\n+\t\t      [[maybe_unused]] const std::map<unsigned int, IPAStream> &streamConfig,\n+\t\t      [[maybe_unused]] const std::map<unsigned int, const ControlInfoMap &> &entityControls,\n+\t\t      [[maybe_unused]] const IPAOperationData &ipaConfig,\n+\t\t      [[maybe_unused]] IPAOperationData *result) override { return 0; }\n \tvoid mapBuffers([[maybe_unused]] const std::vector<IPABuffer> &buffers) override {}\n \tvoid unmapBuffers([[maybe_unused]] const std::vector<unsigned int> &ids) override {}\n \tvoid processEvent([[maybe_unused]] const IPAOperationData &event) override {}\ndiff --git a/src/libcamera/ipa_context_wrapper.cpp b/src/libcamera/ipa_context_wrapper.cpp\nindex 231300ce0bec..f63ad830c003 100644\n--- a/src/libcamera/ipa_context_wrapper.cpp\n+++ b/src/libcamera/ipa_context_wrapper.cpp\n@@ -108,18 +108,18 @@ void IPAContextWrapper::stop()\n \tctx_->ops->stop(ctx_);\n }\n \n-void IPAContextWrapper::configure(const CameraSensorInfo &sensorInfo,\n-\t\t\t\t  const std::map<unsigned int, IPAStream> &streamConfig,\n-\t\t\t\t  const std::map<unsigned int, const ControlInfoMap &> &entityControls,\n-\t\t\t\t  const IPAOperationData &ipaConfig,\n-\t\t\t\t  IPAOperationData *result)\n+int IPAContextWrapper::configure(const CameraSensorInfo &sensorInfo,\n+\t\t\t\t const std::map<unsigned int, IPAStream> &streamConfig,\n+\t\t\t\t const std::map<unsigned int, const ControlInfoMap &> &entityControls,\n+\t\t\t\t const IPAOperationData &ipaConfig,\n+\t\t\t\t IPAOperationData *result)\n {\n \tif (intf_)\n \t\treturn intf_->configure(sensorInfo, streamConfig,\n \t\t\t\t\tentityControls, ipaConfig, result);\n \n \tif (!ctx_)\n-\t\treturn;\n+\t\treturn 0;\n \n \tserializer_.reset();\n \n@@ -178,8 +178,9 @@ void IPAContextWrapper::configure(const CameraSensorInfo &sensorInfo,\n \t}\n \n \t/* \\todo Translate the ipaConfig and reponse */\n-\tctx_->ops->configure(ctx_, &sensor_info, c_streams, streamConfig.size(),\n-\t\t\t     c_info_maps, entityControls.size());\n+\treturn ctx_->ops->configure(ctx_, &sensor_info, c_streams,\n+\t\t\t\t    streamConfig.size(), c_info_maps,\n+\t\t\t\t    entityControls.size());\n }\n \n void IPAContextWrapper::mapBuffers(const std::vector<IPABuffer> &buffers)\ndiff --git a/src/libcamera/ipa_interface.cpp b/src/libcamera/ipa_interface.cpp\nindex 23fc56d7d48e..516a8ecd4b53 100644\n--- a/src/libcamera/ipa_interface.cpp\n+++ b/src/libcamera/ipa_interface.cpp\n@@ -347,6 +347,8 @@\n  * \\param[in] num_maps The number of entries in the \\a maps array\n  *\n  * \\sa libcamera::IPAInterface::configure()\n+ *\n+ * \\return 0 on success or a negative error code on failure\n  */\n \n /**\n@@ -573,6 +575,8 @@ namespace libcamera {\n  * pipeline handler to the IPA and back. The pipeline handler may set the \\a\n  * result parameter to null if the IPA protocol doesn't need to pass a result\n  * back through the configure() function.\n+ *\n+ * \\return 0 on success or a negative error code on failure\n  */\n \n /**\ndiff --git a/src/libcamera/proxy/ipa_proxy_linux.cpp b/src/libcamera/proxy/ipa_proxy_linux.cpp\nindex b78a0e4535f5..ed250ce79c17 100644\n--- a/src/libcamera/proxy/ipa_proxy_linux.cpp\n+++ b/src/libcamera/proxy/ipa_proxy_linux.cpp\n@@ -32,11 +32,11 @@ public:\n \t}\n \tint start() override { return 0; }\n \tvoid stop() override {}\n-\tvoid configure([[maybe_unused]] const CameraSensorInfo &sensorInfo,\n-\t\t       [[maybe_unused]] const std::map<unsigned int, IPAStream> &streamConfig,\n-\t\t       [[maybe_unused]] const std::map<unsigned int, const ControlInfoMap &> &entityControls,\n-\t\t       [[maybe_unused]] const IPAOperationData &ipaConfig,\n-\t\t       [[maybe_unused]] IPAOperationData *result) override {}\n+\tint configure([[maybe_unused]] const CameraSensorInfo &sensorInfo,\n+\t\t      [[maybe_unused]] const std::map<unsigned int, IPAStream> &streamConfig,\n+\t\t      [[maybe_unused]] const std::map<unsigned int, const ControlInfoMap &> &entityControls,\n+\t\t      [[maybe_unused]] const IPAOperationData &ipaConfig,\n+\t\t      [[maybe_unused]] IPAOperationData *result) override { return 0; }\n \tvoid mapBuffers([[maybe_unused]] const std::vector<IPABuffer> &buffers) override {}\n \tvoid unmapBuffers([[maybe_unused]] const std::vector<unsigned int> &ids) override {}\n \tvoid processEvent([[maybe_unused]] const IPAOperationData &event) override {}\ndiff --git a/src/libcamera/proxy/ipa_proxy_thread.cpp b/src/libcamera/proxy/ipa_proxy_thread.cpp\nindex eead2883708d..fd91726c4840 100644\n--- a/src/libcamera/proxy/ipa_proxy_thread.cpp\n+++ b/src/libcamera/proxy/ipa_proxy_thread.cpp\n@@ -29,11 +29,11 @@ public:\n \tint start() override;\n \tvoid stop() override;\n \n-\tvoid configure(const CameraSensorInfo &sensorInfo,\n-\t\t       const std::map<unsigned int, IPAStream> &streamConfig,\n-\t\t       const std::map<unsigned int, const ControlInfoMap &> &entityControls,\n-\t\t       const IPAOperationData &ipaConfig,\n-\t\t       IPAOperationData *result) override;\n+\tint configure(const CameraSensorInfo &sensorInfo,\n+\t\t      const std::map<unsigned int, IPAStream> &streamConfig,\n+\t\t      const std::map<unsigned int, const ControlInfoMap &> &entityControls,\n+\t\t      const IPAOperationData &ipaConfig,\n+\t\t      IPAOperationData *result) override;\n \tvoid mapBuffers(const std::vector<IPABuffer> &buffers) override;\n \tvoid unmapBuffers(const std::vector<unsigned int> &ids) override;\n \tvoid processEvent(const IPAOperationData &event) override;\n@@ -132,14 +132,14 @@ void IPAProxyThread::stop()\n \tthread_.wait();\n }\n \n-void IPAProxyThread::configure(const CameraSensorInfo &sensorInfo,\n-\t\t\t       const std::map<unsigned int, IPAStream> &streamConfig,\n-\t\t\t       const std::map<unsigned int, const ControlInfoMap &> &entityControls,\n-\t\t\t       const IPAOperationData &ipaConfig,\n-\t\t\t       IPAOperationData *result)\n+int IPAProxyThread::configure(const CameraSensorInfo &sensorInfo,\n+\t\t\t      const std::map<unsigned int, IPAStream> &streamConfig,\n+\t\t\t      const std::map<unsigned int, const ControlInfoMap &> &entityControls,\n+\t\t\t      const IPAOperationData &ipaConfig,\n+\t\t\t      IPAOperationData *result)\n {\n-\tipa_->configure(sensorInfo, streamConfig, entityControls, ipaConfig,\n-\t\t\tresult);\n+\treturn ipa_->configure(sensorInfo, streamConfig, entityControls,\n+\t\t\t       ipaConfig, result);\n }\n \n void IPAProxyThread::mapBuffers(const std::vector<IPABuffer> &buffers)\ndiff --git a/test/ipa/ipa_wrappers_test.cpp b/test/ipa/ipa_wrappers_test.cpp\nindex 59d991cbbf6a..ad0fb0386865 100644\n--- a/test/ipa/ipa_wrappers_test.cpp\n+++ b/test/ipa/ipa_wrappers_test.cpp\n@@ -67,55 +67,63 @@ public:\n \t\treport(Op_stop, TestPass);\n \t}\n \n-\tvoid configure(const CameraSensorInfo &sensorInfo,\n-\t\t       const std::map<unsigned int, IPAStream> &streamConfig,\n-\t\t       const std::map<unsigned int, const ControlInfoMap &> &entityControls,\n-\t\t       [[maybe_unused]] const IPAOperationData &ipaConfig,\n-\t\t       [[maybe_unused]] IPAOperationData *result) override\n+\tint configure(const CameraSensorInfo &sensorInfo,\n+\t\t      const std::map<unsigned int, IPAStream> &streamConfig,\n+\t\t      const std::map<unsigned int, const ControlInfoMap &> &entityControls,\n+\t\t      [[maybe_unused]] const IPAOperationData &ipaConfig,\n+\t\t      [[maybe_unused]] IPAOperationData *result) override\n \t{\n \t\t/* Verify sensorInfo. */\n \t\tif (sensorInfo.outputSize.width != 2560 ||\n \t\t    sensorInfo.outputSize.height != 1940) {\n \t\t\tcerr << \"configure(): Invalid sensor info size \"\n \t\t\t     << sensorInfo.outputSize.toString();\n+\t\t\treport(Op_configure, TestFail);\n+\t\t\treturn -EINVAL;\n \t\t}\n \n \t\t/* Verify streamConfig. */\n \t\tif (streamConfig.size() != 2) {\n \t\t\tcerr << \"configure(): Invalid number of streams \"\n \t\t\t     << streamConfig.size() << endl;\n-\t\t\treturn report(Op_configure, TestFail);\n+\t\t\treport(Op_configure, TestFail);\n+\t\t\treturn -EINVAL;\n \t\t}\n \n \t\tauto iter = streamConfig.find(1);\n \t\tif (iter == streamConfig.end()) {\n \t\t\tcerr << \"configure(): No configuration for stream 1\" << endl;\n-\t\t\treturn report(Op_configure, TestFail);\n+\t\t\treport(Op_configure, TestFail);\n+\t\t\treturn -EINVAL;\n \t\t}\n \t\tconst IPAStream *stream = &iter->second;\n \t\tif (stream->pixelFormat != V4L2_PIX_FMT_YUYV ||\n \t\t    stream->size != Size{ 1024, 768 }) {\n \t\t\tcerr << \"configure(): Invalid configuration for stream 1\" << endl;\n-\t\t\treturn report(Op_configure, TestFail);\n+\t\t\treport(Op_configure, TestFail);\n+\t\t\treturn -EINVAL;\n \t\t}\n \n \t\titer = streamConfig.find(2);\n \t\tif (iter == streamConfig.end()) {\n \t\t\tcerr << \"configure(): No configuration for stream 2\" << endl;\n-\t\t\treturn report(Op_configure, TestFail);\n+\t\t\treport(Op_configure, TestFail);\n+\t\t\treturn -EINVAL;\n \t\t}\n \t\tstream = &iter->second;\n \t\tif (stream->pixelFormat != V4L2_PIX_FMT_NV12 ||\n \t\t    stream->size != Size{ 800, 600 }) {\n \t\t\tcerr << \"configure(): Invalid configuration for stream 2\" << endl;\n-\t\t\treturn report(Op_configure, TestFail);\n+\t\t\treport(Op_configure, TestFail);\n+\t\t\treturn -EINVAL;\n \t\t}\n \n \t\t/* Verify entityControls. */\n \t\tauto ctrlIter = entityControls.find(42);\n \t\tif (ctrlIter == entityControls.end()) {\n \t\t\tcerr << \"configure(): Controls not found\" << endl;\n-\t\t\treturn report(Op_configure, TestFail);\n+\t\t\treport(Op_configure, TestFail);\n+\t\t\treturn -EINVAL;\n \t\t}\n \n \t\tconst ControlInfoMap &infoMap = ctrlIter->second;\n@@ -124,10 +132,12 @@ public:\n \t\t    infoMap.count(V4L2_CID_CONTRAST) != 1 ||\n \t\t    infoMap.count(V4L2_CID_SATURATION) != 1) {\n \t\t\tcerr << \"configure(): Invalid control IDs\" << endl;\n-\t\t\treturn report(Op_configure, TestFail);\n+\t\t\treport(Op_configure, TestFail);\n+\t\t\treturn -EINVAL;\n \t\t}\n \n \t\treport(Op_configure, TestPass);\n+\t\treturn 0;\n \t}\n \n \tvoid mapBuffers(const std::vector<IPABuffer> &buffers) override\n",
    "prefixes": [
        "libcamera-devel"
    ]
}