{"id":25461,"url":"https://patchwork.libcamera.org/api/1.1/patches/25461/?format=json","web_url":"https://patchwork.libcamera.org/patch/25461/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20251210-mali-cru-v2-4-e26421de202b@ideasonboard.com>","date":"2025-12-10T14:39:20","name":"[v2,4/7] libcamera: mali-c55: Configure camera in memory-to-memory","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"b16c4e3bcdeefccf640e988e54bcfaa27bf025db","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/1.1/people/143/?format=json","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/25461/mbox/","series":[{"id":5649,"url":"https://patchwork.libcamera.org/api/1.1/series/5649/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5649","date":"2025-12-10T14:39:16","name":"libcamera: mali-c55: Add support for memory-to-memory","version":2,"mbox":"https://patchwork.libcamera.org/series/5649/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/25461/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/25461/checks/","tags":{},"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 2CFEABD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 10 Dec 2025 14:39:40 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4B571614A6;\n\tWed, 10 Dec 2025 15:39:38 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 75E4E61489\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 10 Dec 2025 15:39:33 +0100 (CET)","from [192.168.1.106] (mob-5-90-55-146.net.vodafone.it\n\t[5.90.55.146])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 162656DC;\n\tWed, 10 Dec 2025 15:39:32 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"KTbiaYwI\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1765377572;\n\tbh=lbZcUA7WzPjLCGZZ9wA2Hk/FxcQMuQFHgMl10GVovrI=;\n\th=From:Date:Subject:References:In-Reply-To:To:Cc:From;\n\tb=KTbiaYwIIe07bxqR8d8rp6ORl912t6RLuJvs8qk/goliI0Mz4xStNRSuK6nqRcQSZ\n\tUPHM6CUKO8go/jH6PiAz9ZRmGVimghEqTp4RpNPCY2eE0E6J2Wuell903f5ux7nsb7\n\tN6KhNsQZtKu9ek/3irM9o5lsue0DLMaVm/czcf34=","From":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Date":"Wed, 10 Dec 2025 15:39:20 +0100","Subject":"[PATCH v2 4/7] libcamera: mali-c55: Configure camera in\n\tmemory-to-memory","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"7bit","Message-Id":"<20251210-mali-cru-v2-4-e26421de202b@ideasonboard.com>","References":"<20251210-mali-cru-v2-0-e26421de202b@ideasonboard.com>","In-Reply-To":"<20251210-mali-cru-v2-0-e26421de202b@ideasonboard.com>","To":"Daniel Scally <dan.scally@ideasonboard.com>, \n\tlibcamera-devel@lists.libcamera.org","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","X-Mailer":"b4 0.14.2","X-Developer-Signature":"v=1; a=openpgp-sha256; l=1784;\n\ti=jacopo.mondi@ideasonboard.com; h=from:subject:message-id;\n\tbh=lbZcUA7WzPjLCGZZ9wA2Hk/FxcQMuQFHgMl10GVovrI=;\n\tb=owEBbQKS/ZANAwAKAXI0Bo8WoVY8AcsmYgBpOYYiPRo69EWop+IY9nrHGSJcy9jOlGZUI9kfN\n\tc77b4bElfaJAjMEAAEKAB0WIQS1xD1IgJogio9YOMByNAaPFqFWPAUCaTmGIgAKCRByNAaPFqFW\n\tPIOjEADCikhHIVINMoubyAnpylo9zD2hWZ1hGIQ6riw4+tu52y+BSvRaqurmtbeAdwu3KNwHMBN\n\tDo2b9eggp5AZhYhUTr33OKftHzCc0ZGKoAfsuSttyV28cwNMRaV9jgHdpLg1475nSnWF9bBiq/v\n\trPj2bRNYqo/PhP7+2iHRnT8zewhRIX2BRPzZ5OW9qYcG4GF1cu70oFqRHwE/tsRTC9v+VOPWFMe\n\tjVc5Ekvp5kuTNIIb0YAfVeROfnarTu5piPKJBdZdx29cNPnaUAn32ln08O6CpHr70WNYYWH+eYA\n\tZlI2MzRBCZRi1TkwdXbty3sDDXYBSsB0vCkGbejerA6jH66EbB5YWU04jW6tQwhlmExxPdNyv7+\n\tzNRvuqja/lOqS8BXVNZNsvHe+WwdnGvm6/8KbM7OzGal7wcDU7LUq463EmYhHQ/tdmzCrk4L9Dv\n\tLRAhQKyrORzKYf6ZQuyNN/2RQJ72w+im5wlaEI5yrM9Ylz51hhRlVqIZDDPoX8m6nmrcc+yMZJv\n\tnwd1pwR5RBGp0We72pZktynq6LfHJXb2vOI+v2vI545CsooKtUopOrjfrdDMUugcixduZ+Valqs\n\ty21D4tWUUV+y+XUFdJjX37gKUxRZEvfcVOcBOt6uq+dgVXV0PgPnxK7Etj9vmVak4lB36xFAGjD\n\tLdqpDIoi/5vyt+A==","X-Developer-Key":"i=jacopo.mondi@ideasonboard.com; a=openpgp;\n\tfpr=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>,\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>"},"content":"Add support for memory-to-memory Camera to the\nPipelineHandlerMaliC55::configure() function.\n\nStart by enabling the IVC links, then configure the CRU and\npropagate the format to the IVC.\n\nSigned-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n---\n src/libcamera/pipeline/mali-c55/mali-c55.cpp | 27 +++++++++++++++++++++++++--\n 1 file changed, 25 insertions(+), 2 deletions(-)","diff":"diff --git a/src/libcamera/pipeline/mali-c55/mali-c55.cpp b/src/libcamera/pipeline/mali-c55/mali-c55.cpp\nindex c0c14338ddb3f1d0075df3b3d3d154bc1b5d678a..8dcc51e27020c754004cd98cbdf73e771275b059 100644\n--- a/src/libcamera/pipeline/mali-c55/mali-c55.cpp\n+++ b/src/libcamera/pipeline/mali-c55/mali-c55.cpp\n@@ -1104,9 +1104,12 @@ int PipelineHandlerMaliC55::configure(Camera *camera,\n \t\tret = csi2Entity->getPadByIndex(1)->links()[0]->setEnabled(true);\n \t\tbreak;\n \t}\n-\tcase MaliC55CameraData::Memory:\n+\tcase MaliC55CameraData::Memory: {\n+\t\tconst MediaEntity *ivcEntity = ivc_->entity();\n+\t\tret = ivcEntity->getPadByIndex(1)->links()[0]->setEnabled(true);\n \t\tbreak;\n \t}\n+\t}\n \tif (ret)\n \t\treturn ret;\n \n@@ -1133,7 +1136,27 @@ int PipelineHandlerMaliC55::configure(Camera *camera,\n \t\tret = data->csi2()->getFormat(1, &subdevFormat);\n \n \t\tbreak;\n-\tcase MaliC55CameraData::Memory:\n+\t}\n+\tcase MaliC55CameraData::Memory: {\n+\t\tV4L2DeviceFormat inputFormat;\n+\n+\t\tret = data->cru()->configure(&subdevFormat, &inputFormat);\n+\t\tif (ret)\n+\t\t\treturn ret;\n+\n+\t\t/* Propagate the CRU format to the IVC input. */\n+\t\tret = ivc_->setFormat(0, &subdevFormat);\n+\t\tif (ret)\n+\t\t\treturn ret;\n+\n+\t\tret = ivc_->getFormat(1, &subdevFormat);\n+\t\tif (ret)\n+\t\t\treturn ret;\n+\n+\t\tret = input_->setFormat(&inputFormat);\n+\t\tif (ret)\n+\t\t\treturn ret;\n+\n \t\tbreak;\n \t}\n \t}\n","prefixes":["v2","4/7"]}