Show a patch.

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

{
    "id": 15863,
    "url": "https://patchwork.libcamera.org/api/patches/15863/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/15863/",
    "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": "<20220510115147.19360-24-laurent.pinchart@ideasonboard.com>",
    "date": "2022-05-10T11:51:20",
    "name": "[libcamera-devel,23/50] staging: media: imx: imx7-media-csi: Import imx_media_pipeline_set_stream()",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": false,
    "hash": "52bbf84295a2b99810eab099c930f0be0dbb7266",
    "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/15863/mbox/",
    "series": [
        {
            "id": 3106,
            "url": "https://patchwork.libcamera.org/api/series/3106/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3106",
            "date": "2022-05-10T11:50:57",
            "name": "staging: media: imx: Prepare destaging of imx7-media-csi",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/3106/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/15863/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/15863/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 60FEAC3256\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 10 May 2022 11:52:26 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E356165695;\n\tTue, 10 May 2022 13:52:25 +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 C649465643\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 10 May 2022 13:52:16 +0200 (CEST)",
            "from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id DD12BBA9;\n\tTue, 10 May 2022 13:52:15 +0200 (CEST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1652183546;\n\tbh=EgNZsoN/7OI10adZIP8tfznFAkRmxK+4iV9hb6MY8ns=;\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:Cc:\n\tFrom;\n\tb=MZBczqGr+JXV4vgIpTIczvIQkpjkMjR8VDoYdO5ynRLIUgX3dL94oORoCeaPoAJBZ\n\tfhMgwe6cq6Xj9zJLFXZY2y7wV6ydUOx+ac/brb2XdKCqVXtNCb598fomVW/LhyanSR\n\tcyYPk3/PYO5rzr0IT+o4whSQJlfvETGTHVnn8iP2qBL+7xIF4lkbZOoSsVnp29JARv\n\tZC/M/LCtc2+kjeYcv51pI30qR/2rhQuH7N/D7f94tLdPJ/VsZFC6ijlsM6FSVBAAZS\n\tOm4pI/Am0mEInB25Lx2b2th/GLf5dGtWJh+sBUlifEGYWC+FGHpm8dWwQbOzcWe/bQ\n\t7o18U7fExbSeQ==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1652183536;\n\tbh=EgNZsoN/7OI10adZIP8tfznFAkRmxK+4iV9hb6MY8ns=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=B1QHcSLGTIrifMHH1MKn7ezgds0TLqjfWV+0lcrhMiAXqqqTam2AHoI/Xy25/wD6i\n\tWCttsfcWKk/wPgriccppZchQFHIwaSj27JqiLMpamb+yg4qJWawhXzbR7hjVoGe/Qp\n\tpi2ks4XGY2Tp9JepdPftqR5Oawbr2g9DKlT3IuFA="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"B1QHcSLG\"; dkim-atps=neutral",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue, 10 May 2022 14:51:20 +0300",
        "Message-Id": "<20220510115147.19360-24-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.35.1",
        "In-Reply-To": "<20220510115147.19360-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20220510115147.19360-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 23/50] staging: media: imx:\n\timx7-media-csi: Import imx_media_pipeline_set_stream()",
        "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>",
        "Cc": "Martin Kepplinger <martin.kepplinger@puri.sm>, kernel@pengutronix.de,\n\tDorota Czaplejewicz <dorota.czaplejewicz@puri.sm>,\n\tAlexander Stein <alexander.stein@ew.tq-group.com>,\n\tRui Miguel Silva <rmfrfs@gmail.com>,\n\tPhilipp Zabel <p.zabel@pengutronix.de>, \n\tSteve Longerbeam <slongerbeam@gmail.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "To prepare for code refactoring, copy the\nimx_media_pipeline_set_stream() helper used by this driver from\nimx-media-utils.c. Rename the function to avoid name clashes, no\nfunctional change intended.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n drivers/staging/media/imx/imx7-media-csi.c | 40 ++++++++++++++++++++--\n 1 file changed, 38 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/drivers/staging/media/imx/imx7-media-csi.c b/drivers/staging/media/imx/imx7-media-csi.c\nindex e1b494183ebc..1c8ee7c88f46 100644\n--- a/drivers/staging/media/imx/imx7-media-csi.c\n+++ b/drivers/staging/media/imx/imx7-media-csi.c\n@@ -1067,6 +1067,40 @@ static int imx7_csi_video_validate_fmt(struct imx7_csi *csi)\n \treturn 0;\n }\n \n+/*\n+ * Turn current pipeline streaming on/off starting from entity.\n+ */\n+static int imx7_csi_media_pipeline_set_stream(struct imx_media_dev *imxmd,\n+\t\t\t\t\t      struct media_entity *entity,\n+\t\t\t\t\t      bool on)\n+{\n+\tstruct v4l2_subdev *sd;\n+\tint ret = 0;\n+\n+\tif (!is_media_entity_v4l2_subdev(entity))\n+\t\treturn -EINVAL;\n+\tsd = media_entity_to_v4l2_subdev(entity);\n+\n+\tmutex_lock(&imxmd->md.graph_mutex);\n+\n+\tif (on) {\n+\t\tret = __media_pipeline_start(entity, &imxmd->pipe);\n+\t\tif (ret)\n+\t\t\tgoto out;\n+\t\tret = v4l2_subdev_call(sd, video, s_stream, 1);\n+\t\tif (ret)\n+\t\t\t__media_pipeline_stop(entity);\n+\t} else {\n+\t\tv4l2_subdev_call(sd, video, s_stream, 0);\n+\t\tif (entity->pipe)\n+\t\t\t__media_pipeline_stop(entity);\n+\t}\n+\n+out:\n+\tmutex_unlock(&imxmd->md.graph_mutex);\n+\treturn ret;\n+}\n+\n static int imx7_csi_video_start_streaming(struct vb2_queue *vq,\n \t\t\t\t\t  unsigned int count)\n {\n@@ -1081,7 +1115,8 @@ static int imx7_csi_video_start_streaming(struct vb2_queue *vq,\n \t\tgoto return_bufs;\n \t}\n \n-\tret = imx_media_pipeline_set_stream(&csi->imxmd, &csi->sd.entity, true);\n+\tret = imx7_csi_media_pipeline_set_stream(&csi->imxmd, &csi->sd.entity,\n+\t\t\t\t\t\t true);\n \tif (ret) {\n \t\tdev_err(csi->dev, \"pipeline start failed with %d\\n\", ret);\n \t\tgoto return_bufs;\n@@ -1107,7 +1142,8 @@ static void imx7_csi_video_stop_streaming(struct vb2_queue *vq)\n \tunsigned long flags;\n \tint ret;\n \n-\tret = imx_media_pipeline_set_stream(&csi->imxmd, &csi->sd.entity, false);\n+\tret = imx7_csi_media_pipeline_set_stream(&csi->imxmd, &csi->sd.entity,\n+\t\t\t\t\t\t false);\n \tif (ret)\n \t\tdev_warn(csi->dev, \"pipeline stop failed with %d\\n\", ret);\n \n",
    "prefixes": [
        "libcamera-devel",
        "23/50"
    ]
}