Show a patch.

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

{
    "id": 25506,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/25506/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/25506/",
    "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": "<20251211232246.31330-13-bryan.odonoghue@linaro.org>",
    "date": "2025-12-11T23:22:37",
    "name": "[v5,12/20] libcamera: software_isp: Move DMA Sync code to Debayer base class",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "ff01a0166ba8b70a5fa961a8b3b8890bbc7d6298",
    "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/25506/mbox/",
    "series": [
        {
            "id": 5656,
            "url": "https://patchwork.libcamera.org/api/1.1/series/5656/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5656",
            "date": "2025-12-11T23:22:25",
            "name": "GPUISP precursor series",
            "version": 5,
            "mbox": "https://patchwork.libcamera.org/series/5656/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/25506/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/25506/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 E6270C3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 11 Dec 2025 23:23:56 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9C1A961657;\n\tFri, 12 Dec 2025 00:23:56 +0100 (CET)",
            "from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com\n\t[IPv6:2607:f8b0:4864:20::42b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0463E6161F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 12 Dec 2025 00:23:55 +0100 (CET)",
            "by mail-pf1-x42b.google.com with SMTP id\n\td2e1a72fcca58-7aae5f2633dso650162b3a.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 11 Dec 2025 15:23:54 -0800 (PST)",
            "from inspiron14p-linux (M106185144161.v4.enabler.ne.jp.\n\t[106.185.144.161]) by smtp.gmail.com with ESMTPSA id\n\td2e1a72fcca58-7f4c4ab52aasm3399933b3a.38.2025.12.11.15.23.50\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 11 Dec 2025 15:23:53 -0800 (PST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"arqnvWFg\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1765495433; x=1766100233;\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=Bh1xFO5NOzK/gF5i4+/9KWqgioiivN0r41v6p9dQA20=;\n\tb=arqnvWFghaomREy7RMeMwEcLiwoVe3TiQNxLjXQZfbOc4cx/TO4WaYJIppVah6ogbQ\n\tm/sQNDZATqI8ZVnACJauFpbyVFWmsY4lLkSLhDVzogogSLwLYf06/+40TV6C1zUKWnPN\n\thTh2unPu/0AGdLyWQjiwojQsSOwUxRQXQ5KTGUXW2Znxqwq13j2Sf8UOTRR4VfyPpOn1\n\tVjd6kvpLw3WVbkplSbhAtuLvQSxtH+ECWypHcu+fyEUrIb+YwRUU56cYromTSoi7j9lV\n\tNXm230E7UTfF57JBENqz76XPc7P4xB1ROd2Wltqrb70VTf1Vvtb6E4ua9sAO8UYPmLmb\n\t2m0g==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1765495433; x=1766100233;\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=Bh1xFO5NOzK/gF5i4+/9KWqgioiivN0r41v6p9dQA20=;\n\tb=BVNb3lBnOGwcaxTt0hmIgWSjcYvnBTlebaaxvB5y8Us6LLDBMXKzEacMTt6NlbDIGs\n\trQxvI2dhXuXACenQwSh/6SCsVohz+Q3bozKHtDxq9HO8DnbZT846iwNawN50fDAtN2Za\n\t3liUqk8WOrquk78OLk4GPwF1HsS90nH0DPMMyjKRmkdz5LCxOBH2dCFVUrwUR1K9OTNm\n\tf90R4MdBxNAH2VfafQC48D4PjeQHPjSiqlHH04kqKjHita+vVZW/h30f1qqqPyCH6S6K\n\tr8xBql8O60GdKMjQAj4pbAvmTAN/+2US+LHevjqO58vh9ALZ74527LDY7UdJrHis+cxs\n\t/6Zg==",
        "X-Gm-Message-State": "AOJu0YzJhJpfSd+m7PyTN4J3RDE0HtWnGGgQ0pi783yO3juG+edN6XK5\n\trqMX22CLFR3qQ6A2e8XAGH9bvka4snPEgI9WGmiC2UHhgC7HdYBgYukN7VL016AQVcnS9/dQUsk\n\t5+QmS",
        "X-Gm-Gg": "AY/fxX5HgDYp0zTeFikmxIBCwTFOafAxVxlP/O5vGAv6M5BAI6bQ0yJ4uDJ/n+t7gfQ\n\tW0z2iFqrYMILn7tUIMFYWPZJ7PnjIUKBPWXNIsDsGT44I3qfmFB+WLQ5IwUYDBWbgDgMl5NWCBp\n\tHpD69YnQbbtqRGLqO4kdxsi9gaVJxBT+kurMmU3xuk9YwSy76zvxCx6/W2d5Hus31H0wV/+E5HM\n\tGs+klIZVAvu/kIhVpLvYNxlgEZ8xRRpyWq78vEF6+xvo8WPXty1nt5nSG+Nj/kBfaLG1cGBWcGv\n\t6bByt4nsTdYSGzdDcsdqugfR9snQwMEqI/H2PnSQLRjgohJ23ze6TP0/xvOD0/VzakO+4vsCZu6\n\tmlke3ikE1nqWQXLwHupCI2A2NEpB0ZsdIHngnbujvk27l8yaw/TW61n8hZHG0fhMliFLLRFk6iE\n\tF7wcPEPtVS43dcPY9ZI7eur2s8vHjt6vY0f4W/DC+9aboNRqwidz9ma6n1gorzuA==",
        "X-Google-Smtp-Source": "AGHT+IGvneHnhLXx596/tqyjM6fgI+db4l9CJ5WYRhMZZNJfZNN75JWqZcgcVFlFC3hzUgrKnv8sRw==",
        "X-Received": "by 2002:a05:6a00:4108:b0:7bf:1a4b:1675 with SMTP id\n\td2e1a72fcca58-7f66fde0b3cmr150029b3a.28.1765495433389; \n\tThu, 11 Dec 2025 15:23:53 -0800 (PST)",
        "From": "Bryan O'Donoghue <bryan.odonoghue@linaro.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "pavel@ucw.cz, Bryan O'Donoghue <bryan.odonoghue@linaro.org>,\n\tMilan Zamazal <mzamazal@redhat.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>",
        "Subject": "[PATCH v5 12/20] libcamera: software_isp: Move DMA Sync code to\n\tDebayer base class",
        "Date": "Thu, 11 Dec 2025 23:22:37 +0000",
        "Message-ID": "<20251211232246.31330-13-bryan.odonoghue@linaro.org>",
        "X-Mailer": "git-send-email 2.52.0",
        "In-Reply-To": "<20251211232246.31330-1-bryan.odonoghue@linaro.org>",
        "References": "<20251211232246.31330-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": "We can reuse the DMA Sync code in the GPUISP. Move the code we need to\nthe base class.\n\nReviewed-by: Milan Zamazal <mzamazal@redhat.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nSigned-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n---\n src/libcamera/software_isp/debayer.cpp     | 13 +++++++++++++\n src/libcamera/software_isp/debayer.h       |  2 ++\n src/libcamera/software_isp/debayer_cpu.cpp |  6 +-----\n 3 files changed, 16 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/src/libcamera/software_isp/debayer.cpp b/src/libcamera/software_isp/debayer.cpp\nindex cea30af67..544921656 100644\n--- a/src/libcamera/software_isp/debayer.cpp\n+++ b/src/libcamera/software_isp/debayer.cpp\n@@ -364,4 +364,17 @@ void Debayer::setParams(DebayerParams &params)\n \tgammaLut_ = params.gammaLut;\n }\n \n+/**\n+ * \\fn void Debayer::dmaSyncBegin(DebayerParams &params)\n+ * \\brief Common CPU/GPU Dma Sync Buffer begin\n+ */\n+void Debayer::dmaSyncBegin(std::vector<DmaSyncer> &dmaSyncers, FrameBuffer *input, FrameBuffer *output)\n+{\n+\tfor (const FrameBuffer::Plane &plane : input->planes())\n+\t\tdmaSyncers.emplace_back(plane.fd, DmaSyncer::SyncType::Read);\n+\n+\tfor (const FrameBuffer::Plane &plane : output->planes())\n+\t\tdmaSyncers.emplace_back(plane.fd, DmaSyncer::SyncType::Write);\n+}\n+\n } /* namespace libcamera */\ndiff --git a/src/libcamera/software_isp/debayer.h b/src/libcamera/software_isp/debayer.h\nindex 6903caae8..d2893d81b 100644\n--- a/src/libcamera/software_isp/debayer.h\n+++ b/src/libcamera/software_isp/debayer.h\n@@ -20,6 +20,7 @@\n #include <libcamera/geometry.h>\n #include <libcamera/stream.h>\n \n+#include \"libcamera/internal/dma_buf_allocator.h\"\n #include \"libcamera/internal/global_configuration.h\"\n #include \"libcamera/internal/software_isp/benchmark.h\"\n #include \"libcamera/internal/software_isp/debayer_params.h\"\n@@ -86,6 +87,7 @@ private:\n \n protected:\n \tvoid setParams(DebayerParams &params);\n+\tvoid dmaSyncBegin(std::vector<DmaSyncer> &dmaSyncers, FrameBuffer *input, FrameBuffer *output);\n };\n \n } /* namespace libcamera */\ndiff --git a/src/libcamera/software_isp/debayer_cpu.cpp b/src/libcamera/software_isp/debayer_cpu.cpp\nindex 6be5cdbd5..8f1b4e53d 100644\n--- a/src/libcamera/software_isp/debayer_cpu.cpp\n+++ b/src/libcamera/software_isp/debayer_cpu.cpp\n@@ -22,7 +22,6 @@\n #include <libcamera/formats.h>\n \n #include \"libcamera/internal/bayer_format.h\"\n-#include \"libcamera/internal/dma_buf_allocator.h\"\n #include \"libcamera/internal/framebuffer.h\"\n #include \"libcamera/internal/global_configuration.h\"\n #include \"libcamera/internal/mapped_framebuffer.h\"\n@@ -752,11 +751,8 @@ void DebayerCpu::process(uint32_t frame, FrameBuffer *input, FrameBuffer *output\n \tbench_.startFrame();\n \n \tstd::vector<DmaSyncer> dmaSyncers;\n-\tfor (const FrameBuffer::Plane &plane : input->planes())\n-\t\tdmaSyncers.emplace_back(plane.fd, DmaSyncer::SyncType::Read);\n \n-\tfor (const FrameBuffer::Plane &plane : output->planes())\n-\t\tdmaSyncers.emplace_back(plane.fd, DmaSyncer::SyncType::Write);\n+\tdmaSyncBegin(dmaSyncers, input, output);\n \n \tsetParams(params);\n \n",
    "prefixes": [
        "v5",
        "12/20"
    ]
}