Show a patch.

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

{
    "id": 8471,
    "url": "https://patchwork.libcamera.org/api/patches/8471/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/8471/",
    "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": "<20200628095204.23527-1-laurent.pinchart@ideasonboard.com>",
    "date": "2020-06-28T09:52:04",
    "name": "[libcamera-devel] libcamera: pipeline: simple: Setup links outside for format try loop",
    "commit_ref": "7283eff090f801ba97a198e4929e64d0d158e063",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "76a12a295808b797e24b3ac766d539e2967c3862",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/8471/mbox/",
    "series": [
        {
            "id": 1049,
            "url": "https://patchwork.libcamera.org/api/series/1049/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1049",
            "date": "2020-06-28T09:52:04",
            "name": "[libcamera-devel] libcamera: pipeline: simple: Setup links outside for format try loop",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/1049/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/8471/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/8471/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 AFE2CC2E66\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 28 Jun 2020 09:52:16 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0C1F4609DB;\n\tSun, 28 Jun 2020 11:52:16 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A115C603B2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 28 Jun 2020 11:52:14 +0200 (CEST)",
            "from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 134344FB;\n\tSun, 28 Jun 2020 11:52:14 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"r9YdJPWZ\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1593337934;\n\tbh=kAoLCUBMUhtmdOqfUwCGVqXVpkghn1FXxql1KKzlbIM=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=r9YdJPWZAyKaCMBfU8LnNIcnzr1LODUvKGRnzqyoPkQa6F6KC+6HELa5JLfQ1oosC\n\t6QMRZQoYUfXgVjnkOsd9nGuUDmtECoDp46chuinI4s0mmpOhL8rx6KYuC85wm4NA6w\n\tYSTpZx3l6RJQLVljjLCUhxTW6K0KL7Tj9ONGy/8o=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Sun, 28 Jun 2020 12:52:04 +0300",
        "Message-Id": "<20200628095204.23527-1-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH] libcamera: pipeline: simple: Setup links\n\toutside for format try loop",
        "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>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "The SimpleCameraData::init() function needs to setup links along the\npipeline, but doesn't need to repeat that operation for each media bus\ncode it tries. Move the link setup before the loop.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/pipeline/simple/simple.cpp | 16 ++++++++--------\n 1 file changed, 8 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\nindex 1ec8d0f7de03..9274e61462fc 100644\n--- a/src/libcamera/pipeline/simple/simple.cpp\n+++ b/src/libcamera/pipeline/simple/simple.cpp\n@@ -250,6 +250,14 @@ int SimpleCameraData::init()\n \tSimpleConverter *converter = pipe->converter();\n \tint ret;\n \n+\t/*\n+\t * Setup links first as some subdev drivers take active links into\n+\t * account to propagate TRY formats. Such is life :-(\n+\t */\n+\tret = setupLinks();\n+\tif (ret < 0)\n+\t\treturn ret;\n+\n \t/*\n \t * Enumerate the possible pipeline configurations. For each media bus\n \t * format supported by the sensor, propagate the formats through the\n@@ -259,14 +267,6 @@ int SimpleCameraData::init()\n \tfor (unsigned int code : sensor_->mbusCodes()) {\n \t\tV4L2SubdeviceFormat format{ code, sensor_->resolution() };\n \n-\t\t/*\n-\t\t * Setup links first as some subdev drivers take active links\n-\t\t * into account to propagate TRY formats. Such is life :-(\n-\t\t */\n-\t\tret = setupLinks();\n-\t\tif (ret < 0)\n-\t\t\treturn ret;\n-\n \t\tret = setupFormats(&format, V4L2Subdevice::TryFormat);\n \t\tif (ret < 0) {\n \t\t\tLOG(SimplePipeline, Error)\n",
    "prefixes": [
        "libcamera-devel"
    ]
}