Patch Detail
Show a patch.
GET /api/1.1/patches/25113/?format=api
{ "id": 25113, "url": "https://patchwork.libcamera.org/api/1.1/patches/25113/?format=api", "web_url": "https://patchwork.libcamera.org/patch/25113/", "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": "<20251120232019.3590-13-bryan.odonoghue@linaro.org>", "date": "2025-11-20T23:20:09", "name": "[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/25113/mbox/", "series": [ { "id": 5599, "url": "https://patchwork.libcamera.org/api/1.1/series/5599/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5599", "date": "2025-11-20T23:19:57", "name": "GPUISP precursor series", "version": 1, "mbox": "https://patchwork.libcamera.org/series/5599/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/25113/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/25113/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 F13F5C3330\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 20 Nov 2025 23:20:48 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A410860ABB;\n\tFri, 21 Nov 2025 00:20:48 +0100 (CET)", "from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com\n\t[IPv6:2a00:1450:4864:20::42e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7290060AA8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 21 Nov 2025 00:20:46 +0100 (CET)", "by mail-wr1-x42e.google.com with SMTP id\n\tffacd0b85a97d-42b3108f41fso884878f8f.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 20 Nov 2025 15:20:46 -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-477bf3af0ecsm11618415e9.9.2025.11.20.15.20.44\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 20 Nov 2025 15:20:45 -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=\"TxplIrwn\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1763680846; x=1764285646;\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=3KNxt7sun2ScTJ5zZqBzup1sCzFwl/1rNCfJO4h1TH8=;\n\tb=TxplIrwn/TiFgIlvgapq6Kk17FhjHHSmrbdLfm5SRsfvMdz/TLJENh1V3RoE0/RGvn\n\tMXhWsfO72ZH91tIrVoNo0HlWELFeFCioln/b9FIljXbYWzK41bf6X26XW4DJkXENoElJ\n\tJpAZwsDUIzNNS74kDVlHgzrYtqCvetDJitAi8M1OJU/vdT/UI9ncafexIQC4xsOnepUn\n\toJSOR8BZOdtE3nylotYh/cW+Fex9/PxZwdLa4Yg8RO0yXM+jV/qz0s0oPP1iMXwUU9VP\n\tQJt+oIp5Dp93mR8H01AEf2Sg3XkdIV99PRrm6ytmvvS0qzFGRHCB2EBsbFcW1+Fzal/c\n\tfCOA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1763680846; x=1764285646;\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=3KNxt7sun2ScTJ5zZqBzup1sCzFwl/1rNCfJO4h1TH8=;\n\tb=NnzcfTjb1b2nGf15miEeulkAkFaxXEjo0+oolDZMepiN9k9uE4wVzlfbbwmbSqEQtc\n\tyDVstdvkErYWdqDY3zmOAmHVsgVmkwBGxvfnnWYdH1SVmsFtxrQMgsrV9jRySA6ifLGt\n\t8M+MyCgN5B4RkLuezqhLW7P4/52uCSXRiZve2OoSeq29XbmmX5lPXQoZ41C93DL6fN8C\n\tM4WB8+UBEC+RChoZ8SkTbONBdadbF4CnJYlDQKvBYWVq8FywkfZ9xaFbj9ulIv/KoNQt\n\tpJxrBuxH9Bj2dDM8tJ77EjGjwx+tltPzfomNBPyjFaLONu3pC8Az2bHWZsqjEVYnkP+g\n\t9jjQ==", "X-Gm-Message-State": "AOJu0Yzp6T/CUR658bOkU1LJAG/733z4EehyAHWC3cJ5JRN5dw8TaaQb\n\ttDE2GsopgbCi/FWxFIU0OGY/S2FVuiEygEK1poWCSBG9ylNpLRh0odivmdHBAXy0k01DHSvmWEk\n\tWx9lskEg=", "X-Gm-Gg": "ASbGnctMjtImxO8mVK06MtMnKVByZ3INleQRdhFhtX+hC7QBh6z5KUEMW/OO17gcU/p\n\t5b3z7GnwVGRClvSYlzfXMDnPPhC5uOm2UoSGOuaINGAPeiPayNlwVhfvq+q8G/1cxCUuaiO3nri\n\t9d36f8wi+R1tyDHaoV8G/DJTyljkNFI33aEdatblWo1yZr4AskaaRV3VwMADrzZfl6crhYg/fSj\n\tb9Pne4W/JJ4DqUy3NKyChQPQPbMdlBgbeh/dDRCZW1KzXrM/0WUuQ6azQVrTSO2zYd0Ujs5lHyQ\n\tWseYQFQ1yx1IlUe2iUgF6rlGUGWVpE77MPQd5tp6CTcbNWXt/u5peRpG/EOfRcqXDuOttI6cvkU\n\tnUMyIsyJjJwSVxym9CdXapYBYayKCWv86qTUfCkZsISvOSv/pIGNKbvP/9wf3FO0UkjhzGCiydt\n\toBixg7kXOyuLrG8snBotAIFc+2roS2ra2dd3Epe4fYQGVlL9e44hjOV8Skg6J8GDzmHeuvDvyX7\n\t4iUDw==", "X-Google-Smtp-Source": "AGHT+IEMYk/DzaHQP8V2b5WyW49AXlrJ9oDC2fIKgWUv7cN9ImUR+AqG/usqkp8FulD3KCFTzsPLSw==", "X-Received": "by 2002:a05:6000:2281:b0:42b:2e1c:6341 with SMTP id\n\tffacd0b85a97d-42cc1abe28bmr86173f8f.9.1763680845742; \n\tThu, 20 Nov 2025 15:20:45 -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 12/22] libcamera: software_isp: Move DMA Sync code to Debayer\n\tbase class", "Date": "Thu, 20 Nov 2025 23:20:09 +0000", "Message-ID": "<20251120232019.3590-13-bryan.odonoghue@linaro.org>", "X-Mailer": "git-send-email 2.51.2", "In-Reply-To": "<20251120232019.3590-1-bryan.odonoghue@linaro.org>", "References": "<20251120232019.3590-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 af40f5107..795c68af7 100644\n--- a/src/libcamera/software_isp/debayer.cpp\n+++ b/src/libcamera/software_isp/debayer.cpp\n@@ -221,4 +221,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 0b5e11abd..334211215 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@@ -114,6 +115,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": [ "12/22" ] }