From patchwork Wed Jun 11 01:32:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 23541 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 596EDC3335 for ; Wed, 11 Jun 2025 01:34:45 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D179E68E03; Wed, 11 Jun 2025 03:34:44 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="W5UyCopA"; dkim-atps=neutral Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0E6A668DFD for ; Wed, 11 Jun 2025 03:34:42 +0200 (CEST) Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-43cfe63c592so69825475e9.2 for ; Tue, 10 Jun 2025 18:34:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1749605681; x=1750210481; 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; bh=0m12xjA1BCDmYO4m2lL9R9mWTByBEaOo21WJw27iUYo=; b=W5UyCopAG3UQFjDfbglkRtdO9IQY6u9edbWIr3MMMI8MveCjpccJ8x2kHOcznJAQuA p/3sRgjxUHXivqGnDH0NTA8weLCe4qoO9442Ak7x7fmNfKNKg7NWjnxhxldPOn35bzJi VuJqHTqI0ADcBII/02QeKDnK8O4leHVhlvM1bA0fTPmxKzhRi/5RjIrf+D40g4RRx8/Y usybb2v5b0m26IVf3az1n545qhOJX++L0hh3BrMWp3U2CBbsoRfYsZtNui0O14/hENyp 1R4wjfa+WoOkOFvzO+UAvSJXQ65/n4kGZzj4o7VL+ITt7q62dnbOx6IDSKyatl+CZW5l rPCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749605681; x=1750210481; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0m12xjA1BCDmYO4m2lL9R9mWTByBEaOo21WJw27iUYo=; b=Zn5KvWG+ed7VfGinwwj42pPzfiQNmYuePRoaiyaHxhojP1HtLPQYkE+x1+IHDHvIQ+ fgtO5fGmf0brEsyHNWkPLuvs+ihMR3t8UwEF1qkRXVLM9XX7T6IJoR/QZ+nK5soZX4+1 ipzfWgObket/792WPQwUW8YuAniFCAoPdjI9rxRAQiFJQyO06uAVOen4l4FZggVpvTMC Tky/I35IaVr5lwIrFA8Pjfq+besc+6C3znBsxfXELRceznQ0BFp6DpSgON2O3uYouhvY Fw4Ug+ELNUFXJC6cQCzMKOCcRfML5IuxHcTprk5RdeOx4gkdSQz7MgAwjDPrQdGK0rnV XR8A== X-Gm-Message-State: AOJu0YykypGaT+zIpwS3uMB3z9FnBfnk/i2Fnj+bXz7XAiWpNk0o31cf GSMvrOJD5QZu9N3q7QKbfTdsaTx9fMggWKMi1vU3bAX7uP65EjLN+t35zMcTMizRP3AiOW4TNRV PxGhyXGo= X-Gm-Gg: ASbGncuO8dotg0XUpem8hQDP5XFvMrunwRUZc7t/TMAxynwjSegpk/nQ16jpwpnO/Yz CpAZEuqV5fjjVVZK/VpnP4BAcZOK6wou9Y83l7gyC4Jx38thucnj/Uq8X68qzcEOI4YFC/ar0v1 PxxlT9PFd/gyy20yAZBo4YFx0RFcn4wHFhgemcQWo0ynOBmliK+yLpIXAZrPFPvDgBgt8+s3ffO pRdM5gE53GZLo7NDnwV4VvR7OHOWKBzgXAlqdpLordv7olfhZ6EJrcmPDzfUG8mLd75nsIE8x6U iudENW84z5qpJo3STbW8PrM1lRJjKGQFaVg7pWezTL/peBqPszW0hhhdjn85ZTiHxQJ5IcfGzpO //+DSyl+5ZUUEOTD5bnGweOm/lYhLT2dfo1QnCMrhOA== X-Google-Smtp-Source: AGHT+IFNp0Sjvcl8jPoLVZmh7Sst78F3yLOfgBT480EJV5km6K6+s1njWkZ5YChVHD4PZMxnqdO2Gg== X-Received: by 2002:a05:600c:3b93:b0:439:643a:c8d5 with SMTP id 5b1f17b1804b1-453247f88a8mr11495815e9.0.1749605681310; Tue, 10 Jun 2025 18:34:41 -0700 (PDT) Received: from inspiron14p-linux.ht.home (188-141-3-146.dynamic.upc.ie. [188.141.3.146]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4532514138asm5680625e9.3.2025.06.10.18.34.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Jun 2025 18:34:40 -0700 (PDT) From: Bryan O'Donoghue To: libcamera-devel@lists.libcamera.org Cc: Bryan O'Donoghue Subject: [PATCH 35/35] libcamera: software_isp: Add a gpuisp todo list Date: Wed, 11 Jun 2025 02:32:45 +0100 Message-ID: <20250611013245.133785-36-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250611013245.133785-1-bryan.odonoghue@linaro.org> References: <20250611013245.133785-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" List the series of things to do in GPU ISP in perceived order of difficulty. Signed-off-by: Bryan O'Donoghue --- src/libcamera/software_isp/gpuisp-todo.txt | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 src/libcamera/software_isp/gpuisp-todo.txt diff --git a/src/libcamera/software_isp/gpuisp-todo.txt b/src/libcamera/software_isp/gpuisp-todo.txt new file mode 100644 index 00000000..0ff82f81 --- /dev/null +++ b/src/libcamera/software_isp/gpuisp-todo.txt @@ -0,0 +1,42 @@ +List the TODOs in perceived order of ease. + +24 bit output support: + - Take the BPP we already capture and get a 24 bit GBM surface + - Pass a compile-time parameter to the shaders to tell them to do + gl_FragColor = rgb not gl_FragColor = rgba + +Make GPUISP default: + - Right now the environment variable allows over-riding to swtich + from CPU to GPU. + - Once we support 24 BPP output on GPUISP we will have the same + pixel format support as CPU and can set the default to GPU without + regressing functionality + +glTexture1D: + - Initial code was developed for < GLES 2.O but since we have fixed + on GLES >= 2.0 this means we can use glTexture1D + - Provided this is so amend the shaders to do val = texture(x, y, 0); + not texture(x, y, 0.5) the 0.5 is because of using glTexture2D + +Surfaceless GBM: + - We get a GBM surface and then have to swap buffers + If we rework for surfaceless GBM and EGL then the swap buffer can + be dropped. + +dma-buf texture upload: + - Currently we pass the input buffer to glCreateTexture2D. + We should be able to make the upload of the input buffer go faster + by using eglCreateImageKHR and enumerated the dma-buf contents. + +Render-to-texture: + - Right now we render to the GBM provided surface framebuffer + and then memcpy from that buffer to the target output buffer. + This necessitates flushing the cache on the target buffer in + addition to the memcpy(). + - Render-to-texture where we generate the target framebuffer + directly from a dma-buf handle will mitigate the memcpy() phase. + - It should be the case then that the consumer of the output buffer + i.e. the thing that's not libcamera is responsible to flush the cache + if-and-only-if that user writes to the buffer. + - We need to flush the cache on the buffer because we are memcpying() to it. +