Show a patch.

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

{
    "id": 1508,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/1508/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/1508/",
    "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": "<20190624142859.19313-6-jacopo@jmondi.org>",
    "date": "2019-06-24T14:28:58",
    "name": "[libcamera-devel,v6,5/6] libcamera: ipu3: Set pipe_mode based on stream configuration",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "04fd67f09154c594b8d5d088781eb587e14bb5ac",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/1.1/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/1508/mbox/",
    "series": [
        {
            "id": 371,
            "url": "https://patchwork.libcamera.org/api/1.1/series/371/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=371",
            "date": "2019-06-24T14:28:53",
            "name": "Add support for V4L2 controls",
            "version": 6,
            "mbox": "https://patchwork.libcamera.org/series/371/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/1508/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/1508/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<jacopo@jmondi.org>",
        "Received": [
            "from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net\n\t[217.70.183.200])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 00C1C61617\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 24 Jun 2019 16:27:53 +0200 (CEST)",
            "from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 3CB4A20006;\n\tMon, 24 Jun 2019 14:27:53 +0000 (UTC)"
        ],
        "X-Originating-IP": "2.224.242.101",
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon, 24 Jun 2019 16:28:58 +0200",
        "Message-Id": "<20190624142859.19313-6-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.21.0",
        "In-Reply-To": "<20190624142859.19313-1-jacopo@jmondi.org>",
        "References": "<20190624142859.19313-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v6 5/6] libcamera: ipu3: Set pipe_mode\n\tbased on stream configuration",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.23",
        "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>",
        "X-List-Received-Date": "Mon, 24 Jun 2019 14:27:54 -0000"
    },
    "content": "Set the ImgU pipe_mode control based on the active stream configuration.\nUse 'Video' pipe mode unless the viewfinder stream is not active.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n src/libcamera/pipeline/ipu3/ipu3.cpp | 18 ++++++++++++++++++\n 1 file changed, 18 insertions(+)",
    "diff": "diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex 1c0a9825b4cd..0fb044ba5513 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -22,6 +22,7 @@\n #include \"media_device.h\"\n #include \"pipeline_handler.h\"\n #include \"utils.h\"\n+#include \"v4l2_controls.h\"\n #include \"v4l2_subdevice.h\"\n #include \"v4l2_videodevice.h\"\n \n@@ -194,6 +195,12 @@ private:\n class PipelineHandlerIPU3 : public PipelineHandler\n {\n public:\n+\tstatic constexpr unsigned int V4L2_CID_IPU3_PIPE_MODE = 0x009819c1;\n+\tenum IPU3PipeModes {\n+\t\tIPU3PipeModeVideo = 0,\n+\t\tIPU3PipeModeStillCapture = 1,\n+\t};\n+\n \tPipelineHandlerIPU3(CameraManager *manager);\n \n \tCameraConfiguration *generateConfiguration(Camera *camera,\n@@ -559,6 +566,17 @@ int PipelineHandlerIPU3::configure(Camera *camera, CameraConfiguration *c)\n \tif (ret)\n \t\treturn ret;\n \n+\t/* Apply the \"pipe_mode\" control to the ImgU subdevice. */\n+\tV4L2ControlList ctrls;\n+\tctrls.add(V4L2_CID_IPU3_PIPE_MODE, vfStream->active_ ?\n+\t\t       \t\t\t   IPU3PipeModeVideo :\n+\t\t\t\t\t   IPU3PipeModeStillCapture);\n+\tret = imgu->imgu_->setControls(&ctrls);\n+\tif (ret) {\n+\t\tLOG(IPU3, Error) << \"Unable to set pipe_mode control\";\n+\t\treturn ret;\n+\t}\n+\n \treturn 0;\n }\n \n",
    "prefixes": [
        "libcamera-devel",
        "v6",
        "5/6"
    ]
}