Show a patch.

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

{
    "id": 724,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/724/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/724/",
    "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": "<20190312121242.2253-10-jacopo@jmondi.org>",
    "date": "2019-03-12T12:12:37",
    "name": "[libcamera-devel,v2,09/14] libcamera: ipu3: Implement buffer release",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "4d2655e092ae4f1df20c2cef054074866ee6e857",
    "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/724/mbox/",
    "series": [
        {
            "id": 205,
            "url": "https://patchwork.libcamera.org/api/1.1/series/205/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=205",
            "date": "2019-03-12T12:12:28",
            "name": "libcamera: ipu3: ImgU support",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/205/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/724/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/724/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<jacopo@jmondi.org>",
        "Received": [
            "from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net\n\t[217.70.183.197])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 00E2E610D5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 12 Mar 2019 13:12:25 +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 relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 8A3871C0005;\n\tTue, 12 Mar 2019 12:12:24 +0000 (UTC)"
        ],
        "X-Originating-IP": "2.224.242.101",
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue, 12 Mar 2019 13:12:37 +0100",
        "Message-Id": "<20190312121242.2253-10-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20190312121242.2253-1-jacopo@jmondi.org>",
        "References": "<20190312121242.2253-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v2 09/14] libcamera: ipu3: Implement\n\tbuffer release",
        "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": "Tue, 12 Mar 2019 12:12:25 -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 | 30 +++++++++++++++++++++++-----\n 1 file changed, 25 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex ad866346e13c..badde4839f99 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -157,6 +157,7 @@ private:\n \tvoid registerCameras();\n \n \tImgUDevice imgus_[IPU3_IMGU_COUNT];\n+\n \tstd::shared_ptr<MediaDevice> cio2MediaDev_;\n \tstd::shared_ptr<MediaDevice> imguMediaDev_;\n };\n@@ -362,13 +363,32 @@ int PipelineHandlerIPU3::allocateBuffers(Camera *camera, Stream *stream)\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-\t\treturn ret;\n-\t}\n+\tret = output->releaseBuffers();\n+\tif (ret)\n+\t\tLOG(IPU3, Error) << \"Failed to release ImgU output memory\";\n+\n+\tret = stat->releaseBuffers();\n+\tif (ret)\n+\t\tLOG(IPU3, Error) << \"Failed to release ImgU stat memory\";\n+\n+\tret = viewfinder->releaseBuffers();\n+\tif (ret)\n+\t\tLOG(IPU3, Error) << \"Failed to release ImgU viewfinder memory\";\n+\n+\tret = input->releaseBuffers();\n+\tif (ret)\n+\t\tLOG(IPU3, Error) << \"Failed to release ImgU input memory\";\n+\n+\tret = cio2->releaseBuffers();\n+\tif (ret)\n+\t\tLOG(IPU3, Error) << \"Failed to release CIO2 memory\";\n \n \treturn 0;\n }\n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "09/14"
    ]
}