Show a patch.

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

{
    "id": 21035,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/21035/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/21035/",
    "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": "<20240827014044.24673-4-laurent.pinchart@ideasonboard.com>",
    "date": "2024-08-27T01:40:37",
    "name": "[v4,3/9] ipa: rkisp1: Pass parameters buffer size to pipeline handler",
    "commit_ref": "e70cda4238deebefdc6a63692f96cb07bdd73d1e",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "ee0d602bb928f8e8d0bdeecabca4b84ab7d2257c",
    "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/21035/mbox/",
    "series": [
        {
            "id": 4544,
            "url": "https://patchwork.libcamera.org/api/1.1/series/4544/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4544",
            "date": "2024-08-27T01:40:34",
            "name": "rkisp1: Support BLS on i.MX8MP",
            "version": 4,
            "mbox": "https://patchwork.libcamera.org/series/4544/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/21035/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/21035/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 4DF7CC32D5\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 27 Aug 2024 01:41:00 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C0A4B6342D;\n\tTue, 27 Aug 2024 03:40:59 +0200 (CEST)",
            "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 F07F163421\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 27 Aug 2024 03:40:52 +0200 (CEST)",
            "from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 44B53B0B;\n\tTue, 27 Aug 2024 03:39:46 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"OghVScAI\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1724722786;\n\tbh=XtsO8kgy9Jj5a9SLAKjUXi6HrX53EDShIwMpQt1B1Kg=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=OghVScAILDohuUXFiWBPC5vw7mmnmVEEDnIl9rPL9NdbUNygur3zOoKHV0JMd1c7S\n\tWxleYEdsYOsvDM8/lYvYRh2FNYii1Gg7cjEEAolqoIqOk+zMzuXPj2hIpsl2KIYccE\n\tNeAUuJNgo4TNEfMQrXCZh6l3Szzqo/gh2w8HHCxI=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>",
        "Subject": "[PATCH v4 3/9] ipa: rkisp1: Pass parameters buffer size to pipeline\n\thandler",
        "Date": "Tue, 27 Aug 2024 04:40:37 +0300",
        "Message-ID": "<20240827014044.24673-4-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.44.2",
        "In-Reply-To": "<20240827014044.24673-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20240827014044.24673-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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": "From: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n\nThe ISP parameters buffer currently has a fixed payload size, which is\nhardcoded in the pipeline handler. To prepare for support of the\nextensible parameters format that has a variable payload size, pass the\nsize from the IPA module to the pipeline handler explicitly. Keep the\nsize hardcoded to sizeof(struct rkisp1_params_cfg) for now, this will be\nudpated later.\n\nSigned-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n---\n include/libcamera/ipa/rkisp1.mojom       | 2 +-\n src/ipa/rkisp1/rkisp1.cpp                | 2 +-\n src/libcamera/pipeline/rkisp1/rkisp1.cpp | 7 +++----\n 3 files changed, 5 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/include/libcamera/ipa/rkisp1.mojom b/include/libcamera/ipa/rkisp1.mojom\nindex 585d38572aa2..80d54a03aa90 100644\n--- a/include/libcamera/ipa/rkisp1.mojom\n+++ b/include/libcamera/ipa/rkisp1.mojom\n@@ -37,7 +37,7 @@ interface IPARkISP1Interface {\n };\n \n interface IPARkISP1EventInterface {\n-\tparamsBufferReady(uint32 frame);\n+\tparamsBufferReady(uint32 frame, uint32 bytesused);\n \tsetSensorControls(uint32 frame, libcamera.ControlList sensorControls);\n \tmetadataReady(uint32 frame, libcamera.ControlList metadata);\n };\ndiff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\nindex de2998ab57fe..c36799f82b8c 100644\n--- a/src/ipa/rkisp1/rkisp1.cpp\n+++ b/src/ipa/rkisp1/rkisp1.cpp\n@@ -332,7 +332,7 @@ void IPARkISP1::fillParamsBuffer(const uint32_t frame, const uint32_t bufferId)\n \tfor (auto const &algo : algorithms())\n \t\talgo->prepare(context_, frame, frameContext, params);\n \n-\tparamsBufferReady.emit(frame);\n+\tparamsBufferReady.emit(frame, sizeof(*params));\n }\n \n void IPARkISP1::processStatsBuffer(const uint32_t frame, const uint32_t bufferId,\ndiff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\nindex 1cdb9a44f900..ef38d86dc4b4 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n@@ -110,7 +110,7 @@ public:\n \tstd::unique_ptr<ipa::rkisp1::IPAProxyRkISP1> ipa_;\n \n private:\n-\tvoid paramFilled(unsigned int frame);\n+\tvoid paramFilled(unsigned int frame, unsigned int bytesused);\n \tvoid setSensorControls(unsigned int frame,\n \t\t\t       const ControlList &sensorControls);\n \n@@ -374,15 +374,14 @@ int RkISP1CameraData::loadIPA(unsigned int hwRevision)\n \treturn 0;\n }\n \n-void RkISP1CameraData::paramFilled(unsigned int frame)\n+void RkISP1CameraData::paramFilled(unsigned int frame, unsigned int bytesused)\n {\n \tPipelineHandlerRkISP1 *pipe = RkISP1CameraData::pipe();\n \tRkISP1FrameInfo *info = frameInfo_.find(frame);\n \tif (!info)\n \t\treturn;\n \n-\tinfo->paramBuffer->_d()->metadata().planes()[0].bytesused =\n-\t\tsizeof(struct rkisp1_params_cfg);\n+\tinfo->paramBuffer->_d()->metadata().planes()[0].bytesused = bytesused;\n \tpipe->param_->queueBuffer(info->paramBuffer);\n \tpipe->stat_->queueBuffer(info->statBuffer);\n \n",
    "prefixes": [
        "v4",
        "3/9"
    ]
}