Patch Detail
Show a patch.
GET /api/1.1/patches/25226/?format=api
{ "id": 25226, "url": "https://patchwork.libcamera.org/api/1.1/patches/25226/?format=api", "web_url": "https://patchwork.libcamera.org/patch/25226/", "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": "<20251127022256.178929-13-bryan.odonoghue@linaro.org>", "date": "2025-11-27T02:22:44", "name": "[v2,12/22] libcamera: software_isp: Move DMA Sync code to Debayer base class", "commit_ref": null, "pull_url": null, "state": "superseded", "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/25226/mbox/", "series": [ { "id": 5616, "url": "https://patchwork.libcamera.org/api/1.1/series/5616/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5616", "date": "2025-11-27T02:22:32", "name": "GPUISP precursor series", "version": 2, "mbox": "https://patchwork.libcamera.org/series/5616/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/25226/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/25226/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 29F56C3260\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Nov 2025 02:23:33 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C099460AB8;\n\tThu, 27 Nov 2025 03:23:32 +0100 (CET)", "from mail-wm1-x329.google.com (mail-wm1-x329.google.com\n\t[IPv6:2a00:1450:4864:20::329])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 503E8609E0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Nov 2025 03:23:30 +0100 (CET)", "by mail-wm1-x329.google.com with SMTP id\n\t5b1f17b1804b1-477b1cc8fb4so1601975e9.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 Nov 2025 18:23:30 -0800 (PST)", "from inspiron14p-linux.ht.home (188-141-3-146.dynamic.upc.ie.\n\t[188.141.3.146]) by smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-4790b0e21e8sm71549495e9.15.2025.11.26.18.23.27\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 26 Nov 2025 18:23:29 -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=\"phwsoRtw\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1764210210; x=1764815010;\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=FxhcasCeQZyIjm4rZ1EZcRl2EhvSjHrBdXO0dhQMDwQ=;\n\tb=phwsoRtwxMdBgUjIAgdFtPl7pcTHXnQDqPH0sdqvwoUno82zjGjrwPpdYrriNI94WE\n\t0BddhYIkHN6yD3z9NUMRfCbcHhMhOD4MeUAo+5vb31n0l8H38Zg/xminv8dakSBMzeXg\n\tMUU5DXWWIvneKKSJqobDODg+GhRhP7yerfOL/gTMYpW3IvRhkbXLPQ3gVV3vjjDHPhw7\n\tlPMHZv+ov1ABbh0aQr0mRTAS++4FdS2q0TavsHJGUevEgdcsCCIT6hWD6RXISFAsEtUi\n\tgav03RHp49ytRczkrPiBApR71xNM9+nGdL5bV6D5MhBICJ3bDaUdsKFngXlcPSsqs3HS\n\tZT/Q==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1764210210; x=1764815010;\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=FxhcasCeQZyIjm4rZ1EZcRl2EhvSjHrBdXO0dhQMDwQ=;\n\tb=NRmIRXRg4sJ9E0Ft7Aj8DbUkzHYaI+s0xpUK6/FICYJ6BVPo67NkLfeUtU6rCIpFnr\n\tyaD/HtAwQ+GVzHq2+aJWFM4dSSzCPxD0GBP2aMUR5uVrXHyAKIIa+fnhNqqeQsAF7slW\n\tfPhU3Mv3kGWIXhwKEkuonTnNR9nVFcrHzJhrW7OU36OxVS5/780btxiwBEaupIxfiUIm\n\tgBiV6D5qoHWiwAaNEvrvfb40G74OSKgNh12iKrblG5fxbhii3UvNwjOcMO52ALHnaEx2\n\t5xJTosuA5zLqiOPxaOpnEDkG1x662Vf3KnCYWswVGk8eJlQgkRGHiSoKTDYPo9vh4UOe\n\tSGFA==", "X-Gm-Message-State": "AOJu0Yxda+gqfEqdC8L/NMP0yNPUNmTK/+qgXfVEJeDLOmLm3sq/zQ0L\n\tAJmJ10VEsZDi3DmlMorKZHz2yDhu6fcjlAON+3ai2rggVOipAMUYhrLVgzkeTC4dMyJiIAEEEsD\n\tXWSrq2OM=", "X-Gm-Gg": "ASbGncvXPLmAIelWop2IW8JFMWmQxwxJmFzmryTJJrfqxcAJqBxpCtMqtptUpX+xuzu\n\tGyoTJ+ecwyZPUZJLPgTb8pPzwJkdYTusUvyjCTJNIAQTo8Y3T+NGOQ9mC0pOB+GqghAs7qbfeG7\n\tZT8qL3fhyk6nyDey2sJizh9tTIippCYkLdiDuHYzqz/fFHp78/t6yPl5Cjg7p4jKH4buHXuofym\n\tRk3BSpsZ5fj30x7FhNwwNV0k+hxNHs0WKVghx3/R1+8+0YYUygF8Uq/PCqIi6ZV5AG+Rm/lz0H3\n\tN0ZUnxpwJLsVcKwoIozNWtLqlET7W8qMpnIY0cPaqdggF7B5kV207LskdeJjYY72vP2tTNSYAKp\n\tMQv7vOKnZUFQmakFZsk4UooxK4yxRtT3ktrT0SRUoV8sdEqLVue3u0LFVL26Xcr2fy5/w9roEqV\n\tB+6FEqQMWoqRxUEB4EZckIOH+UZA2P1u5TdKgF3T2+CiW0a1TP/wiXkdBfzOoOaax/MRs=", "X-Google-Smtp-Source": "AGHT+IGmXcU0S1DIAOSz/y67/itjsd2YKozqbxgiJcSS5mKbezUQDAnp/wtLNx9XCfDK/OH1JXxWcQ==", "X-Received": "by 2002:a05:600c:c8c:b0:471:d2f:7987 with SMTP id\n\t5b1f17b1804b1-47904b23c04mr76789345e9.26.1764210209717; \n\tWed, 26 Nov 2025 18:23:29 -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 v2 12/22] libcamera: software_isp: Move DMA Sync code to\n\tDebayer base class", "Date": "Thu, 27 Nov 2025 02:22:44 +0000", "Message-ID": "<20251127022256.178929-13-bryan.odonoghue@linaro.org>", "X-Mailer": "git-send-email 2.51.2", "In-Reply-To": "<20251127022256.178929-1-bryan.odonoghue@linaro.org>", "References": "<20251127022256.178929-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 ¶ms)\n \tgammaLut_ = params.gammaLut;\n }\n \n+/**\n+ * \\fn void Debayer::dmaSyncBegin(DebayerParams ¶ms)\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 ¶ms);\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": [ "v2", "12/22" ] }