[{"id":38460,"web_url":"https://patchwork.libcamera.org/comment/38460/","msgid":"<b4a07260-5eee-45fb-89c2-ed2aebe87a00@ideasonboard.com>","date":"2026-03-31T13:07:47","subject":"Re: [PATCH v6 5/7] libcamera: mali-c55: Configure camera in\n\tmemory-to-memory","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"2026. 03. 25. 15:44 keltezéssel, Jacopo Mondi írta:\n> Add support for memory-to-memory Camera to the\n> PipelineHandlerMaliC55::configure() function.\n> \n> Start by enabling the IVC links, then configure the CRU and\n> propagate the format to the IVC.\n> \n> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n> ---\n\nLooks ok to me.\n\nReviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n\n\n>   src/libcamera/pipeline/mali-c55/mali-c55.cpp | 24 ++++++++++++++++++++----\n>   1 file changed, 20 insertions(+), 4 deletions(-)\n> \n> diff --git a/src/libcamera/pipeline/mali-c55/mali-c55.cpp b/src/libcamera/pipeline/mali-c55/mali-c55.cpp\n> index 26d368bb9132..be3e38da95ab 100644\n> --- a/src/libcamera/pipeline/mali-c55/mali-c55.cpp\n> +++ b/src/libcamera/pipeline/mali-c55/mali-c55.cpp\n> @@ -1013,8 +1013,9 @@ int PipelineHandlerMaliC55::configure(Camera *camera,\n>   \t\t\tconst MediaEntity *csi2Entity = in.csi2_->entity();\n>   \t\t\treturn csi2Entity->getPadByIndex(1)->links()[0]->setEnabled(true);\n>   \t\t},\n> -\t\t[](MaliC55CameraData::Memory &) {\n> -\t\t\treturn 0;\n> +\t\t[&](MaliC55CameraData::Memory &) {\n> +\t\t\tconst MediaEntity *ivcEntity = ivcSd_->entity();\n> +\t\t\treturn ivcEntity->getPadByIndex(1)->links()[0]->setEnabled(true);\n>   \t\t},\n>   \t}, data->input_);\n>   \tif (ret)\n> @@ -1041,8 +1042,23 @@ int PipelineHandlerMaliC55::configure(Camera *camera,\n>   \n>   \t\t\treturn in.csi2_->getFormat(1, &subdevFormat);\n>   \t\t},\n> -\t\t[](MaliC55CameraData::Memory &) {\n> -\t\t\treturn 0;\n> +\t\t[&](MaliC55CameraData::Memory &mem) {\n> +\t\t\tV4L2DeviceFormat inputFormat;\n> +\n> +\t\t\tint r = mem.cru_->configure(&subdevFormat, &inputFormat);\n> +\t\t\tif (r)\n> +\t\t\t\treturn r;\n> +\n> +\t\t\t/* Propagate the CRU format to the IVC input. */\n> +\t\t\tr = ivcSd_->setFormat(0, &subdevFormat);\n> +\t\t\tif (r)\n> +\t\t\t\treturn r;\n> +\n> +\t\t\tr = ivcSd_->getFormat(1, &subdevFormat);\n> +\t\t\tif (r)\n> +\t\t\t\treturn r;\n> +\n> +\t\t\treturn ivc_->setFormat(&inputFormat);\n>   \t\t},\n>   \t}, data->input_);\n>   \tif (ret)\n>","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 D47CABEFBE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 31 Mar 2026 13:07:52 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9925C62D13;\n\tTue, 31 Mar 2026 15:07:52 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E15656283E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 31 Mar 2026 15:07:50 +0200 (CEST)","from [192.168.33.35] (185.221.143.129.nat.pool.zt.hu\n\t[185.221.143.129])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 9031ACE7;\n\tTue, 31 Mar 2026 15:06:28 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"SNCzwny/\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1774962388;\n\tbh=vSSm818e3bwhJtmBvmV+aU1fdgyGMw7Dp1M2xW0JG1g=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=SNCzwny/LHFAxL6z7f0DmqvYKaA6wms/3LK6tO08qbiTwhheX6c+lcak66KRhPyGb\n\ty2jM0Hz7c9Td8jyZs+vJcOA9jH4yNYuXpxXd0Ygj0PYbuTLCyt0XxbWQAiZ7kppADb\n\t4RxJ8FBqSauF7n619rIxwIiNuQWGPcVZ5NRa2OoQ=","Message-ID":"<b4a07260-5eee-45fb-89c2-ed2aebe87a00@ideasonboard.com>","Date":"Tue, 31 Mar 2026 15:07:47 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v6 5/7] libcamera: mali-c55: Configure camera in\n\tmemory-to-memory","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tDaniel Scally <dan.scally@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20260325-mali-cru-v6-0-b16b0c49819a@ideasonboard.com>\n\t<20260325-mali-cru-v6-5-b16b0c49819a@ideasonboard.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20260325-mali-cru-v6-5-b16b0c49819a@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","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>"}}]