Show a patch.

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

{
    "id": 3203,
    "url": "https://patchwork.libcamera.org/api/patches/3203/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/3203/",
    "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": "<20200319234401.3522424-1-niklas.soderlund@ragnatech.se>",
    "date": "2020-03-19T23:44:01",
    "name": "[libcamera-devel] libcamera: pipeline: rkisp1: Use maxBuffers instead of count when importing buffers",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "13bdf29fa8fec9bb2f8b4afa0e128f8244a376cc",
    "submitter": {
        "id": 5,
        "url": "https://patchwork.libcamera.org/api/people/5/?format=api",
        "name": "Niklas Söderlund",
        "email": "niklas.soderlund@ragnatech.se"
    },
    "delegate": {
        "id": 16,
        "url": "https://patchwork.libcamera.org/api/users/16/?format=api",
        "username": "neg",
        "first_name": "Niklas",
        "last_name": "Söderlund",
        "email": "niklas.soderlund@ragnatech.se"
    },
    "mbox": "https://patchwork.libcamera.org/patch/3203/mbox/",
    "series": [
        {
            "id": 745,
            "url": "https://patchwork.libcamera.org/api/series/745/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=745",
            "date": "2020-03-19T23:44:01",
            "name": "[libcamera-devel] libcamera: pipeline: rkisp1: Use maxBuffers instead of count when importing buffers",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/745/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/3203/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/3203/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<niklas.soderlund@ragnatech.se>",
        "Received": [
            "from bin-mail-out-06.binero.net (bin-mail-out-06.binero.net\n\t[195.74.38.229])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EEA4360415\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 20 Mar 2020 00:44:18 +0100 (CET)",
            "from bismarck.berto.se (p4fca2392.dip0.t-ipconnect.de\n\t[79.202.35.146]) by bin-vsp-out-01.atm.binero.net (Halon) with ESMTPA\n\tid 84113e51-6a3b-11ea-b7d8-005056917a89;\n\tFri, 20 Mar 2020 00:44:17 +0100 (CET)"
        ],
        "X-Halon-ID": "84113e51-6a3b-11ea-b7d8-005056917a89",
        "Authorized-sender": "niklas@soderlund.pp.se",
        "From": "=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Fri, 20 Mar 2020 00:44:01 +0100",
        "Message-Id": "<20200319234401.3522424-1-niklas.soderlund@ragnatech.se>",
        "X-Mailer": "git-send-email 2.25.1",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH] libcamera: pipeline: rkisp1: Use\n\tmaxBuffers instead of count when importing buffers",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.29",
        "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, 19 Mar 2020 23:44:19 -0000"
    },
    "content": "When folding buffer management with start/stop the wrong variable was\npassed to importBuffers() resulting in only one buffer being imported\nfor the video node making capture impossible. Fix this by using the\nright variable, maxBuffers.\n\nRename the misleadingly named count variable to avoid confusion in the\nfuture.\n\nFixes: 33fedea818e2b6a9 (\"libcamera: pipeline_handler: Fold buffer management with start/stop\")\nSigned-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n---\n src/libcamera/pipeline/rkisp1/rkisp1.cpp | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\nindex 97bb4f72cde5423e..d9a221d2df3e4b4c 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n@@ -668,14 +668,14 @@ int PipelineHandlerRkISP1::exportFrameBuffers(Camera *camera, Stream *stream,\n int PipelineHandlerRkISP1::allocateBuffers(Camera *camera)\n {\n \tRkISP1CameraData *data = cameraData(camera);\n-\tunsigned int count = 1;\n+\tunsigned int ipaBufferIDCounter = 1;\n \tint ret;\n \n \tunsigned int maxBuffers = 0;\n \tfor (const Stream *s : camera->streams())\n \t\tmaxBuffers = std::max(maxBuffers, s->configuration().bufferCount);\n \n-\tret = video_->importBuffers(count);\n+\tret = video_->importBuffers(maxBuffers);\n \tif (ret < 0)\n \t\tgoto error;\n \n@@ -688,14 +688,14 @@ int PipelineHandlerRkISP1::allocateBuffers(Camera *camera)\n \t\tgoto error;\n \n \tfor (std::unique_ptr<FrameBuffer> &buffer : paramBuffers_) {\n-\t\tbuffer->setCookie(count++);\n+\t\tbuffer->setCookie(ipaBufferIDCounter++);\n \t\tdata->ipaBuffers_.push_back({ .id = buffer->cookie(),\n \t\t\t\t\t      .planes = buffer->planes() });\n \t\tavailableParamBuffers_.push(buffer.get());\n \t}\n \n \tfor (std::unique_ptr<FrameBuffer> &buffer : statBuffers_) {\n-\t\tbuffer->setCookie(count++);\n+\t\tbuffer->setCookie(ipaBufferIDCounter++);\n \t\tdata->ipaBuffers_.push_back({ .id = buffer->cookie(),\n \t\t\t\t\t      .planes = buffer->planes() });\n \t\tavailableStatBuffers_.push(buffer.get());\n",
    "prefixes": [
        "libcamera-devel"
    ]
}