Patch Detail
Show a patch.
GET /api/1.1/patches/25408/?format=api
{ "id": 25408, "url": "https://patchwork.libcamera.org/api/1.1/patches/25408/?format=api", "web_url": "https://patchwork.libcamera.org/patch/25408/", "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": "<20251210003139.43606-13-bryan.odonoghue@linaro.org>", "date": "2025-12-10T00:31:29", "name": "[v4,12/20] 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/25408/mbox/", "series": [ { "id": 5644, "url": "https://patchwork.libcamera.org/api/1.1/series/5644/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5644", "date": "2025-12-10T00:31:17", "name": "GPUISP precursor series", "version": 4, "mbox": "https://patchwork.libcamera.org/series/5644/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/25408/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/25408/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 D6B8EBD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 10 Dec 2025 00:32:30 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8C3C361459;\n\tWed, 10 Dec 2025 01:32:30 +0100 (CET)", "from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com\n\t[IPv6:2607:f8b0:4864:20::1035])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 405BE61463\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 10 Dec 2025 01:32:29 +0100 (CET)", "by mail-pj1-x1035.google.com with SMTP id\n\t98e67ed59e1d1-349bb6f9c86so4125317a91.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 09 Dec 2025 16:32:29 -0800 (PST)", "from inspiron14p-linux (p96936b06.osaknt01.ap.so-net.ne.jp.\n\t[150.147.107.6]) by smtp.gmail.com with ESMTPSA id\n\t98e67ed59e1d1-34a70427ea6sm566580a91.3.2025.12.09.16.32.25\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 09 Dec 2025 16:32:27 -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=\"rXhmr9tf\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1765326748; x=1765931548;\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=rXhmr9tf8E/pSsHfJ3Id7S0EGWWtp4txxgBQIRy6o/h1wBIQXI0KNeQ5Txlzz/Muc/\n\tNtvtBG50fYFqjuh0aItONmtry6hSRHXHJCw5cp5JIqadfB39Xl6+CjNkmOD16wtC0v4y\n\tzaui12ymTdWJDrFvMVF95+/A+uqaSE77ULhg1MTXWosILIXGbngGfRoZbADAecpZYb+T\n\tniKyEeMwkHboo4dgMP2732LJonNyWBrHDR4zvMfD8A9fWUvgeXRQeK6yOL+TfmkHOEZs\n\t/+JTI+Hc6OtzMv53gDfHk8XPkWHNXY1V+De3oSdbEIamL8Lr8KYWqjINDVVGDa63SBhF\n\t+neQ==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1765326748; x=1765931548;\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=HQ7bpjahrR1Qlypa3wC6R2SeW0S6u1KO9DOjkeOREYWIngK9X6QjprGzLdTbOrRacu\n\t2Nve1AcmnjzCJYw0qC/LIkhnzUeVIfDJP//m+RJMAbxWt6ZH8CGE4jlIbH97ehNYIsF1\n\t6ryhh0+Q2n1datwvHSrrYBGDC0jwChPXMW+jJG0gMtlQ5XppD/nc4naLetxKyWR9lqsD\n\tlPLJGc19ym9dvlqHFQx10+YmtTVZ3bpOkf/NHLdfmvyB0CJrkC6PawZOHRK6hA1KdRvr\n\tkrfHomUNR4y5iw3ovw/2GcUMfAa3rF4s82EPKCVDMnHNtmOa7gy3BLQ2zxYy7OD8HKjl\n\tpnHg==", "X-Gm-Message-State": "AOJu0Yyq7rTPM6tUiWWD5sXGaU5sF9SjvGymXtdNpGzp4YUvUMiUh1bv\n\tyTBc6cFYvZ6+I38ItBNWfEcYghdh9SQLVxi2xrIaAKUizuI5i8ynlxoPXfSn6A1FgOq/1/DBNMs\n\t+IlRc", "X-Gm-Gg": "AY/fxX7fjLAsFUpREhiIoqubR5/JC/ac9530JSYemgWE7HRocZXEcqns0DJ0twIE2Uf\n\tQmXRe88MkreQ6Jw3mhzHMBleD/AkSI3BZdYFVWCkWhjZ6hSiOpCQyVVYfTilTJHuai+kPbPvWkL\n\ty7P1pwpl878SPbqjqjJj9mDAuVW2lVKsV7t6pzEOR+G++85TrEkkoh4/krQVVQWYLp1g3o4YOfK\n\t6gDRCcxJAEYMm2JwZsuWVBpbEbgV8xiDXXq49JIRBlU7KmzvTjcWcQCgx/46+aYEJoBFqvRV0zY\n\tPmj4vYLPp2H5avNYbvwcDhyeS6I0yJDxUGU8OzX3xIvkUnV3MyCeP6qjQmZi5OmMTzWp2UuWgvf\n\t64rEKmNupSit8XIf30YtbvFnGcBoAWgP+ndNBCbhIe6LdRlgw7S2P6qgAaV762rE3bNrX9z9QXK\n\tqsr4Jc49ocdsdP/2MttASRcHqFWf8FcF7gYhwRh/EQdPLbVczQM818S3kLtORCihy7", "X-Google-Smtp-Source": "AGHT+IFBSZuem/9P6oNQJf4PI2elXEXmtwkEiTH8ZciZrQ6B2JM+JcIMw4ldJGcOf7/DgKktLs2ytQ==", "X-Received": "by 2002:a17:90b:3d06:b0:33b:ba55:f5eb with SMTP id\n\t98e67ed59e1d1-34a727ee9eamr540281a91.1.1765326747648; \n\tTue, 09 Dec 2025 16:32:27 -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 v4 12/20] libcamera: software_isp: Move DMA Sync code to\n\tDebayer base class", "Date": "Wed, 10 Dec 2025 00:31:29 +0000", "Message-ID": "<20251210003139.43606-13-bryan.odonoghue@linaro.org>", "X-Mailer": "git-send-email 2.52.0", "In-Reply-To": "<20251210003139.43606-1-bryan.odonoghue@linaro.org>", "References": "<20251210003139.43606-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": [ "v4", "12/20" ] }