From patchwork Wed Nov 18 09:57:22 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 28977 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id CD9C1BDE17 for ; Wed, 18 Nov 2026 09:58:18 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4E6D96A8EB; Wed, 18 Nov 2026 10:58:18 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="qf+0cjrt"; dkim-atps=neutral Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8BFF96A8CE for ; Wed, 18 Nov 2026 10:58:04 +0100 (CET) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-4b467581b98so8969695e9.0 for ; Wed, 18 Nov 2026 01:58:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1794995884; x=1795600684; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=OvVj1MPSIuvxR3EjJvzP8Vaao2f2RfJ+Xkp/Rxj9hXs=; b=qf+0cjrtjISVGSeN5qwVdaQzbysyduS3LQYTi6z0DGivFC/cUNuDIz9GCp/VLEwMs+ Q9q37b4MVu2vY9DBfH4TwsqoO6Qe/QPFVXPy7Cs3x9bHoyBczhwuzB/TJX6HQRwUbXQR 9Eb47bMKQUTHhn2S33zfd+0CGva8VxVe1a5q5iYPlixHLHtZhZJiRN99LBQgYQ1Q5V9n dqZUyboOoJP0i3CcZL/bS9D0IERXX9R2Sa1Cw5pcg3imDB4nT8Jb9k4joWANnDY9kNte vpp5Pa1O/nKu7WUrkSjQKv0ZtkC6SJs+DduAFjJns4BGDLnpKajQ2URsMk2U3JMhwzKx Nwhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1794995884; x=1795600684; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=OvVj1MPSIuvxR3EjJvzP8Vaao2f2RfJ+Xkp/Rxj9hXs=; b=NTt5hr9dAi/gtUYOAxPpz0vnx+up8pmAJgtJUYH+a1nYPkw1D0cVNM4PE9Af+Mce3Q kpd2hfj5wa6HMKBZ+A4WttLZtC/SekCHatHWSKHPQyfSESPpxZwh0+LxEq9VAl6h+Td7 Nng90dL6uGXnXZLD79gUYmdq1xENlTtkXxZFlEbXUHruX/ANfbAn6FLxzN7vsFxIXdGz 5GXXlGFR8lUJHWlLWIvRhcG17PKq+thGl4sSzeSbPDf9oI0IQXDBsWZ3l8YIo/cpO5a+ Ha21MLVpEUq2oeDjHujMTMr0P2UQPrLQMr9VH2nKx+XG+s7on9qQnTzkb1wTQ3EKVk8S 311A== X-Gm-Message-State: APuU4Z+YqK1B5gNj0wMPRUPN1UTus4MnSmRMb6XQLoPTpIaSp5Tdod9u UnSraAlOjeruuxFNqdbUu5Knb9+V0KZ2HVxOkk1ejQ9sJ3Scly1AWUosKurzJdk2R7lKFcuJzKJ fY5Gh7yc= X-Gm-Gg: AYBFou3+XnBrbiG5ICIUagJlMvo/AacPtrtiDzyI5/5P9s/8cNk1Xwh5hmsCVgjUQDA 1Je8EDcwOc//RZpQEeRfJxNRnhiDFMw64O9EoLXhnC44ECjUKydfIe/Rka2Ik1DGrW3II3xq5BI kvhX4084j2X6tpIcrXePv96vqCblKFDuySmBzuCoGpPCybhNujuh8mlBttDgx8HiI6RWw7f8/Bx +nzLz0wKzFVARml3iCSvwzBsu/jzUR//UwpcJNdfg21V/asmzkQTi4IMJ0sbH4+2o8Hml4p+1iU KXwT9aH5K/2VNsFE2rFuye8r/kWJuLoLg8KxTuqirmNer8BZtIhG0OPkuu9QNmWD5Byu7Iu19XX yi8likxVd15ewJAxqu7KAXG8u94EjVsIHoxbpaI+FSYVykb49r/uj9OMxsIVrC779ic/VvNK39r 9YrqJH5cw+izAhyMIdeHTVTQY1Kpv0HeApkYny2z0jsLdw/s1jFnz2Fnobmx1Y91gK5x/DofygF 2NPuiyVkz3v29s/korIP+t/TyFMpBNLFvUJ6J6V95X/YQzi8G287pDEKu51qnKcH3CT/3FSaNRt R8o+6hLcl03Wt5+8lUMzZRvYdQOkjV+5y6a2KE0WzQE9toM= X-Received: by 2002:a05:600c:8b8b:b0:4a6:30c3:1114 with SMTP id 5b1f17b1804b1-4bb7da19d2emr34245245e9.12.1794995884024; Wed, 18 Nov 2026 01:58:04 -0800 (PST) Received: from inspiron14p-linux ([109.76.187.112]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4a655f9f4a7sm3940871f8f.34.2026.11.18.01.58.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Nov 2026 01:58:03 -0800 (PST) From: Bryan O'Donoghue To: libcamera-devel@lists.libcamera.org Cc: rstrode@redhat.com, robert.mader@collabora.com, barnabas.pocze@ideasonboard.com, Bryan O'Donoghue Subject: [RFC PATCH v2 15/26] libcamera: software_isp: egl: Add Ping/Pong buffers with start/stop bindings only Date: Wed, 18 Nov 2026 10:57:22 +0100 Message-ID: <20261118095735.170587-16-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261118095735.170587-1-bryan.odonoghue@linaro.org> References: <20261118095735.170587-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Add in the Ping/Pong texture buffers, don't bind them to anything yet. Signed-off-by: Bryan O'Donoghue --- src/libcamera/software_isp/software_isp_instance_gpu.cpp | 6 ++++++ src/libcamera/software_isp/software_isp_instance_gpu.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/libcamera/software_isp/software_isp_instance_gpu.cpp b/src/libcamera/software_isp/software_isp_instance_gpu.cpp index 31b57d2a0..85820b267 100644 --- a/src/libcamera/software_isp/software_isp_instance_gpu.cpp +++ b/src/libcamera/software_isp/software_isp_instance_gpu.cpp @@ -389,6 +389,10 @@ int SoftwareIspInstanceGpu::start() if (initBayerShaders(inputPixelFormat_, outputPixelFormat_)) return -EINVAL; + /* Intermediary ping/pong textures */ + eglImagePingPong_[0] = std::make_unique(gpuIspShaderPassDemosiac_.glFormat_, outputSize_.width, outputSize_.height, outputConfig_.stride, GL_TEXTURE1, 1); + eglImagePingPong_[1] = std::make_unique(gpuIspShaderPassDemosiac_.glFormat_, outputSize_.width, outputSize_.height, outputConfig_.stride, GL_TEXTURE2, 2); + return 0; } @@ -396,6 +400,8 @@ void SoftwareIspInstanceGpu::stop() { eglImageOutCache_.clear(); eglImageInCache_.clear(); + eglImagePingPong_[1].reset(); + eglImagePingPong_[0].reset(); gpuIspShaderPassDemosiac_.stop(); diff --git a/src/libcamera/software_isp/software_isp_instance_gpu.h b/src/libcamera/software_isp/software_isp_instance_gpu.h index 695fbd8d5..9da9e717b 100644 --- a/src/libcamera/software_isp/software_isp_instance_gpu.h +++ b/src/libcamera/software_isp/software_isp_instance_gpu.h @@ -71,6 +71,8 @@ private: eGLImage *getCachedInputFrameBuffer(FrameBuffer *input, std::optional *inMapped, std::optional *inDmaSyncer); eGLImage *getCachedOutputFrameBuffer(FrameBuffer *output); + /* Pointer to object representing input texture */ + std::unique_ptr eglImagePingPong_[2]; /* Pointer to object representing input texture */ std::deque>> eglImageInCache_;