Patch Detail
Show a patch.
GET /api/1.1/patches/14636/?format=api
{ "id": 14636, "url": "https://patchwork.libcamera.org/api/1.1/patches/14636/?format=api", "web_url": "https://patchwork.libcamera.org/patch/14636/", "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": "<20211118164216.2669449-4-naush@raspberrypi.com>", "date": "2021-11-18T16:42:15", "name": "[libcamera-devel,v3,3/4] pipeline: raspberrypi: Increase the V4L2BufferCache slot allocations", "commit_ref": "9c246b77e4982d4fbfdbf980df0d374547d7bfcc", "pull_url": null, "state": "accepted", "archived": false, "hash": "4844affc45cd6c2ad3eec8130b957b1a8dafa3a4", "submitter": { "id": 34, "url": "https://patchwork.libcamera.org/api/1.1/people/34/?format=api", "name": "Naushir Patuck", "email": "naush@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/14636/mbox/", "series": [ { "id": 2727, "url": "https://patchwork.libcamera.org/api/1.1/series/2727/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2727", "date": "2021-11-18T16:42:12", "name": "raspberrypi: Rework the internal buffer allocation scheme", "version": 3, "mbox": "https://patchwork.libcamera.org/series/2727/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/14636/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/14636/checks/", "tags": {}, "headers": { "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>", "X-Original-To": "parsemail@patchwork.libcamera.org", "Delivered-To": "parsemail@patchwork.libcamera.org", "Received": [ "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 4A4F9BDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 18 Nov 2021 16:43:22 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 012476036F;\n\tThu, 18 Nov 2021 17:43:22 +0100 (CET)", "from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com\n\t[IPv6:2a00:1450:4864:20::32e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C02C160233\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 18 Nov 2021 17:43:19 +0100 (CET)", "by mail-wm1-x32e.google.com with SMTP id\n\tk37-20020a05600c1ca500b00330cb84834fso8151130wms.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 18 Nov 2021 08:43:19 -0800 (PST)", "from naush-laptop.pitowers.org\n\t([2a00:1098:3142:14:328d:499d:f54a:e461])\n\tby smtp.gmail.com with ESMTPSA id\n\ta1sm496246wri.89.2021.11.18.08.43.16\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 18 Nov 2021 08:43:16 -0800 (PST)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"Y5PIHFv6\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=Rd0ZYP3R2ExXSyLPu0gR7tKlyuF07AGNiEMxwDJFFy4=;\n\tb=Y5PIHFv6Vg4rHZ9oQgNPuNn38s7ZS01Td+8iqx1v+l7Rzd41dZe0A8oEoUYwoR+OfR\n\tCYbuuIQzaby4PsfSQCxX0l4EOb8U6i40wtuKgunLmIh03+Ai700lWUrqnbq72ygO3zbk\n\tdgxQLUH+3qqVo1LREQIVdFI2r9YgbGKGkHk/lpMuQwtvuH3AeFogElEO6Iit71xW/no4\n\tauuCafkU3b4l/GaRlxY6q1By0ndAs+6sT3sr0WS6uvQ+Vw6fT3VHCA/hIiMRkX7kpEKm\n\tb+A5lO6vnks26pr/QuukWBboRkfRCB4tEgNakaWsHc+ccDa334AtT2ie6HkQD4GC1cW2\n\tT0Fw==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=Rd0ZYP3R2ExXSyLPu0gR7tKlyuF07AGNiEMxwDJFFy4=;\n\tb=lfkap8RwFVPEKzFXPWP0LCPybMdkI2Zqb/LE1moKOUWqGYLca3Wd7ocgdLxUn11a2c\n\towgoGR/uIOIBv2OcbiVbIcJSAJz2T2J0eUIwBHKPCDpnqpyJF4DFdVv0NZFNFE9sIJb4\n\trstTL8IeBRD4irTCzCng5VWpPGhiF+5RuXOFsegxJrM2bFdBRh2ZVZ7tTxVWXJoIqQvY\n\tlsU/hLRD77DDRUswGtgBUMMLMV7CS0f37tp8QALBpj5jODXpbKj0yicfDiuWLfVn+OKI\n\tOFAPV7XVp3XVh+0rpddQLH3F7xVTxPyodnKKBDJXCQ+BGmLYmubnXiouHa6ueYtIuvND\n\t59+w==", "X-Gm-Message-State": "AOAM530++msI+gQORxhK/Wef/r+tSqBxqixosVA5UlvqcdERMXxLB+zy\n\t8l5WYiSJZUiBxs/VLW0NVU76WKNmG4SaCzHq", "X-Google-Smtp-Source": "ABdhPJx5/LQ7rzHxECuU1BF/J0FmzWC4LG6nnVhfOkymWczmuhswXlq5LWHTEachqgK6VIaolPowkg==", "X-Received": "by 2002:a7b:c08a:: with SMTP id\n\tr10mr11385519wmh.184.1637253799274; \n\tThu, 18 Nov 2021 08:43:19 -0800 (PST)", "From": "Naushir Patuck <naush@raspberrypi.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 18 Nov 2021 16:42:15 +0000", "Message-Id": "<20211118164216.2669449-4-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20211118164216.2669449-1-naush@raspberrypi.com>", "References": "<20211118164216.2669449-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v3 3/4] pipeline: raspberrypi: Increase\n\tthe V4L2BufferCache slot allocations", "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>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "If a stream is marked as external, double the number of V4L2BufferCache slots\nthat are allocated. This is to account for additional buffers that may be\nallocated directly by the application.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/pipeline/raspberrypi/rpi_stream.cpp | 11 +++++++++++\n 1 file changed, 11 insertions(+)", "diff": "diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp\nindex b3265d0e8aab..bab80d25ad1a 100644\n--- a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp\n@@ -107,6 +107,17 @@ int Stream::prepareBuffers(unsigned int count)\n \t\tcount = bufferMap_.size();\n \t}\n \n+\t/*\n+\t * If this is an external stream, we must allocate slots for buffers that\n+\t * might be externally allocated. We have no indication of how many buffers\n+\t * may be used, so this might overallocate slots in the buffer cache.\n+\t *\n+\t * \\todo Find a better heuristic, or, even better, an exact solution to\n+\t * this issue.\n+\t */\n+\tif (isExternal())\n+\t\tcount = count * 2;\n+\n \treturn dev_->importBuffers(count);\n }\n \n", "prefixes": [ "libcamera-devel", "v3", "3/4" ] }