| Message ID | 20260401-mali-cru-v8-0-44c48f990e28@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 33E5BBDCBD for <parsemail@patchwork.libcamera.org>; Wed, 1 Apr 2026 16:26:03 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 176A762D61; Wed, 1 Apr 2026 18:26:02 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="ati0rXHz"; 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 C97B262CCA for <libcamera-devel@lists.libcamera.org>; Wed, 1 Apr 2026 18:26:00 +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 65B45CE7; Wed, 1 Apr 2026 18:24:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1775060677; bh=ymrvY16Mno/32SuX/A4Rs+Zh0DsbpkRNcf5/PCF/fZI=; h=From:Subject:Date:To:Cc:From; b=ati0rXHze/J5xxB1bYW0Rm0itYLoCK0ZkRMjJ6ATOIFBWz0GN3nKcBQX6NbybdrJu cSDsg5Alkk9nzswMqk6m3mXavwx6qc9tH5jd0tagH+HM+kPZL8bVKZ+xUtUHRsegh8 dd6RvJ3SUjWO2p4I9Lt5tDeyvfJOwzt6yIJq4LSM= From: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Subject: [PATCH v8 0/8] libcamera: mali-c55: Add support for memory-to-memory Date: Wed, 01 Apr 2026 18:25:49 +0200 Message-Id: <20260401-mali-cru-v8-0-44c48f990e28@ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAA1HzWkC/3XQTW7DIBAF4KtErEvFzGAbuuo9qi74GRqkxo5wa 7WKfPfiSJVYhOUDvjcjbmLlknkVL6ebKLzlNS9zDebpJMLZzR8sc6xZoMIBUA3y4j6zDOVbMgI m4zwRsqjPr4VT/rlXvb3XfM7r11J+780bHKcPSjaQSkYD3g8p8UTuNUd26zL7xZX4HJaLOLo2b DyoxmP1jKNGiFyvfcdT623jqfqUbEqKtDLedrz+96MioMbr6oOK1gcTokm9/YeeH6rXJlliTYB Wd/zYeGz/b6zew+hV0NaA7c2fGk/Q+OmYHxzHYKxxih/4fd//AH/hX9InAgAA 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=3450; i=jacopo.mondi@ideasonboard.com; h=from:subject:message-id; bh=ymrvY16Mno/32SuX/A4Rs+Zh0DsbpkRNcf5/PCF/fZI=; b=owEBbQKS/ZANAwAKAXI0Bo8WoVY8AcsmYgBpzUcWfJyH2FdHK5SV/4v8fO5oPpH5Kwc2dDryY +MNvnZ+ilWJAjMEAAEKAB0WIQS1xD1IgJogio9YOMByNAaPFqFWPAUCac1HFgAKCRByNAaPFqFW PDjMD/9d7Ad9TgPiEmVzd+37qKTxBBsO04+Fc9SZTu7ZKiSGTSAD4ntTrMBW92+3ouWw4Zos6tB ZJz9SAYXg1lDCKkWFhX0goHKT1CIKnFukOUHcpcisOKCDFoM9C7JQxmkSIEWNPQbpP3hOVmrSXj KsJ3RzRpXZ5TirvPR+dDBmNSJdcYy9vJjUw4vPh2t7FNCZU4++y9jXiFIEQdIWl9k7Tz6F8/GmE p5/X3WMcJDkGY+zLj+bTISTGRtH35Iswo9c5mrFVn/LQBlySTjdGh/8lWdDqtMq/vm2zkPPp+HK rIvKM9+wP87B0qE/Puv+LbCh+ygZQlJKfkYuPyAAx7I6QjNNwFQFs3heg+6RFFmpgr0lF0MMRmz BFqHvuyS9wT8LNy02ao2kLdybluEw0LkzqobEp3uTj+ESfHtnVNYVM/mZukYesKv40pckHR6QML x2JwxPgs+lVrzM6FHpe4kmQzWzVtBDXlypHVJn5B7JzF+OEbtivVmn8Ibf2LKS4DSbilLrXF7mV MhoWtdn4WCNdQTeeObbqJFdFSV3+S3irVM8f/DGi4fEKvTeAmelVh4aA4Gl06oAcJ7uwbP1g3Nb GpJRE65XQ6qnzzy3TN0yhOJAQweYC2wPxA4mOlgQMsfOTEOu7NL4QFxTyVKCJYciSUG6Xy/QzE0 JlqvqQqby96sS+w== 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 v8: - Limit max in-flight requests to 8 - Minor cosmetics 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 | 670 +++++++++++++++++++------- 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(+), 188 deletions(-) --- base-commit: 2a1c75504c789b686b5b37ed8729f632ec81d2f0 change-id: 20251205-mali-cru-e212f8ab332e Best regards,