Patch Detail
Show a patch.
GET /api/patches/17947/?format=api
{ "id": 17947, "url": "https://patchwork.libcamera.org/api/patches/17947/?format=api", "web_url": "https://patchwork.libcamera.org/patch/17947/", "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": "<20221206135459.25521-5-naush@raspberrypi.com>", "date": "2022-12-06T13:54:50", "name": "[libcamera-devel,v3,04/13] pipeline: raspberrypi: Reorder startup drop frame initialisation", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "ff791e119ad0da0aa7691ec299702cf9d4d0e1e9", "submitter": { "id": 34, "url": "https://patchwork.libcamera.org/api/people/34/?format=api", "name": "Naushir Patuck", "email": "naush@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/17947/mbox/", "series": [ { "id": 3659, "url": "https://patchwork.libcamera.org/api/series/3659/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3659", "date": "2022-12-06T13:54:46", "name": "Raspberry Pi: Platform configuration and buffer allocation improvements", "version": 3, "mbox": "https://patchwork.libcamera.org/series/3659/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/17947/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/17947/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 DE0C7BE08B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 6 Dec 2022 13:55:12 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5F4B063350;\n\tTue, 6 Dec 2022 14:55:12 +0100 (CET)", "from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com\n\t[IPv6:2a00:1450:4864:20::32f])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id AC78163346\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 6 Dec 2022 14:55:08 +0100 (CET)", "by mail-wm1-x32f.google.com with SMTP id\n\th8-20020a1c2108000000b003d1efd60b65so854359wmh.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 06 Dec 2022 05:55:08 -0800 (PST)", "from naush-laptop.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tq6-20020a05600c2e4600b003c6bd91caa5sm19444059wmf.17.2022.12.06.05.55.07\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 06 Dec 2022 05:55:07 -0800 (PST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1670334912;\n\tbh=8HTIPDT/NLnYs2wOJmUDMwsBHq8KUzzKjYDz7CKniHo=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=bnQKx1lrsLKJsxzq0KLRShk0BaDTM27TEhTxVZSAArccxOtpU5CKzjwq9WNOMt1OE\n\tSLA17QtOYZX8Fz4F6WKDqJj3gIwkJKDQYtzOfHFw+XgMeVG4H3ejoth9Nw6PvtJCXI\n\tj8pFq8uTg1EZuzegfiG9B0T8U3kR1uxYFhqcddf6VDxRJm++Zx6Swx6KafAfn/K9M9\n\tzvywpM/QuwrO3scqIE5BgNEYNUuDWQjt07mKhrAjuEuiE3tpVJA5wDibLO7bF1z8cI\n\toce+xMMtCrE9nWRg3dM9ZtiJL9z2rlDsCEtQD8GOy9ZQp2lvNJLBKjdflmMj1HfkdA\n\ttmbX4G2V825wA==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=5Z11VugKNVYk4NrBATUQ29zE9EItJoR8a0aD1H32Zho=;\n\tb=YPhG6K2UBHSzUFotlPFnMMcVD6rAYFfJUXj2perq1d//oBfT0kFOieli71dnLgfgRS\n\tEwAxCqMbLJgz4KvKR3heksKZcodOzv1GnG2AzsjbdheEpRgWvkf+YH/C900P6GMZ0Y15\n\tu2FanKtwYDOSRUVkymjopvUATkLWxlhVlN/2V8OM3PA00H5c3vnOs906UwJL2RcVjyow\n\tfo2nllGl4ZdueV8hhJX1w1IUSO4vy/zai+9dR6dkFcJpq31xhZ+cTKq1xGv1V/wwyhAs\n\tX/oDwuA5KBq5j5OpRwVtwqBe94JJtDoAiqaoRqQeHMgIY3KhVaxxULpwTkPOhME+e+7D\n\tbpfA==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"YPhG6K2U\"; dkim-atps=neutral", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=5Z11VugKNVYk4NrBATUQ29zE9EItJoR8a0aD1H32Zho=;\n\tb=Ft21C8D2+j5/ATaHy1shhtzYtABk2kcNPAmFEQ/u1Nq2wnhHKZvvdXUvVhkwj/3r1a\n\tmKg/gfk+zfGN+C/WehecsVYmjYYj0HxFevEnYxaZW5KJ0dpGIKxIsUEcVytA3zZRaMso\n\tp8c764Ig4TXbK6Ako3+lZkRZcOC7P6E8sQo0/JodM6NG4SsV4xygC/95Pvh7vR65ugWX\n\tH/1W+nwITQO8NCd8SmxPvevJ5RyBTTLg/J6RATcXh5VnnKv9w1Asw6btjENz9J46xckL\n\t+Lnk/Oouy2ICH85bGSINGaxpeePRXdgcF0c9srkT8FEKnKCtaR0HAwgy5R6CT87lWvaU\n\teA8A==", "X-Gm-Message-State": "ANoB5plLkQvfdnsLaq036jtuP7Tlop/RozKHn1jK8Q8YoQRqL2uSQUdu\n\taoLkfujHXcTb+Lf062L5GEqYFt4i+ftKGAG6", "X-Google-Smtp-Source": "AA0mqf58ysPl71DJ2YVmQxSRTaGYBxSvLzgXla9RqVVvHX0+Ww7F8JsGz0Wl80CHhJfWFRkdhFOzqQ==", "X-Received": "by 2002:a7b:c3d3:0:b0:3d1:cec6:75a8 with SMTP id\n\tt19-20020a7bc3d3000000b003d1cec675a8mr5970784wmj.206.1670334908261; \n\tTue, 06 Dec 2022 05:55:08 -0800 (PST)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 6 Dec 2022 13:54:50 +0000", "Message-Id": "<20221206135459.25521-5-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20221206135459.25521-1-naush@raspberrypi.com>", "References": "<20221206135459.25521-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v3 04/13] pipeline: raspberrypi: Reorder\n\tstartup drop frame initialisation", "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>", "From": "Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Naushir Patuck <naush@raspberrypi.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Reorder the code such that the IPA requested startup drop frames count is\navailable before the pipeline handler allocates any stream buffers.\n\nThis will be used in a subsequent change to stop Unicam buffer allocations if\nthere are no startup drop frames required and the application has configured a\nraw stream and always provides buffers for it.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n .../pipeline/raspberrypi/raspberrypi.cpp | 30 +++++++++----------\n 1 file changed, 15 insertions(+), 15 deletions(-)", "diff": "diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex f6388d63416b..c5a489fc7581 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -1036,21 +1036,6 @@ int PipelineHandlerRPi::start(Camera *camera, const ControlList *controls)\n \tRPiCameraData *data = cameraData(camera);\n \tint ret;\n \n-\tfor (auto const stream : data->streams_)\n-\t\tstream->resetBuffers();\n-\n-\tif (!data->buffersAllocated_) {\n-\t\t/* Allocate buffers for internal pipeline usage. */\n-\t\tret = prepareBuffers(camera);\n-\t\tif (ret) {\n-\t\t\tLOG(RPI, Error) << \"Failed to allocate buffers\";\n-\t\t\tdata->freeBuffers();\n-\t\t\tstop(camera);\n-\t\t\treturn ret;\n-\t\t}\n-\t\tdata->buffersAllocated_ = true;\n-\t}\n-\n \t/* Check if a ScalerCrop control was specified. */\n \tif (controls)\n \t\tdata->applyScalerCrop(*controls);\n@@ -1067,6 +1052,21 @@ int PipelineHandlerRPi::start(Camera *camera, const ControlList *controls)\n \t/* Configure the number of dropped frames required on startup. */\n \tdata->dropFrameCount_ = startConfig.dropFrameCount;\n \n+\tfor (auto const stream : data->streams_)\n+\t\tstream->resetBuffers();\n+\n+\tif (!data->buffersAllocated_) {\n+\t\t/* Allocate buffers for internal pipeline usage. */\n+\t\tret = prepareBuffers(camera);\n+\t\tif (ret) {\n+\t\t\tLOG(RPI, Error) << \"Failed to allocate buffers\";\n+\t\t\tdata->freeBuffers();\n+\t\t\tstop(camera);\n+\t\t\treturn ret;\n+\t\t}\n+\t\tdata->buffersAllocated_ = true;\n+\t}\n+\n \t/* We need to set the dropFrameCount_ before queueing buffers. */\n \tret = queueAllBuffers(camera);\n \tif (ret) {\n", "prefixes": [ "libcamera-devel", "v3", "04/13" ] }