Show a patch.

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

{
    "id": 26960,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/26960/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/26960/",
    "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": "<20260618122245.946138-27-bryan.odonoghue@linaro.org>",
    "date": "2026-06-18T12:22:39",
    "name": "[26/30] libcamera: software_isp: gpu: Do a synchronous BenchMark print after syncOutput",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "91f38abf0697695719e4617bfb26011a33eada77",
    "submitter": {
        "id": 175,
        "url": "https://patchwork.libcamera.org/api/1.1/people/175/?format=api",
        "name": "Bryan O'Donoghue",
        "email": "bryan.odonoghue@linaro.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/26960/mbox/",
    "series": [
        {
            "id": 6005,
            "url": "https://patchwork.libcamera.org/api/1.1/series/6005/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=6005",
            "date": "2026-06-18T12:22:13",
            "name": "RFC/RFT: gpuisp: Multipass with speed optimisations on top",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/6005/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/26960/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/26960/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 6C2BFC3333\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 18 Jun 2026 12:23:40 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E5F66656DB;\n\tThu, 18 Jun 2026 14:23:39 +0200 (CEST)",
            "from mail-wr1-x430.google.com (mail-wr1-x430.google.com\n\t[IPv6:2a00:1450:4864:20::430])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DB27D656B8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 18 Jun 2026 14:23:17 +0200 (CEST)",
            "by mail-wr1-x430.google.com with SMTP id\n\tffacd0b85a97d-461edb387ddso993048f8f.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 18 Jun 2026 05:23:17 -0700 (PDT)",
            "from inspiron14p-linux ([109.76.144.236])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-4922fa3a4easm275198015e9.3.2026.06.18.05.23.16\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 18 Jun 2026 05:23:17 -0700 (PDT)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"a2jRMA3N\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1781785397; x=1782390197;\n\tdarn=lists.libcamera.org; \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=MkNjYBeWEiuiQCIa3/fw0IZi4AbXB6fTVkVhV6295v0=;\n\tb=a2jRMA3N5Y/gQCdg2tXgBMVOhI4qsZWZb2FvBhWVlveU693hDydWIAHfDP/wNUwfRo\n\tgG87ab2VRr+8M1cE/onIpTKEjDTtU/LIe80Q4rlCiXIImzBsPRnpZ0pXro2wkTbh6zVY\n\tYlRi0eT/Lj1jgRUhASxi7jO7yHRBF3+8gIeckppORkqo8DjDVgggS91dEa1/ws3b0j4Y\n\tF/LVzovqHSL/XLepy/pFJbV+oPpuJgwokpyCAZ82L2IiLYClhtFUSJv5HQb0fqepPARa\n\t3/YFufP0tnHzicKnhROgytq6qPh9g6/22qQ+DI4qtgzpvIMahDwiXF+5+aZX73WaPOl1\n\t2GVA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20251104; t=1781785397; x=1782390197;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n\t:to:cc:subject:date:message-id:reply-to;\n\tbh=MkNjYBeWEiuiQCIa3/fw0IZi4AbXB6fTVkVhV6295v0=;\n\tb=oRQAPyOMEqCMymc+sNIEDI0WOuZtzIVdVJv1S2GYfa32739g7MZAKQUrEKRuR6IDy5\n\tX/AfrhXZ3f4qr5JV/uGfngc1fLHttSuF90DLmS/+brLnde1r0B0Z2UksFIS/M/cMDy7L\n\ti4uLRoV0e5Mef6YkoWSHGb5huiVuthzL2RpEgaeM1Gyvh5Rd6uBtNWl5sOMXVxIE6nK7\n\tVbfFTvk07jKWi9YTWNx6HTBH8NbUk6xUa5Q4L5IPXHuaLA22+X3yaqTJLD5+N4pEn8zL\n\tyIL2ApNFGg/pJchvn+I5cunvKNJ+gsEGCfAAWhsZnhbcItQ8GVXPsABjMatuIjIYkJ0L\n\tgTrg==",
        "X-Gm-Message-State": "AOJu0YyXLMwqrpFn0VrdfLEGUqgX9KD/XRufeaY2uOCy5CYNwpwl8c9L\n\tG4BBcZ+pMe2OgJbV5z+iDsqzYrpdXUjtMNYhRfNHOsy856Ly973t0d0oug9kXC3QIW2+sqnS385\n\t7a+6as2M=",
        "X-Gm-Gg": "AfdE7cnfqgNE5sKiMBnljNgzA8XS2KRKFtUEri6Hc2B5NaGE7dP3vnPKXqeGG1xjK26\n\taml8/shmES4GvzPi4JprJw++A8FNhF4BMrpLPqi7zKpw2wzQ47q5V76wZrF3jV7DCFqegOT6wdp\n\tgovt4rjG1XEOjzc0qrjF8lvoz/kEX02AQL9/sPUsSk/SRZOl3nQlENWJPw5K0ylhXYSa8exFU/u\n\tbNlCRz+fMBk/1bystsGo8C9UHv651gWc+EWN8J0KilX3GhoeK/pu0ZXBq8LLG5ieTezhVom9Qbn\n\tzJXYJELAKYeuSBUbbMz8FAxCplWncjnnQixJua/3m22JvXOPp2jDimW/i9buMo2cGjMHRbRCAY8\n\tzvCwtpLk+Anyj5dzXI/51TmP3wdzt+kJOJmxs2QedwEGzx1Fj+dwcAN+7RwlVPzdsTFuAV3ebET\n\t59fzmdlBMaam7VVa/Y4CODyn30BUQU",
        "X-Received": "by 2002:a05:600c:1f83:b0:492:25a0:1730 with SMTP id\n\t5b1f17b1804b1-4923c4adebfmr16858385e9.32.1781785397397; \n\tThu, 18 Jun 2026 05:23:17 -0700 (PDT)",
        "From": "Bryan O'Donoghue <bryan.odonoghue@linaro.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "bryan.odonoghue@linaro.org,\n\tpavel@ucw.cz",
        "Subject": "[PATCH 26/30] libcamera: software_isp: gpu: Do a synchronous\n\tBenchMark print after syncOutput",
        "Date": "Thu, 18 Jun 2026 13:22:39 +0100",
        "Message-ID": "<20260618122245.946138-27-bryan.odonoghue@linaro.org>",
        "X-Mailer": "git-send-email 2.54.0",
        "In-Reply-To": "<20260618122245.946138-1-bryan.odonoghue@linaro.org>",
        "References": "<20260618122245.946138-1-bryan.odonoghue@linaro.org>",
        "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": "Doing an optional synchronous print after syncOutput. The GPU has finished\nat this point so we can interrogate how long each shader took to execute.\n\nOnly really interesting for a debug scenario.\n\nSigned-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n---\n .../software_isp/software_isp_pipeline_gpu.cpp    | 15 +++++++++++++++\n .../software_isp/software_isp_pipeline_gpu.h      |  2 ++\n 2 files changed, 17 insertions(+)",
    "diff": "diff --git a/src/libcamera/software_isp/software_isp_pipeline_gpu.cpp b/src/libcamera/software_isp/software_isp_pipeline_gpu.cpp\nindex 14f6d2b8c..d7bed8837 100644\n--- a/src/libcamera/software_isp/software_isp_pipeline_gpu.cpp\n+++ b/src/libcamera/software_isp/software_isp_pipeline_gpu.cpp\n@@ -122,6 +122,12 @@ int SoftwareIspPipelineGpu::initBayerShaders(PixelFormat inputFormat, PixelForma\n \treturn ret;\n }\n \n+void SoftwareIspPipelineGpu::initShaderBenchMarks(void)\n+{\n+\tgpuIspShaderPassBlcNormalise_.initShaderBenchMark();\n+\tgpuIspShaderPassDemosiac_.initShaderBenchMark();\n+}\n+\n int SoftwareIspPipelineGpu::configure(const StreamConfiguration &inputCfg,\n \t\t\t\t      const std::vector<std::reference_wrapper<const StreamConfiguration>> &outputCfgs,\n \t\t\t\t      [[maybe_unused]] bool ccmEnabled)\n@@ -283,6 +289,12 @@ int SoftwareIspPipelineGpu::processGPU(FrameBuffer *input, FrameBuffer *output,\n \treturn pipelineResult;\n }\n \n+void SoftwareIspPipelineGpu::printShaderBenchMarks(void)\n+{\n+\tgpuIspShaderPassBlcNormalise_.printShaderBenchMark();\n+\tgpuIspShaderPassDemosiac_.printShaderBenchMark();\n+}\n+\n void SoftwareIspPipelineGpu::process(uint32_t frame, FrameBuffer *input, FrameBuffer *output, const DebayerParams &params)\n {\n \tbench_.startFrame();\n@@ -323,6 +335,7 @@ void SoftwareIspPipelineGpu::process(uint32_t frame, FrameBuffer *input, FrameBu\n \n \tegl_.syncOutput();\n \tbench_.finishFrame();\n+\tprintShaderBenchMarks();\n \n \toutputBufferReady.emit(output);\n \tinputBufferReady.emit(input);\n@@ -349,6 +362,8 @@ int SoftwareIspPipelineGpu::start()\n \tif (initBayerShaders(inputPixelFormat_, outputPixelFormat_))\n \t\treturn -EINVAL;\n \n+\tinitShaderBenchMarks();\n+\n \t/* Raw bayer input as texture */\n \teglImageBayerIn_ = std::make_unique<eGLImage>(gpuIspShaderPassBlcNormalise_.glFormat_, inputConfig_.stride / gpuIspShaderPassBlcNormalise_.getBytesPerPixel(), height_, inputConfig_.stride, GL_TEXTURE0, 0);\n \ndiff --git a/src/libcamera/software_isp/software_isp_pipeline_gpu.h b/src/libcamera/software_isp/software_isp_pipeline_gpu.h\nindex 8a922f658..b32d4cad3 100644\n--- a/src/libcamera/software_isp/software_isp_pipeline_gpu.h\n+++ b/src/libcamera/software_isp/software_isp_pipeline_gpu.h\n@@ -63,6 +63,8 @@ private:\n \tint getShaderVariableLocations();\n \tvoid setShaderVariableValues(const DebayerParams &params);\n \tint processGPU(FrameBuffer *input, FrameBuffer *output, const DebayerParams &params, std::optional<MappedFrameBuffer> *mappedInputBuffer, std::optional<DmaSyncer> *inputBufferDmaSyncer);\n+\tvoid initShaderBenchMarks(void);\n+\tvoid printShaderBenchMarks(void);\n \n \t/* Pointer to object representing input texture */\n \tstd::unique_ptr<eGLImage> eglImageBayerIn_;\n",
    "prefixes": [
        "26/30"
    ]
}