Patch Detail
Show a patch.
GET /api/1.1/patches/27049/?format=api
{ "id": 27049, "url": "https://patchwork.libcamera.org/api/1.1/patches/27049/?format=api", "web_url": "https://patchwork.libcamera.org/patch/27049/", "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": "<20260626113325.3218045-3-bryan.odonoghue@linaro.org>", "date": "2026-06-26T11:33:19", "name": "[v3,2/8] libcamera: software_isp: debayer_egl: Flag dmabuf use once per session not for every frame", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "321250085fb82dd7a408d3172ade7a6674caba8d", "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/27049/mbox/", "series": [ { "id": 6020, "url": "https://patchwork.libcamera.org/api/1.1/series/6020/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=6020", "date": "2026-06-26T11:33:17", "name": "libcamera: software_isp: gpu: Add go faster stripes", "version": 3, "mbox": "https://patchwork.libcamera.org/series/6020/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/27049/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/27049/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 E468BC3302\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 26 Jun 2026 11:33:43 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 351E465ED5;\n\tFri, 26 Jun 2026 13:33:43 +0200 (CEST)", "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 97777658FB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 26 Jun 2026 13:33:39 +0200 (CEST)", "by mail-wm1-x329.google.com with SMTP id\n\t5b1f17b1804b1-4926fe5be4bso691325e9.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 26 Jun 2026 04:33:39 -0700 (PDT)", "from inspiron14p-linux ([109.76.78.98])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-49268fe31b0sm79265985e9.4.2026.06.26.04.33.37\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 26 Jun 2026 04:33:38 -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=\"NBYyOzp0\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1782473619; x=1783078419;\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=lwy1OBNeUsMVfQ9YO3r6PrYvUXJ8It2Sz/tQewNmuR4=;\n\tb=NBYyOzp0P+w0omeSMQF4nxFKE7+h1D1xpgFcedChpddJllK2uCyZQDfwP2Ppv6twY2\n\tVU4Eqv4dg/X1/0X4kn0SPHPI/CXmexXwnXwkBlNc4qmhwO58jtPM8ssw2jbGipnctUXE\n\tigXE/aO8GHbyBkOiVw+HG0MxYExoNi0w9tfpJTjpuCJRuz+1EaCojjsYZMTLNVDsZLcK\n\tgg9zn6tmNO1oVrhTx8riQgaOXaVmmVt9x8f6lJBHzqQHSJmu46BpAzVYif9HgSRk/BtC\n\txm8K8FJMBy3PHO1e1VU+2mBVg2g+WgTtcs4z995LqHDulIKPWxXIg2Y9umEcHjU/67/+\n\tc1qg==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20251104; t=1782473619; x=1783078419;\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=lwy1OBNeUsMVfQ9YO3r6PrYvUXJ8It2Sz/tQewNmuR4=;\n\tb=r0A2z3MoThrM47ogULOyCFqvfYfy54lkHfm1bg7/yhS1X8fzqKo0lFDhwqdqhbvx8u\n\tevpC88gXuLwRN4l/y8+oHvmh6kES65IIkIJfd8Oh7zHYpGdrKYQUKuDFRix1chZrbJWy\n\tDEcLcvkTNnBmWPo2cmhSZ6oXK5oqjM33eunq0q1GILRQDf2f6c4iUAGrLTRNpdRle8Op\n\tpa1hVhY0HIqpu8c0mqGZBijP0GIcr6oGWedkQvUiyWDdsUTuaI4yRSqef5ppeex+nqyV\n\tSB60MhjfKcCvp7UFgZ5568E2PIgLbx+QGztd1ZAtUb9ATnQF9C8RYbn6Hdld7oKtBzdl\n\towxg==", "X-Gm-Message-State": "AOJu0YyYoRKng8VaMaplDUrQ6h9vuiMCneQEurqmHF8kqKcIFDBIPn1c\n\tbv1y7jgG9ct5PUQzB8kdkAHyrNFyECKc9Dc2bcLSU+pUMi1gqEjuv+M+GbSO/KQh+G9UZUa1UWj\n\tqXGWKOxE=", "X-Gm-Gg": "AfdE7ckABwPtsN8/17n3+9UspI/rpcx8RH30Vnln7nqUTxbc7xfNXScyRYWqcmspTPw\n\tb81ndW98pCUYF8wdeU8bR5vaed0AdyN+ad1h1IxrHg4CXuyWPUy/xrM3RfpHBaD3vPlErmlGs50\n\tJ8G+DS0jQLX0Nf+Rb6GYp5d4AfjAiKFtxNjQrXdeFPOL6MRSPCiIRejlbHxZ3Jld5MHwIql6SSN\n\tuoQ7tFx1admP/7gM4tLbV6062TginmkSbENZBqgbIiZ1CloTnyBL/WtjR3IRwrRWEyz/hf5kAS9\n\t4UGD9nnQNI+IYrGI273Q+EiR0KQ0Tb04KNYkIzcQ2LKir5yRaN3KJJRKDCwbfs3Pl7k087kFNxh\n\tafnvgUVV51PEj0htx7yjlVQQrZbQr/tCTxiRb3jC3UJOeqzfFhi0FwHCP5GdHRzIIzJz7Qps9k+\n\t75mxFUQD5bAJHpoXtcaQkyg7bBWQ==", "X-Received": "by 2002:a05:600c:83c9:b0:492:379c:32ee with SMTP id\n\t5b1f17b1804b1-4926fc2f61dmr6292335e9.6.1782473619029; \n\tFri, 26 Jun 2026 04:33:39 -0700 (PDT)", "From": "Bryan O'Donoghue <bryan.odonoghue@linaro.org>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "bryan.odonoghue@linaro.org,\n\tpavel@ucw.cz", "Subject": "[PATCH v3 2/8] libcamera: software_isp: debayer_egl: Flag dmabuf use\n\tonce per session not for every frame", "Date": "Fri, 26 Jun 2026 12:33:19 +0100", "Message-ID": "<20260626113325.3218045-3-bryan.odonoghue@linaro.org>", "X-Mailer": "git-send-email 2.54.0", "In-Reply-To": "<20260626113325.3218045-1-bryan.odonoghue@linaro.org>", "References": "<20260626113325.3218045-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": "Once we get as far a streaming if we have one dmabuf import failure, take\nthat failure as canonical and do not try further imports. Add a flag to\ndebayer_egl which gets reset on any configure() to control this logic, flip\nthe dmabuf bit on the first failure for all subsequent frames.\n\nSigned-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n---\n src/libcamera/software_isp/debayer_egl.cpp | 13 ++++++-------\n src/libcamera/software_isp/debayer_egl.h | 2 ++\n 2 files changed, 8 insertions(+), 7 deletions(-)", "diff": "diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp\nindex 14eeb9a29..53bb67c17 100644\n--- a/src/libcamera/software_isp/debayer_egl.cpp\n+++ b/src/libcamera/software_isp/debayer_egl.cpp\n@@ -316,6 +316,7 @@ int DebayerEGL::configure(const StreamConfiguration &inputCfg,\n \tinputPixelFormat_ = inputCfg.pixelFormat;\n \twidth_ = inputCfg.size.width;\n \theight_ = inputCfg.size.height;\n+\tuse_dmabuf_ = true;\n \n \tif (outputCfgs.size() != 1) {\n \t\tLOG(Debayer, Error)\n@@ -515,21 +516,19 @@ void DebayerEGL::setShaderVariableValues(eGLImage &eglImageIn, const DebayerPara\n \n int DebayerEGL::debayerGPU(FrameBuffer *input, FrameBuffer *output, const DebayerParams ¶ms, std::optional<MappedFrameBuffer> *inMapped, std::optional<DmaSyncer> *inDmaSyncer)\n {\n-\tbool dmabuf_import_succeeded = false;\n-\n \t/* eGL context switch */\n \tegl_.makeCurrent();\n \n \t/* Try to create texture for input buffer via dmabuf import */\n-\tif (!eglImageBayerIn_->dmabuf_import_failed_) {\n-\t\tif (egl_.createInputDMABufTexture2D(*eglImageBayerIn_, input->planes()[0].fd.get()) == 0)\n-\t\t\tdmabuf_import_succeeded = true;\n-\t\telse\n+\tif (use_dmabuf_) {\n+\t\tif (egl_.createInputDMABufTexture2D(*eglImageBayerIn_, input->planes()[0].fd.get()) != 0) {\n+\t\t\tuse_dmabuf_ = false;\n \t\t\tLOG(Debayer, Info) << \"Importing input buffer with DMABuf import failed, falling back to upload\";\n+\t\t}\n \t}\n \n \t/* Otherwise create texture for input buffer via upload from CPU */\n-\tif (!dmabuf_import_succeeded) {\n+\tif (!use_dmabuf_) {\n \t\tinDmaSyncer->emplace(input->planes()[0].fd, DmaSyncer::SyncType::Read);\n \t\tinMapped->emplace(input, MappedFrameBuffer::MapFlag::Read);\n \t\tif (!inMapped->value().isValid()) {\ndiff --git a/src/libcamera/software_isp/debayer_egl.h b/src/libcamera/software_isp/debayer_egl.h\nindex 348d7305b..d8509e9f2 100644\n--- a/src/libcamera/software_isp/debayer_egl.h\n+++ b/src/libcamera/software_isp/debayer_egl.h\n@@ -68,6 +68,8 @@ private:\n \tvoid setShaderVariableValues(eGLImage &eGLImageIn, const DebayerParams ¶ms);\n \tint debayerGPU(FrameBuffer *input, FrameBuffer *output, const DebayerParams ¶ms, std::optional<MappedFrameBuffer> *mappedInputBuffer, std::optional<DmaSyncer> *inputBufferDmaSyncer);\n \n+\tbool use_dmabuf_;\n+\n \t/* Shader program identifiers */\n \tGLuint vertexShaderId_ = 0;\n \tGLuint fragmentShaderId_ = 0;\n", "prefixes": [ "v3", "2/8" ] }