| Message ID | 20260331-mali-cru-v7-0-4caedc898a0e@ideasonboard.com |
|---|---|
| Headers | show
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 [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 7CFE7BDCBD for <parsemail@patchwork.libcamera.org>; Tue, 31 Mar 2026 16:36:53 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1CAC062D25; Tue, 31 Mar 2026 18:36:52 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="UEaVBPd2"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id F14AE6274D for <libcamera-devel@lists.libcamera.org>; Tue, 31 Mar 2026 18:36:49 +0200 (CEST) Received: from [100.93.44.16] (net-93-65-100-155.cust.vodafonedsl.it [93.65.100.155]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 4E11020FF; Tue, 31 Mar 2026 18:35:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1774974927; bh=b/Hx/7+9QMq148+RXNXby3l0SyP+hEYduuOIZdzdcrg=; h=From:Subject:Date:To:Cc:From; b=UEaVBPd2JhBIZbZBhI/Sbmvog/npUHEJ8Les+IGZYr/aO03Hlxvxio7xtMSxnzgLn yqYlFM2JfLAKlOzNBxU7Tn3Uq9E8yv1zXJ+PsgFF7g/25AhnNcPRRMtenzr0st+ZGY c0nKGqISrKSpGi5aP+D8Usjry0WxbnjvvCqmrWEo= From: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Subject: [PATCH v7 0/8] libcamera: mali-c55: Add support for memory-to-memory Date: Tue, 31 Mar 2026 18:36:28 +0200 Message-Id: <20260331-mali-cru-v7-0-4caedc898a0e@ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAAz4y2kC/3XQy2pDIRAG4FcJrmtxxku0q75H6cLL2AjNMWh7a Ann3WsCBRc5y1/9/hm8sk6tUGcvhytrtJZe6jLC8enA4skvH8RLGpmhQA0oND/7z8Jj++aEgNn 6ICUSG88vjXL5uVe9vY98Kv2rtt978wq30wclK3DBk4UQdM50lP61JPK9LqH6lp5jPbNb14qTB zF5HJ7QKIRE4zrseDl7N3k5fM4uZyGVsMHtePXvjZAgJ6+GjyK5EG1MNu/tr/e8Hl7Z7CQpCej UjjeTx/n/zPABTBBROQvu0fxt2/4Agbc1mecBAAA= X-Change-ID: 20251205-mali-cru-e212f8ab332e To: Daniel Scally <dan.scally@ideasonboard.com>, libcamera-devel@lists.libcamera.org Cc: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>, Jacopo Mondi <jacopo.mondi@ideasonboard.com> X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=3376; i=jacopo.mondi@ideasonboard.com; h=from:subject:message-id; bh=b/Hx/7+9QMq148+RXNXby3l0SyP+hEYduuOIZdzdcrg=; b=owEBbQKS/ZANAwAKAXI0Bo8WoVY8AcsmYgBpy/ggsaidWypM28AInsJv9gjc8SGTbatU9Z/MP 9ne/F3IqjGJAjMEAAEKAB0WIQS1xD1IgJogio9YOMByNAaPFqFWPAUCacv4IAAKCRByNAaPFqFW PL9sD/wKPRxLzkibZGC00eS1P1d2y/hDRkj1lsWVMFps44f9gLaCYbFE/6mcfwIV48ZZrwHetY6 lR+WjATvpjlWyEMAktZfDtl/EsQH8QZFY0MmJtSG7pUCUfMVje213GR1+emrLZt44yMuP9t8xU0 +wiJbFhPYUJrNOYxMuXRKCG3VQICvBstRQo3sWR4Okpp+gYtstobakttcOhw10kgkHzXWHAzDEf hU/1a2ilk9tuVEnikhURv8aUnqO3ytdwkFtzzW3GZkWkWezF0Jx5IId4wQjL6F954gv1ozTzE8/ F9vU9lS71r7B0R4Fh6mIfUvwpsJddd0xOjrO5cEE+5Vh9yaUiCbHOtZOKtXMn8CW3A/NoMiXst+ qPRhZ89AXvQHs/Od3OmSPKOs8Y9GXr8VvMf+DNYZiz3t8z8GXCQd4hqDOiezHQFex3HhwoNXh6u wuktS5xD404tMJ/Hz5rNFlON7m4za9puW8O7hyaXB81eSuOvRkvIEONx+mvRF7PeYGo0UFRFTnR EQRGsW/e96t7QXSobxqJN1NCwl0MIX2eGgq7wqN//ucYjtzS54nS/+tSWeFKucoBvMLrnDxfmTz 2bsx+rCCUGxSMhTTqtPRra0vhhb6Ie0cg7FWg+HOUDFZvW1P+OSKm0hp87CLRXUdhRLnz+9pV2i pc4nUIV6B3uUo4w== X-Developer-Key: i=jacopo.mondi@ideasonboard.com; a=openpgp; fpr=72392EDC88144A65C701EA9BA5826A2587AD026B 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>, <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>, <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> |
| Series |
|
| Related |
show
|
Add support for m2m camera operations in the mali-c55 pipeline handler. The series targets SoCs like the Renesas RZ/V2H(P) one where the Mali-C55 ISP is integrated in m2m mode. The CSI-2 receiver (CRU) saves images to memory and the ISP is fed through a dedicated DMA engine that provides memory interfacing capabilities. The series starts by adding support for the RZG2LCRU class (named after the media device name) and then plumbs memory-to-memory operations in the pipeline handler. Tested on RZ/V2H(P) EVK with imx708 camera sensor. Dan, could you re-test with Inline mode please ? I should have collected your fix that restored proper operations with Inline. Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> --- Changes in v7: - Allocate the same number of buffers on Mali and CRU side: - Add a patch that defines the number of in-flight requests and use them to allocate buffers on the MaliC55 side - Make the number of CRU buffers to be allocated configurable - Now that the number of Requests in-flight matches the number of buffers available for stats, params and CRU, we can remove the pendingRequests_ queue and confidentially ASSERT() that we'll always have buffers available for capture - handle components set-up in registerMemoryInputCamera Changes in v6: - Address use-after-free errors reported by Barnabas by splitting CRU buffer release from device streamoff - Address proper handling of Camera::stop() when in m2m using ASan. I suspect inline would probably need fixes as well when run with ASan - Minor improvements to code style Changes in v5: - Use overloaded std::visit when possible - Adjust indentation Changes in v4: - Move the overloaded visitor helper to utils.h Changes in v3: - Drop dynamic polymorphism and use overloaded visitor in MaliC55CameraData. The result is neater in my opinion. - Address Barnabas' comments I missed in v2 Changes in v2: - Almost a complete rework of the CameraData which is now a class hierarchy. I'm not sure the result is that much cleaner, but hey, I'm using templates and pattern with weird names, so it ought be better for sure --- Daniel Scally (1): libcamera: mali-c55: Add RZG2LCRU class Jacopo Mondi (7): libcamera: utils: Add overloaded visitor helpers libcamera: mali-c55: Split TPG and Inline camera handling libcamera: mali-c55: Register memory input camera libcamera: mali-c55: Configure camera in memory-to-memory libcamera: mali-c55: Do not rely on bufferCount libcamera: mali-c55: Implement capture for memory-to-memory libcamera: mali-c55: Fix sensor size computation include/libcamera/base/utils.h | 7 + src/libcamera/base/utils.cpp | 35 ++ src/libcamera/pipeline/mali-c55/mali-c55.cpp | 669 +++++++++++++++++++------- src/libcamera/pipeline/mali-c55/meson.build | 3 +- src/libcamera/pipeline/mali-c55/rzg2l-cru.cpp | 253 ++++++++++ src/libcamera/pipeline/mali-c55/rzg2l-cru.h | 70 +++ src/libcamera/pipeline/virtual/virtual.cpp | 10 +- 7 files changed, 860 insertions(+), 187 deletions(-) --- base-commit: 2a1c75504c789b686b5b37ed8729f632ec81d2f0 change-id: 20251205-mali-cru-e212f8ab332e Best regards,