Show a patch.

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

{
    "id": 771,
    "url": "https://patchwork.libcamera.org/api/patches/771/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/771/",
    "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": "<20190320163055.22056-26-jacopo@jmondi.org>",
    "date": "2019-03-20T16:30:49",
    "name": "[libcamera-devel,v4,25/31] libcamera: ipu3: Connect viewfinder's BufferReady signal",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "baa7266a8686257784e2d19f2a6d62c836d64462",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/771/mbox/",
    "series": [
        {
            "id": 214,
            "url": "https://patchwork.libcamera.org/api/series/214/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=214",
            "date": "2019-03-20T16:30:24",
            "name": "libcamera: ipu3: Add ImgU support + multiple streams",
            "version": 4,
            "mbox": "https://patchwork.libcamera.org/series/214/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/771/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/771/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<jacopo@jmondi.org>",
        "Received": [
            "from relay12.mail.gandi.net (relay12.mail.gandi.net\n\t[217.70.178.232])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C30CD61373\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 20 Mar 2019 17:30:43 +0100 (CET)",
            "from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay12.mail.gandi.net (Postfix) with ESMTPSA id 5B0A1200009;\n\tWed, 20 Mar 2019 16:30:43 +0000 (UTC)"
        ],
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Wed, 20 Mar 2019 17:30:49 +0100",
        "Message-Id": "<20190320163055.22056-26-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.21.0",
        "In-Reply-To": "<20190320163055.22056-1-jacopo@jmondi.org>",
        "References": "<20190320163055.22056-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v4 25/31] libcamera: ipu3: Connect\n\tviewfinder's BufferReady signal",
        "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": "Wed, 20 Mar 2019 16:30:44 -0000"
    },
    "content": "Connect the viewfinder buffer ready signal to the IPU3CameraData slot\nthat complets the buffer first, and if not waiting for other buffers\ncompletes the request as well.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/pipeline/ipu3/ipu3.cpp | 23 +++++++++++++++--------\n 1 file changed, 15 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex b2df9a4ac922..db1ec2a7c3e2 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -135,7 +135,7 @@ private:\n \t\t{\n \t\t}\n \n-\t\tvoid imguOutputBufferReady(Buffer *buffer);\n+\t\tvoid imguCaptureBufferReady(Buffer *buffer);\n \t\tvoid imguInputBufferReady(Buffer *buffer);\n \t\tvoid cio2BufferReady(Buffer *buffer);\n \n@@ -621,8 +621,13 @@ int PipelineHandlerIPU3::start(Camera *camera)\n \t\t\t\t\t&IPU3CameraData::cio2BufferReady);\n \tdata->imgu->input->bufferReady.connect(data,\n \t\t\t\t\t&IPU3CameraData::imguInputBufferReady);\n-\tdata->imgu->output->bufferReady.connect(data,\n-\t\t\t\t\t&IPU3CameraData::imguOutputBufferReady);\n+\n+\tif (isOutputActive(data))\n+\t\tdata->imgu->output->bufferReady.connect(data,\n+\t\t\t\t\t&IPU3CameraData::imguCaptureBufferReady);\n+\tif (isViewfinderActive(data))\n+\t\tdata->imgu->viewfinder->bufferReady.connect(data,\n+\t\t\t\t\t&IPU3CameraData::imguCaptureBufferReady);\n \n \t/*\n \t * Enqueue all available buffers to the CIO2 unit to start frame\n@@ -1434,17 +1439,19 @@ void PipelineHandlerIPU3::IPU3CameraData::imguInputBufferReady(Buffer *buffer)\n }\n \n /**\n- * \\brief ImgU output BufferReady slot\n+ * \\brief ImgU main and secondary output BufferReady slot\n  * \\param buffer The completed buffer\n  *\n- * Buffer completed from the ImgU output are directed to the applications.\n+ * Buffer completed from the ImgU main and secondary outputs are directed to\n+ * the applications.\n  */\n-void PipelineHandlerIPU3::IPU3CameraData::imguOutputBufferReady(Buffer *buffer)\n+void PipelineHandlerIPU3::IPU3CameraData::imguCaptureBufferReady(Buffer *buffer)\n {\n \tRequest *request = queuedRequests_.front();\n \n-\tpipe_->completeBuffer(camera_, request, buffer);\n-\tpipe_->completeRequest(camera_, request);\n+\t/* TODO: this will probably need locking. */\n+\tif (pipe_->completeBuffer(camera_, request, buffer))\n+\t\tpipe_->completeRequest(camera_, request);\n }\n \n /**\n",
    "prefixes": [
        "libcamera-devel",
        "v4",
        "25/31"
    ]
}