Show a patch.

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

{
    "id": 24657,
    "url": "https://patchwork.libcamera.org/api/patches/24657/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/24657/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/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": "<20251015012251.17508-13-bryan.odonoghue@linaro.org>",
    "date": "2025-10-15T01:22:24",
    "name": "[v3,12/39] 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/people/175/?format=api",
        "name": "Bryan O'Donoghue",
        "email": "bryan.odonoghue@linaro.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/24657/mbox/",
    "series": [
        {
            "id": 5503,
            "url": "https://patchwork.libcamera.org/api/series/5503/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5503",
            "date": "2025-10-15T01:22:12",
            "name": "Add GLES 2.0 GPUISP to libcamera",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/5503/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/24657/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/24657/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 7B23FBF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 15 Oct 2025 01:23:17 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E1C9D60632;\n\tWed, 15 Oct 2025 03:23:16 +0200 (CEST)",
            "from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com\n\t[IPv6:2a00:1450:4864:20::52b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 00FEC6061D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 15 Oct 2025 03:23:07 +0200 (CEST)",
            "by mail-ed1-x52b.google.com with SMTP id\n\t4fb4d7f45d1cf-63babfdb52cso4419460a12.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 14 Oct 2025 18:23:06 -0700 (PDT)",
            "from inspiron14p-linux.nxsw.local (188-141-3-146.dynamic.upc.ie.\n\t[188.141.3.146]) by smtp.gmail.com with ESMTPSA id\n\ta640c23a62f3a-b5ccd7b202dsm98348466b.82.2025.10.14.18.23.05\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 14 Oct 2025 18:23:05 -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=\"Bik/fmAP\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1760491386; x=1761096186;\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=WKIwKbS/EjWJeU3jpVyRd0DduiSXuAV1yXbTpM8/ki4=;\n\tb=Bik/fmAP+HB3nHUoMS7mom/lqWcDIH4lXt/t6SivO+9xhy6+1HHWWdg6P6aEbYSjpZ\n\tt8n8GUSMt8rjWXuwaDJ5XJt+JgOTSmvxJFFWMpa2pYGXnWidDoO3sl8eyBFnHDtz/nx4\n\tWOFvG9j5gPTx+xEf4WlsXxDvmwnO432KZWFiCzuuzjhF5FEZE6FaepzDAW2HuY0b3Xkh\n\teTF21ngU8NjybvqAHUpYNs6azcrpWdhztQGi85nAow3qxrOY8SkzhDF00aJIDfLcWxjC\n\txcFNx8/cSPbXGiOzTchbHf5hY6+JXZIHbrzmh7sa4qSxlG9bjyOEBefrJZuj2G2GVVwl\n\tfHDA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1760491386; x=1761096186;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=WKIwKbS/EjWJeU3jpVyRd0DduiSXuAV1yXbTpM8/ki4=;\n\tb=WZaAZSgF3eVXd9YlZvljJCLHfcw/82uWAYs6y89gb6j+A/T6YfL8FtV0s4BXSgisOF\n\tHflm4RTKJQ/bzZvBxZYRn5yfXRdBiDAFJVrqltJx9OoHa2YGu4smjNkcnmE0qKrsXpru\n\tU2Nbu5IsgWayzoTkJTmkm6csiVmpu7fUjiqH6t8OBkpHbqanv/oEZx/nl7nu+pyoLiWb\n\tBtrMhYgFcNIoGp3X4GehiaBA+J94npDt+EoVdQe1pt7huLsmH1kOOGnzpv1qkH6eNedf\n\t/IrdIiXyzQo2c/tAn0DRlmQfDJBhUZbKuH9NajzaCz6gcbrcRK5/UWIku1ZT23TSMwaK\n\t0/FA==",
        "X-Gm-Message-State": "AOJu0YyHXY62fsmgSPeGggAFhUm+dOTD8eWyXGVapPv4l0zaBtzpPuRm\n\tvVezHmSCD4vKzwsjeZJAd/YepSJ/+ebHhy1nizpi+vB6qWRavDQSS8wRrCenbnzsHPHnKfH8VVm\n\tZWaGR",
        "X-Gm-Gg": "ASbGncsCjGT7ubkg4n2tIL0J0ufMFN2tfWAHQ5Zh7UQ9WDZ5sMnj4u7HZ2X7wq+NDr/\n\tohvzWbdBRtb9hofNSJWCpgF27RL1pQgitbG2KOoqWlPkBUfr40+j25mhnwg44amKwt+VsBPenmN\n\tCtCuttNuiTORvGgb7d9vCouhd7hMuxLWV6Z8Gqarf2Yqme/oLZiTVmA8WH5DQm9dV6nAiQyTfth\n\tIABUyCO7lBqclrbo7oBqIqKabzDOpZ9q4TCrWXP2a+alxkJVhmH4UH7Ul/NRHnsdBBROn6ufKXg\n\t8HRe7sIt5SvH066bmA1mFvONC5yziBuQIqffkYP0lm2lhd1+FJmjpQWf1lBnhczZqb052jyBNda\n\tFwK08gkcYRXvSzOyqwDww734DPukFtF7pQmX7w31MH3nPKeeHiNUm+Px5/rjUmmAfu0zND4fr5Z\n\tdmhz7e6f0Iceg1EvwAxMbIg8JLzwIYVg==",
        "X-Google-Smtp-Source": "AGHT+IENxzjapHIHlyqqztQrZzyYkGp3ZfsjUoIDsLUtcaaZ7se0ufJdtMJkcsnix54aL5YligUDhQ==",
        "X-Received": "by 2002:a17:906:4789:b0:b3e:f028:2d57 with SMTP id\n\ta640c23a62f3a-b50acc3132amr3152829166b.57.1760491386279; \n\tTue, 14 Oct 2025 18:23:06 -0700 (PDT)",
        "From": "Bryan O'Donoghue <bryan.odonoghue@linaro.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "hdegoede@redhat.com, mzamazal@redhat.com, bryan.odonoghue@linaro.org,\n\tbod.linux@nxsw.ie",
        "Subject": "[PATCH v3 12/39] libcamera: software_isp: Move DMA Sync code to\n\tDebayer base class",
        "Date": "Wed, 15 Oct 2025 02:22:24 +0100",
        "Message-ID": "<20251015012251.17508-13-bryan.odonoghue@linaro.org>",
        "X-Mailer": "git-send-email 2.51.0",
        "In-Reply-To": "<20251015012251.17508-1-bryan.odonoghue@linaro.org>",
        "References": "<20251015012251.17508-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>\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 cf74b92b..847067aa 100644\n--- a/src/libcamera/software_isp/debayer.cpp\n+++ b/src/libcamera/software_isp/debayer.cpp\n@@ -214,4 +214,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 c04c289d..98d88fb3 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@@ -96,6 +97,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 6be5cdbd..8f1b4e53 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": [
        "v3",
        "12/39"
    ]
}