Patch Detail
Show a patch.
GET /api/patches/21913/?format=api
{ "id": 21913, "url": "https://patchwork.libcamera.org/api/patches/21913/?format=api", "web_url": "https://patchwork.libcamera.org/patch/21913/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20241115101334.453104-13-dan.scally@ideasonboard.com>", "date": "2024-11-15T10:13:32", "name": "[v6,12/14] libcamera: mali-c55: Enable links between resizer and video node", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "0533fb6bd63fd88582673b2dbad4a3e8fae1ac1d", "submitter": { "id": 156, "url": "https://patchwork.libcamera.org/api/people/156/?format=api", "name": "Dan Scally", "email": "dan.scally@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/21913/mbox/", "series": [ { "id": 4793, "url": "https://patchwork.libcamera.org/api/series/4793/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4793", "date": "2024-11-15T10:13:20", "name": "Miscellaneous Mali-C55 Pipeline Fixes", "version": 6, "mbox": "https://patchwork.libcamera.org/series/4793/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/21913/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/21913/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 A6961C330C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 15 Nov 2024 10:14:18 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B36C765884;\n\tFri, 15 Nov 2024 11:14:17 +0100 (CET)", "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 2F02265875\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Nov 2024 11:13:52 +0100 (CET)", "from mail.ideasonboard.com\n\t(cpc141996-chfd3-2-0-cust928.12-3.cable.virginm.net [86.13.91.161])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8EFA8157E;\n\tFri, 15 Nov 2024 11:13:37 +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=\"u5f7HGHm\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1731665617;\n\tbh=6V0GJ1y1Ty69KjFXvve9kGzrRfWqUvoCB5D1UZb8kbo=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=u5f7HGHmLrm/1wMBeBuCp31HiwhS8SmYbUswjNvF6MoNuK/BX6NwrOjg5R8GB+4OF\n\tHCLDIB5fNddYurD0Tj35iHh6mjRrtKmjuafsLE1I1x1S3oHba/4BZnWQIAdCo8iaQh\n\tMfzVd3UNSYVWt6NoqS2Bgi5RUsV/jibiq1G+U9p4=", "From": "Daniel Scally <dan.scally@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Anthony.McGivern@arm.com, Daniel Scally <dan.scally@ideasonboard.com>,\n\tJacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>", "Subject": "[PATCH v6 12/14] libcamera: mali-c55: Enable links between resizer\n\tand video node", "Date": "Fri, 15 Nov 2024 10:13:32 +0000", "Message-Id": "<20241115101334.453104-13-dan.scally@ideasonboard.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20241115101334.453104-1-dan.scally@ideasonboard.com>", "References": "<20241115101334.453104-1-dan.scally@ideasonboard.com>", "MIME-Version": "1.0", "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>" }, "content": "The mali-c55 driver now expects links to video devices to be enabled\nin order for those devices to be streamed from / to. Enable the media\nlink between the resizers and their associated video device to fulfil\nthe requirement.\n\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nSigned-off-by: Daniel Scally <dan.scally@ideasonboard.com>\n---\nChanges in v6:\n\n\t- Used MediaDevice::link() to find and cache the links in MaliC55Pipe,\n\t which simplies their enablement in ::configure()\n\nChanges in v5:\n\n\t- None\n\n src/libcamera/pipeline/mali-c55/mali-c55.cpp | 25 ++++++++++++++++++++\n 1 file changed, 25 insertions(+)", "diff": "diff --git a/src/libcamera/pipeline/mali-c55/mali-c55.cpp b/src/libcamera/pipeline/mali-c55/mali-c55.cpp\nindex e973abc2..c0206ea2 100644\n--- a/src/libcamera/pipeline/mali-c55/mali-c55.cpp\n+++ b/src/libcamera/pipeline/mali-c55/mali-c55.cpp\n@@ -509,6 +509,7 @@ private:\n \tstruct MaliC55Pipe {\n \t\tstd::unique_ptr<V4L2Subdevice> resizer;\n \t\tstd::unique_ptr<V4L2VideoDevice> cap;\n+\t\tMediaLink *link;\n \t\tStream *stream;\n \t};\n \n@@ -835,6 +836,17 @@ int PipelineHandlerMaliC55::configure(Camera *camera,\n \t\tStream *stream = streamConfig.stream();\n \t\tMaliC55Pipe *pipe = pipeFromStream(data, stream);\n \n+\t\t/*\n+\t\t * Enable the media link between the pipe's resizer and the\n+\t\t * capture video device\n+\t\t */\n+\n+\t\tret = pipe->link->setEnabled(true);\n+\t\tif (ret) {\n+\t\t\tLOG(MaliC55, Error) << \"Couldn't enable resizer's link\";\n+\t\t\treturn ret;\n+\t\t}\n+\n \t\tif (isFormatRaw(streamConfig.pixelFormat))\n \t\t\tret = configureRawStream(data, streamConfig, subdevFormat);\n \t\telse\n@@ -1028,6 +1040,12 @@ bool PipelineHandlerMaliC55::match(DeviceEnumerator *enumerator)\n \tif (frPipe->cap->open() < 0)\n \t\treturn false;\n \n+\tfrPipe->link = media_->link(\"mali-c55 resizer fr\", 1, \"mali-c55 fr\", 0);\n+\tif (!frPipe->link) {\n+\t\tLOG(MaliC55, Error) << \"No link between fr resizer and video node\";\n+\t\treturn false;\n+\t}\n+\n \tfrPipe->cap->bufferReady.connect(this, &PipelineHandlerMaliC55::imageBufferReady);\n \n \tdsFitted_ = !!media_->getEntityByName(\"mali-c55 ds\");\n@@ -1044,6 +1062,13 @@ bool PipelineHandlerMaliC55::match(DeviceEnumerator *enumerator)\n \t\tif (dsPipe->cap->open() < 0)\n \t\t\treturn false;\n \n+\t\tdsPipe->link = media_->link(\"mali-c55 resizer ds\", 1,\n+\t\t\t\t\t \"mali-c55 ds\", 0);\n+\t\tif (!dsPipe->link) {\n+\t\t\tLOG(MaliC55, Error) << \"No link between ds resizer and video node\";\n+\t\t\treturn false;\n+\t\t}\n+\n \t\tdsPipe->cap->bufferReady.connect(this, &PipelineHandlerMaliC55::imageBufferReady);\n \t}\n \n", "prefixes": [ "v6", "12/14" ] }