Patch Detail
Show a patch.
GET /api/1.1/patches/685/?format=api
{ "id": 685, "url": "https://patchwork.libcamera.org/api/1.1/patches/685/?format=api", "web_url": "https://patchwork.libcamera.org/patch/685/", "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": "<20190228200410.3022-8-jacopo@jmondi.org>", "date": "2019-02-28T20:04:07", "name": "[libcamera-devel,07/10] libcamera: ipu3: Queue requests to the pipeline", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "fb21afac1ad7dbd92d4718d8015edffc5f40e41f", "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/685/mbox/", "series": [ { "id": 199, "url": "https://patchwork.libcamera.org/api/1.1/series/199/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=199", "date": "2019-02-28T20:04:00", "name": "libcamera: ipu3: ImgU support", "version": 1, "mbox": "https://patchwork.libcamera.org/series/199/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/685/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/685/checks/", "tags": {}, "headers": { "Return-Path": "<jacopo@jmondi.org>", "Received": [ "from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net\n\t[217.70.183.196])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E4818610C5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 28 Feb 2019 21:03:50 +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 relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 78013E0005;\n\tThu, 28 Feb 2019 20:03:50 +0000 (UTC)" ], "X-Originating-IP": "2.224.242.101", "From": "Jacopo Mondi <jacopo@jmondi.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 28 Feb 2019 21:04:07 +0100", "Message-Id": "<20190228200410.3022-8-jacopo@jmondi.org>", "X-Mailer": "git-send-email 2.20.1", "In-Reply-To": "<20190228200410.3022-1-jacopo@jmondi.org>", "References": "<20190228200410.3022-1-jacopo@jmondi.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 07/10] libcamera: ipu3: Queue requests to\n\tthe pipeline", "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": "Thu, 28 Feb 2019 20:03:51 -0000" }, "content": "Implement queueRequest for the IPU3 pipeline manager. When a request is\nqueued, a new buffer is queued to the ImgU output and the CIO2 output.\nAlso queue buffers for the viewfinder and stat video nodes, even if\nthey're not used at the moment.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/pipeline/ipu3/ipu3.cpp | 27 ++++++++++++++++++++++++++-\n 1 file changed, 26 insertions(+), 1 deletion(-)", "diff": "diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex 60a48859b398..8ce661e27f62 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -152,11 +152,15 @@ private:\n \n \tstd::shared_ptr<MediaDevice> cio2MediaDev_;\n \tstd::shared_ptr<MediaDevice> imguMediaDev_;\n+\n+\tunsigned int tmpBufferCount;\n };\n \n PipelineHandlerIPU3::PipelineHandlerIPU3(CameraManager *manager)\n \t: PipelineHandler(manager), cio2MediaDev_(nullptr), imguMediaDev_(nullptr)\n {\n+\t/* FIXME: this is an hack. */\n+\ttmpBufferCount = 0;\n }\n \n PipelineHandlerIPU3::~PipelineHandlerIPU3()\n@@ -430,9 +434,30 @@ void PipelineHandlerIPU3::stop(const Camera *camera)\n int PipelineHandlerIPU3::queueRequest(const Camera *camera, Request *request)\n {\n \tIPU3CameraData *data = cameraData(camera);\n+\tV4L2Device *viewfinder = data->imgu->viewfinder;\n+\tV4L2Device *output = data->imgu->output;\n \tV4L2Device *cio2 = data->cio2.output;\n+\tV4L2Device *stat = data->imgu->stat;\n \tStream *stream = &data->stream_;\n+\tBuffer *tmpBuffer;\n+\n+\t/*\n+\t * Queue buffer on VF and stat.\n+\t * FIXME: this is an hack!\n+\t */\n+\ttmpBuffer = &data->imgu->vfPool.buffers()[tmpBufferCount];\n+\tviewfinder->queueBuffer(tmpBuffer);\n+\n+\ttmpBuffer = &data->imgu->statPool.buffers()[tmpBufferCount];\n+\tstat->queueBuffer(tmpBuffer);\n+\n+\ttmpBuffer = &data->cio2.pool.buffers()[tmpBufferCount];\n+\tcio2->queueBuffer(tmpBuffer);\n+\n+\ttmpBufferCount++;\n+\ttmpBufferCount %= IPU3_BUF_NUM;\n \n+\t/* Queue a buffer to the ImgU output for capture. */\n \tBuffer *buffer = request->findBuffer(stream);\n \tif (!buffer) {\n \t\tLOG(IPU3, Error)\n@@ -440,7 +465,7 @@ int PipelineHandlerIPU3::queueRequest(const Camera *camera, Request *request)\n \t\treturn -ENOENT;\n \t}\n \n-\tcio2->queueBuffer(buffer);\n+\toutput->queueBuffer(buffer);\n \n \treturn 0;\n }\n", "prefixes": [ "libcamera-devel", "07/10" ] }