Patch Detail
Show a patch.
GET /api/patches/684/?format=api
{ "id": 684, "url": "https://patchwork.libcamera.org/api/patches/684/?format=api", "web_url": "https://patchwork.libcamera.org/patch/684/", "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": "<20190228200410.3022-7-jacopo@jmondi.org>", "date": "2019-02-28T20:04:06", "name": "[libcamera-devel,06/10] libcamera: ipu3: Implement buffer release", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "14035b6fc1723a4db9b076b3fcf4ed2d773a8791", "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/684/mbox/", "series": [ { "id": 199, "url": "https://patchwork.libcamera.org/api/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/684/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/684/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 4E836610BA\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 D8C20E0006;\n\tThu, 28 Feb 2019 20:03:49 +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:06 +0100", "Message-Id": "<20190228200410.3022-7-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 06/10] libcamera: ipu3: Implement buffer\n\trelease", "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:50 -0000" }, "content": "Release buffers on all video devices in the pipeline.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/pipeline/ipu3/ipu3.cpp | 40 +++++++++++++++++++++++++---\n 1 file changed, 36 insertions(+), 4 deletions(-)", "diff": "diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex c7b7973952a0..60a48859b398 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -145,6 +145,8 @@ private:\n \tint initCio2(unsigned int index, Cio2Device *cio2);\n \tvoid registerCameras();\n \n+\tint releaseBuffers(V4L2Device *dev);\n+\n \tImguDevice imgu0_;\n \tImguDevice imgu1_;\n \n@@ -371,13 +373,32 @@ error_reserve_memory:\n int PipelineHandlerIPU3::freeBuffers(Camera *camera, Stream *stream)\n {\n \tIPU3CameraData *data = cameraData(camera);\n+\tV4L2Device *viewfinder = data->imgu->viewfinder;\n+\tV4L2Device *output = data->imgu->output;\n+\tV4L2Device *input = data->imgu->input;\n \tV4L2Device *cio2 = data->cio2.output;\n+\tV4L2Device *stat = data->imgu->stat;\n+\tint ret;\n \n-\tint ret = cio2->releaseBuffers();\n-\tif (ret) {\n-\t\tLOG(IPU3, Error) << \"Failed to release memory\";\n+\tret = releaseBuffers(viewfinder);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tret = releaseBuffers(stat);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tret = releaseBuffers(output);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tret = releaseBuffers(cio2);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tret = releaseBuffers(input);\n+\tif (ret)\n \t\treturn ret;\n-\t}\n \n \treturn 0;\n }\n@@ -877,6 +898,17 @@ void PipelineHandlerIPU3::registerCameras()\n \t}\n }\n \n+int PipelineHandlerIPU3::releaseBuffers(V4L2Device *dev)\n+{\n+\tint ret = dev->releaseBuffers();\n+\tif (ret) {\n+\t\tLOG(IPU3, Error) << \"Failed to release memory\";\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", "06/10" ] }