{"id":27245,"url":"https://patchwork.libcamera.org/api/covers/27245/?format=json","web_url":"https://patchwork.libcamera.org/cover/27245/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260706113900.2530549-1-bryan.odonoghue@linaro.org>","date":"2026-07-06T11:38:53","name":"[v5,0/7] libcamera: software_isp: gpu: Add go faster stripes","submitter":{"id":175,"url":"https://patchwork.libcamera.org/api/people/175/?format=json","name":"Bryan O'Donoghue","email":"bryan.odonoghue@linaro.org"},"mbox":"https://patchwork.libcamera.org/cover/27245/mbox/","series":[{"id":6041,"url":"https://patchwork.libcamera.org/api/series/6041/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=6041","date":"2026-07-06T11:38:53","name":"libcamera: software_isp: gpu: Add go faster stripes","version":5,"mbox":"https://patchwork.libcamera.org/series/6041/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/27245/comments/","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 5AD82C330A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  6 Jul 2026 11:39:13 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 14F3D6600A;\n\tMon,  6 Jul 2026 13:39:13 +0200 (CEST)","from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com\n\t[IPv6:2a00:1450:4864:20::32a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 94EA065EFF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  6 Jul 2026 13:39:11 +0200 (CEST)","by mail-wm1-x32a.google.com with SMTP id\n\t5b1f17b1804b1-493b7612475so26996255e9.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 06 Jul 2026 04:39:11 -0700 (PDT)","from inspiron14p-linux ([109.77.44.220])\n\tby smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-47a9de1e6ccsm24796084f8f.5.2026.07.06.04.39.10\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 06 Jul 2026 04:39:10 -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=\"kRAdH0AH\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1783337951; x=1783942751;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:from:to:cc:subject:date:message-id:reply-to;\n\tbh=At957s+NLE3W2I757JtLgXtLGAc/5hZFbfrHbc7598k=;\n\tb=kRAdH0AHbfG98RDQw8mRv+dOBGSk9FAuUo3N7KnbsB6AjhAr+t/DtfPsUcwbeAoP9l\n\t8BpLSlSmxnC345SYXAuJ35fv8yPpC8r4h1cVz/5q+Z7nSlmv8wu6sIVcW9xsnqozA+Uy\n\tVsqhtOZP+0pR7rFxjbz/YqU8whBWh5tbczA1KWP7n29e+aJDMiOPyXpQO4oYLwskkO9X\n\tgeQFSo7600mgDvPkQvF4U6DYxUMRrYzhfO8THxGc4RV/sQPLmWgXIrDVJMYZJwk1/H+7\n\tP+GAvrvScjdoRYkYrZl30vnGidTllSvu+iXo4WIM9yMg/ii7efBiqOPOOOy+9JZXKfw0\n\tEu5g==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20251104; t=1783337951; x=1783942751;\n\th=content-transfer-encoding:mime-version:message-id:date:subject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cz2IvRxQ8gk9tpiwNm4eHgI2R1AQOzZA\n\t3D1gjED6CiKDP1INtA4N7OyM7qY5m1","X-Received":"by 2002:a05:6000:601:b0:475:f0f0:9ef2 with SMTP id\n\tffacd0b85a97d-47aaee4d0abmr11638369f8f.55.1783337951079; \n\tMon, 06 Jul 2026 04:39:11 -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 v5 0/7] libcamera: software_isp: gpu: Add go faster stripes","Date":"Mon,  6 Jul 2026 12:38:53 +0100","Message-ID":"<20260706113900.2530549-1-bryan.odonoghue@linaro.org>","X-Mailer":"git-send-email 2.54.0","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":"v5:\n- use activateBindTexture in createTexture2D - Robert\n\nLink: https://gitlab.freedesktop.org/camera/libcamera-softisp/-/pipelines/1700395\n\nv4:\n- Sizes cache as indicated at configure\n- Ejects oldest entry on cache miss if cache is full. This allows an external\n  application to keep feeding buffers in.\n- Reverts to using per image dma-buf flags - this is because again we can\n  have heterogeneous sources of buffers.\n- Takes Barnabas' suggested SharedFD patch - Robert\n- Accumulates RB as indicated by Milan\n\nLink: https://gitlab.freedesktop.org/camera/libcamera-softisp/-/pipelines/1700354\n\nv3:\n- Fixes a missing switch default from libcamera ci loop - bod\n\nv2:\n- Reverts to debayer_egl specific caching mechanism - Laurent\n- Pivots on dmabuf handle as key for cache. dmabuf handle\n  must be unique between start() and stop() for eglCreateImageKHR to work - Barnabas\n- Ensures sizeof cache doesn't exceed the number of expected buffers\n  as discovered during configure() - Barnabas\n- Drops GL_16F patch - Robert\n- Drops the \"input\" name from createInputTexture2D() - Robert\n- Adds RB as specified by Robert\n\nv1:\nFollowing on from Robert Mader's ask to bring forward GPUISP multi-pass\ncache operations to mainline first, I've done some work to enable that.\n\nThis series implements an input/output texture caching scheme which results\nin an overall absolute 4.5 millisecond - roughly improvement in performance\nper processed frame. This is a bit of an odd result as I was expecting to\nshave a particular % off of each frame in the order of 20% or so. My best\nguess is that particular paths we are optimising here are around texture\ngeneration and these are \"fixed costs\" on the CPU side.\n\nOne very welcome outcome of this series is genuine zero-copy on dma-buf\npaths we can support it on i.e. on paths where the CSI2 and GPU strides\nagree.\n\nThe numbers cited in my example are for non dma-buf handle upload and\ndma-buf handle render-to-texture on the output so, in fact I'd expect to\nsee a much larger improvement on systems where dma-buf handle is used on\nboth paths.\n\nAs it is on my test reference systems I have a 50% improvement per frame\nfor one system, a 20% improvement on another system or we could view it as\na fixed 4.5 millisecond improvement on both.\n\nI implemented the cache around V4L2BufferCache as per Barnabas' suggestion,\nincluding a fixed cache size.\n\n\nBryan O'Donoghue (6):\n  libcamera: software_isp: debayer_egl: Pass eglImage as parameter to\n    setShaderVariables\n  libcamera: egl: Add new helper attachTextureToFBO\n  libcamera: egl: Add createOutputTexture2D\n  libcamera: egl: Add activateBindTexture\n  libcamera: egl: Add updateTexture2D\n  libcamera: software_isp: debayer_egl: Implement input/output frame\n    caching mechanism\n\nRobert Mader (1):\n  libcamera: base: shared_fd: Add hash template\n\n Documentation/Doxyfile-common.in           |   2 +\n include/libcamera/base/shared_fd.h         |   9 ++\n include/libcamera/internal/egl.h           |   5 +\n src/libcamera/egl.cpp                      |  96 ++++++++++++++---\n src/libcamera/software_isp/debayer_egl.cpp | 116 +++++++++++++++------\n src/libcamera/software_isp/debayer_egl.h   |  15 ++-\n 6 files changed, 194 insertions(+), 49 deletions(-)"}