Patch Detail
Show a patch.
GET /api/1.1/patches/16889/?format=api
{ "id": 16889, "url": "https://patchwork.libcamera.org/api/1.1/patches/16889/?format=api", "web_url": "https://patchwork.libcamera.org/patch/16889/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/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": "<20220801000543.3501-13-laurent.pinchart@ideasonboard.com>", "date": "2022-08-01T00:05:42", "name": "[libcamera-devel,12/13] libcamera: pipeline: simple: Don't disable links carrying other streams", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "813eaacb0cca21a098a060ee0486aae71ee68310", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/16889/mbox/", "series": [ { "id": 3352, "url": "https://patchwork.libcamera.org/api/1.1/series/3352/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3352", "date": "2022-08-01T00:05:30", "name": "libcamera: pipeline: simple: Support the NXP i.MX8 ISI", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3352/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/16889/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/16889/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 0E217C3276\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 1 Aug 2022 00:06:07 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BAD5063337;\n\tMon, 1 Aug 2022 02:06:06 +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 C8A5263317\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 1 Aug 2022 02:06:05 +0200 (CEST)", "from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6012930B;\n\tMon, 1 Aug 2022 02:06:05 +0200 (CEST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1659312366;\n\tbh=TQk6fI5Q2AksPdVVauwqZKx9y+y0bSo+Py1Sg3KJbO4=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=st9lQQvrh22XlAsUva0cbfPrjNBlvFiWGFYwk8zjrViML28/MAJ+OxiyLGGvlFkIM\n\tmFduMyjA9PtirX6qKKrBzeIN+rAm+59XEnJWJXrrsW0/7kJ43RuoBkjXsRUscg9PEt\n\tgCOcJKexRYEOSJh98hQQn0d8txyk9NaVMe6egOHRVF5xWzwaVkewZfrSlWtxuvMM3B\n\tNBKVm5bw1o35SgrwB41kw9psq1/GMCJ9lM1zjQs8hvL2YBNCR6MNbIMOV5TZ1BWwZk\n\tm5ASgj3xM81sDwV7SR5SpxWkdty1U54h5jP2bmeQ3KnHFm0wqHBLnd6se0g1MjrgmE\n\tEixPgyojpbwDg==", "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1659312365;\n\tbh=TQk6fI5Q2AksPdVVauwqZKx9y+y0bSo+Py1Sg3KJbO4=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=WCGM3AWClLtj9kZV60zZu/r6FxPekUsXeGUvusXx8My2qzaJIjisajb9N498e8qac\n\thz9S7cGL7SF+BhNyEjy6qtJzmMG0vZAKyEQG4YflecorCKAq33LrN8hFU8UIdUn3gF\n\tMFMgGHrPBObFO/E+LwGRfDoTp60flHcMVnI/+ldM=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"WCGM3AWC\"; dkim-atps=neutral", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 1 Aug 2022 03:05:42 +0300", "Message-Id": "<20220801000543.3501-13-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.35.1", "In-Reply-To": "<20220801000543.3501-1-laurent.pinchart@ideasonboard.com>", "References": "<20220801000543.3501-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 12/13] libcamera: pipeline: simple: Don't\n\tdisable links carrying other streams", "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>", "From": "Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "From: Phi-Bang Nguyen <pnguyen@baylibre.com>\n\nIf a subdev supports the internal routing API, pads unrelated to the\npipeline for a given camera sensor may carry streams for other cameras.\nThe link setup logic is updated to take this into account, by avoiding\ndisabling links to unrelated pads.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/pipeline/simple/simple.cpp | 28 +++++++++++++++++++++---\n 1 file changed, 25 insertions(+), 3 deletions(-)", "diff": "diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\nindex 2a8811183907..c80e462bc449 100644\n--- a/src/libcamera/pipeline/simple/simple.cpp\n+++ b/src/libcamera/pipeline/simple/simple.cpp\n@@ -221,6 +221,11 @@ public:\n \tstruct Entity {\n \t\t/* The media entity, always valid. */\n \t\tMediaEntity *entity;\n+\t\t/*\n+\t\t * Whether or not the entity is a subdev that supports the\n+\t\t * routing API.\n+\t\t */\n+\t\tbool supportsRouting;\n \t\t/*\n \t\t * The local sink pad connected to the upstream entity, null for\n \t\t * the camera sensor at the beginning of the pipeline.\n@@ -404,9 +409,13 @@ SimpleCameraData::SimpleCameraData(SimplePipelineHandler *pipe,\n \t\t */\n \n \t\tstd::vector<const MediaPad *> pads;\n+\t\tbool supportsRouting = false;\n \n-\t\tif (sinkPad)\n+\t\tif (sinkPad) {\n \t\t\tpads = routedSourcePads(sinkPad);\n+\t\t\tif (!pads.empty())\n+\t\t\t\tsupportsRouting = true;\n+\t\t}\n \n \t\tif (pads.empty()) {\n \t\t\tfor (const MediaPad *pad : entity->pads()) {\n@@ -421,7 +430,9 @@ SimpleCameraData::SimpleCameraData(SimplePipelineHandler *pipe,\n \t\t\t\tMediaEntity *next = link->sink()->entity();\n \t\t\t\tif (visited.find(next) == visited.end()) {\n \t\t\t\t\tqueue.push({ next, link->sink() });\n-\t\t\t\t\tparents.insert({ next, { entity, sinkPad, pad, link } });\n+\n+\t\t\t\t\tEntity e{ entity, supportsRouting, sinkPad, pad, link };\n+\t\t\t\t\tparents.insert({ next, e });\n \t\t\t\t}\n \t\t\t}\n \t\t}\n@@ -435,7 +446,7 @@ SimpleCameraData::SimpleCameraData(SimplePipelineHandler *pipe,\n \t * to the sensor. Store all the entities in the pipeline, from the\n \t * camera sensor to the video node, in entities_.\n \t */\n-\tentities_.push_front({ entity, sinkPad, nullptr, nullptr });\n+\tentities_.push_front({ entity, false, sinkPad, nullptr, nullptr });\n \n \tfor (auto it = parents.find(entity); it != parents.end();\n \t it = parents.find(entity)) {\n@@ -617,6 +628,17 @@ int SimpleCameraData::setupLinks()\n \t\t}\n \n \t\tfor (MediaPad *pad : e.entity->pads()) {\n+\t\t\t/*\n+\t\t\t * If the entity supports the V4L2 internal routing API,\n+\t\t\t * assume that it may carry multiple independent streams\n+\t\t\t * concurrently, and only disable links on the sink and\n+\t\t\t * source pads used by the pipeline.\n+\t\t\t */\n+\t\t\tif (e.supportsRouting) {\n+\t\t\t\tif (pad != e.sink && pad != e.source)\n+\t\t\t\t\tcontinue;\n+\t\t\t}\n+\n \t\t\tfor (MediaLink *link : pad->links()) {\n \t\t\t\tif (link == sinkLink)\n \t\t\t\t\tcontinue;\n", "prefixes": [ "libcamera-devel", "12/13" ] }