Show a patch.

GET /api/1.1/patches/23651/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 23651,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/23651/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/23651/",
    "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": "<20250625084212.858487-4-naush@raspberrypi.com>",
    "date": "2025-06-25T08:41:18",
    "name": "[v1,3/3] pipeline: rpi: Set a default route for entities where applicable",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "7000e35ecb0f7c35e4fab0fac30b74481cb9fab3",
    "submitter": {
        "id": 34,
        "url": "https://patchwork.libcamera.org/api/1.1/people/34/?format=api",
        "name": "Naushir Patuck",
        "email": "naush@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/23651/mbox/",
    "series": [
        {
            "id": 5246,
            "url": "https://patchwork.libcamera.org/api/1.1/series/5246/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5246",
            "date": "2025-06-25T08:41:15",
            "name": "Raspberry Pi: Media graph enumeration updates",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/5246/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/23651/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/23651/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 D67F9BDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 25 Jun 2025 08:42:24 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 37FE268DF3;\n\tWed, 25 Jun 2025 10:42:23 +0200 (CEST)",
            "from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com\n\t[IPv6:2a00:1450:4864:20::32a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3759B68DEC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 25 Jun 2025 10:42:17 +0200 (CEST)",
            "by mail-wm1-x32a.google.com with SMTP id\n\t5b1f17b1804b1-4531898b208so2438045e9.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 25 Jun 2025 01:42:17 -0700 (PDT)",
            "from NAUSH-P-DELL.pitowers.org ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-3a6e80f296bsm3974297f8f.60.2025.06.25.01.42.16\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 25 Jun 2025 01:42:16 -0700 (PDT)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"ngSI95bk\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1750840936; x=1751445736;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=lrSqQB4Cti6BoBr67+f3uwE0CYQ6ivP0q/pERTPPsCU=;\n\tb=ngSI95bksc6jNXmGKjKkPj0folxUZUyRsg659iZWtkKFv+Als7WslqpfRaP2qemy/v\n\t15QhT2jL6+IENC4Wb4OPc3rk1BoaqMz1jfYmljwJanqzxMwy0to+Y/veQf3w93cMXD8w\n\tjsNWtUE/Q4JWDng2KthU93emSfa4tA1E4/4SPRAzjmgl34nN4ndNfl85gl9duZa2fwUh\n\tFkHUOKKeiX1kIqbilDcmTtp1JTroPR5xUIJZDs62UxIEAs5S+ckQ2fMbbZ9BrUHAeOX8\n\tGOPgG2fGIQ2ejf4fn+C3OiqbWaNpJy+ouQ7ZlnOpNchk0fym+v/7dvBhJswnyUEjjWMm\n\tR8Hg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1750840936; x=1751445736;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=lrSqQB4Cti6BoBr67+f3uwE0CYQ6ivP0q/pERTPPsCU=;\n\tb=Wdw4cJ0vp6zobGCqFBfDqsq57tq/vob1VKCfXxTGuDS7z1taEdlQfjVOOe7FkgYelx\n\tJBs1SdYTPNhTnnf1Iw6f8qz8ne9DKhuFFN96qN8F9NI0Y9pXdGMEeZZQxo0YU1pxHNJz\n\tF/vKHvc80IU1dYsBk65pv63/V3kadm7iGZyFfeJfj8rZdi7f4yzQl1fArokTOeQ3EOv7\n\tkc+peI2n4/4AYXvqe3tX8UX48BxTYFQvEhXsrp8aG8kb9MH8ZNzsnDaXvmRV8jL2eIGi\n\tJleNX5RGLt5vaMQ0S3Xllh+RozyD2mbq51r7EBWy6/9SXbzyPiiJjo30zr/CDBhoA4f9\n\t1krA==",
        "X-Gm-Message-State": "AOJu0YzUvdcVBQcwGstPgR1YSiKzmEX10vGJRDWrnEKpXwE4uPpetjZ8\n\tf71/f1chs07RGXhV+YE87Q2bLTbpL9rd/V06P1m8Hkoj1oABsBInpSpA7SV2+bGXJ1BUwRxUuCE\n\te48T5",
        "X-Gm-Gg": "ASbGncuFM9Fx7MDhZEOJrTh4raYP1B6weapc2bMuHkmQGCTvti1e5GL9I3dh6t4gES0\n\tJO0hTWJGW0c+LLW5vh12wLjzphpgdLgziHsW8B1QH1m1kTTZ41u2qEBskr2Aav4Y7qqibcqkrwY\n\tc3lGh0sr7H+BDgydBT2+mc5TdGqbeIu76jhNpC7NTZvz3JxUlI596jC80PfhvUHV/CRhjtwYys2\n\tIpXnc4Ec66PHLcl9X2YNL22V9kCPz4bj6Om2KKK+PaplvFQCc0Ob3fOwAu5UQIQSCVgsT8WsASf\n\tRUeQZBwQTPNjpEzzLlUkbEAQIkU8ivshIvZ+/UPX58zDLRSxNbF+UoelzqviWRZl3QkmzPInSk0\n\tSVjBiVg==",
        "X-Google-Smtp-Source": "AGHT+IHxGmyHPWOFDF/VJMnixzGvilTVRVwdPc55oZL7CmsE2MpyjTYmQHhV7P5A+qE+349zLk8okQ==",
        "X-Received": "by 2002:a05:600c:3b22:b0:43e:94fa:4aef with SMTP id\n\t5b1f17b1804b1-45381af75f0mr7762705e9.8.1750840936492; \n\tWed, 25 Jun 2025 01:42:16 -0700 (PDT)",
        "From": "Naushir Patuck <naush@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "dave.stevenson@raspberrypi.com,\n\tNaushir Patuck <naush@raspberrypi.com>",
        "Subject": "[PATCH v1 3/3] pipeline: rpi: Set a default route for entities where\n\tapplicable",
        "Date": "Wed, 25 Jun 2025 09:41:18 +0100",
        "Message-ID": "<20250625084212.858487-4-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20250625084212.858487-1-naush@raspberrypi.com>",
        "References": "<20250625084212.858487-1-naush@raspberrypi.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": "If an entity advertises streams support, and no routes are active, set\na default active route for Stream 0:[pad 0 -> pad 1]. This allows\nserialiser/deserialiser devices to run without user setup in the default\ncase.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n .../pipeline/rpi/common/pipeline_base.cpp     | 33 ++++++++++++++++++-\n 1 file changed, 32 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\nindex 219bd81cc63a..eafbf702ed0b 100644\n--- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n+++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n@@ -107,7 +107,38 @@ int configureMediaDevices(std::vector<std::pair<std::unique_ptr<V4L2Subdevice>,\n \t\t}\n \n \t\t/*\n-\t\t * Next, enable the entity -> entity links, and setup the pad format.\n+\t\t * Next, setup the stream routing if needed. By default this\n+\t\t * sets up Stream 0:[pad 0 -> pad 1] route. Anything more\n+\t\t * complicated must currently be setup and activated externally.\n+\t\t *\n+\t\t * If we find any active routes, we don't change anything.\n+\t\t */\n+\t\tif (device->caps().hasStreams()) {\n+\t\t\tV4L2Subdevice::Routing routing;\n+\n+\t\t\tret = device->getRouting(&routing);\n+\t\t\tif (ret)\n+\t\t\t\treturn ret;\n+\n+\t\t\t/* If we find an active route, don't do anything more. */\n+\t\t\tfor (auto const &r : routing) {\n+\t\t\t\tif (r.flags & V4L2_SUBDEV_ROUTE_FL_ACTIVE)\n+\t\t\t\t\treturn 0;\n+\t\t\t}\n+\n+\t\t\t/*\n+\t\t\t * Set up a default Stream 0:[pad 0 -> pad 1] route if nothing\n+\t\t\t * has already been set.\n+\t\t\t */\n+\t\t\trouting = { { V4L2Subdevice::Stream{ 0, 0 },\n+\t\t\t\t      V4L2Subdevice::Stream{ 1, 0 },\n+\t\t\t\t      V4L2_SUBDEV_ROUTE_FL_ACTIVE } };\n+\n+\t\t\tret = device->setRouting(&routing);\n+\t\t}\n+\n+\t\t/*\n+\t\t * Finally, enable the entity -> entity links, and setup the pad format.\n \t\t *\n \t\t * \\todo Some bridge devices may chainge the media bus code, so we\n \t\t * ought to read the source pad format and propagate it to the sink pad.\n",
    "prefixes": [
        "v1",
        "3/3"
    ]
}