Patch Detail
Show a patch.
GET /api/1.1/patches/686/?format=api
{ "id": 686, "url": "https://patchwork.libcamera.org/api/1.1/patches/686/?format=api", "web_url": "https://patchwork.libcamera.org/patch/686/", "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-9-jacopo@jmondi.org>", "date": "2019-02-28T20:04:08", "name": "[libcamera-devel,08/10] libcamera: ipu3: Implement camera start/stop", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "e7e5945f95237a88e6012129edab194721db6ef7", "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/686/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/686/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/686/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 85FDD610BB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 28 Feb 2019 21:03:51 +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 17E2AE0005;\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:08 +0100", "Message-Id": "<20190228200410.3022-9-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 08/10] libcamera: ipu3: Implement camera\n\tstart/stop", "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:52 -0000" }, "content": "Start and stop all video devices in the pipeline.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/pipeline/ipu3/ipu3.cpp | 57 ++++++++++++++++++++++++----\n 1 file changed, 49 insertions(+), 8 deletions(-)", "diff": "diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex 8ce661e27f62..b9bc992879f5 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -146,6 +146,8 @@ private:\n \tvoid registerCameras();\n \n \tint releaseBuffers(V4L2Device *dev);\n+\tint startDevice(V4L2Device *dev);\n+\tint stopDevice(V4L2Device *dev);\n \n \tImguDevice imgu0_;\n \tImguDevice imgu1_;\n@@ -410,14 +412,27 @@ int PipelineHandlerIPU3::freeBuffers(Camera *camera, Stream *stream)\n int PipelineHandlerIPU3::start(const Camera *camera)\n {\n \tIPU3CameraData *data = cameraData(camera);\n-\tV4L2Device *cio2 = data->cio2.output;\n \tint ret;\n \n-\tret = cio2->streamOn();\n-\tif (ret) {\n-\t\tLOG(IPU3, Info) << \"Failed to start camera \" << camera->name();\n+\tret = startDevice(data->imgu->output);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tret = startDevice(data->imgu->viewfinder);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tret = startDevice(data->imgu->stat);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tret = startDevice(data->imgu->input);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tret = startDevice(data->cio2.output);\n+\tif (ret)\n \t\treturn ret;\n-\t}\n \n \treturn 0;\n }\n@@ -425,10 +440,12 @@ int PipelineHandlerIPU3::start(const Camera *camera)\n void PipelineHandlerIPU3::stop(const Camera *camera)\n {\n \tIPU3CameraData *data = cameraData(camera);\n-\tV4L2Device *cio2 = data->cio2.output;\n \n-\tif (cio2->streamOff())\n-\t\tLOG(IPU3, Info) << \"Failed to stop camera \" << camera->name();\n+\tstopDevice(data->imgu->output);\n+\tstopDevice(data->imgu->viewfinder);\n+\tstopDevice(data->imgu->stat);\n+\tstopDevice(data->imgu->input);\n+\tstopDevice(data->cio2.output);\n }\n \n int PipelineHandlerIPU3::queueRequest(const Camera *camera, Request *request)\n@@ -934,6 +951,30 @@ int PipelineHandlerIPU3::releaseBuffers(V4L2Device *dev)\n \treturn 0;\n }\n \n+int PipelineHandlerIPU3::startDevice(V4L2Device *dev)\n+{\n+\tint ret = dev->streamOn();\n+\tif (ret) {\n+\t\tLOG(IPU3, Info)\n+\t\t\t<< \"Failed to start video device:\" << dev->deviceNode();\n+\t\treturn ret;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+int PipelineHandlerIPU3::stopDevice(V4L2Device *dev)\n+{\n+\tint ret = dev->streamOff();\n+\tif (ret) {\n+\t\tLOG(IPU3, Info)\n+\t\t\t<< \"Failed to stop video device:\" << dev->deviceNode();\n+\t\treturn ret;\n+\t}\n+\n+\treturn 0;\n+}\n+\n REGISTER_PIPELINE_HANDLER(PipelineHandlerIPU3);\n \n } /* namespace libcamera */\n", "prefixes": [ "libcamera-devel", "08/10" ] }