{"id":18211,"url":"https://patchwork.libcamera.org/api/patches/18211/?format=json","web_url":"https://patchwork.libcamera.org/patch/18211/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20230127154322.29019-12-naush@raspberrypi.com>","date":"2023-01-27T15:43:18","name":"[libcamera-devel,v6,11/15] pipeline: raspberrypi: Add minimal memory usage config file","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"c35707c2a1327deffac7b4fb5830c083de8e8e6b","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/?format=json","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/18211/mbox/","series":[{"id":3728,"url":"https://patchwork.libcamera.org/api/series/3728/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3728","date":"2023-01-27T15:43:07","name":"[libcamera-devel,v6,01/15] libcamera: stream: Add stream hints to StreamConfiguration","version":6,"mbox":"https://patchwork.libcamera.org/series/3728/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/18211/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/18211/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 CF671C3297\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 27 Jan 2023 15:43:51 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 705FC625FD;\n\tFri, 27 Jan 2023 16:43:51 +0100 (CET)","from mail-wr1-x434.google.com (mail-wr1-x434.google.com\n\t[IPv6:2a00:1450:4864:20::434])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C70D6625EA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 27 Jan 2023 16:43:42 +0100 (CET)","by mail-wr1-x434.google.com with SMTP id bk16so5314255wrb.11\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 27 Jan 2023 07:43:42 -0800 (PST)","from localhost.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\th18-20020a05600c30d200b003c21ba7d7d6sm4549566wmn.44.2023.01.27.07.43.41\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 27 Jan 2023 07:43:41 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1674834231;\n\tbh=1Ig8lWSCDlGf6VtqXhWEwfeoCFsqN7yB5rm1PzEHhOw=;\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=lAUoYm9S6+zcg0OYGnn5d1O6qZOhLn8Bfl+RbKToQSXJm9FsoACcScRV730VGeCdX\n\tRwDYj+38gq5FCLtMxENqUjZA/gY1IrFYltukXAAat1Mmo2n2q1zItvXPjaJbW7syKB\n\tWpJFoGyjhGqSLQUoC6lzBhtfgf2/V5c9VdWJzA3ELPZuXHPmn3wOL8qe/cKU9NVulk\n\tavm2WR4xLn3GfKQDC9uYNwssrxHgMDWgk/ukG3ib4SWttDr7NENtbnddq1i15/Ujrn\n\tXjSseMReS6KE8OCd5RoysLEE4BmM8z5mbDDn6HySbptfD89XrXbP0ZXavJUndvWAd5\n\tQt8Z3njEXoA/A==","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=6Pu/E3yZHUFL7jfDGhxcod1G6B+EAehMGf3zdxn2Go0=;\n\tb=NeVffUHK+yS0olihAs1licR6w6GZ76ed9VkI5OKmIycR4hKvr2EkBR16OnlMiKU4CQ\n\tG1Qd/lWaNwhu/2docvGE3UsytTY8fbrJ8S1X0WI+K3/Fgcj5VuWiobIZnyq+AlTA/W39\n\ts+YT4eMzEWHjscQt5Z6zEFxAwDy/UC/Kx1xMdNAph4tif6XxszBzyO3rwNZfIM8Ks2Yl\n\tkBZuxOERA7kT2OmA6INP0z60hKPl8IDl8ODfzjuMXzLs9MrtO8dUcqFeODmYe+v5+Hpd\n\tRb9aeJrV1pHyp+AH5L2IXIguB8qSA/NoIuWzvEXe4KFIYzxr6JM7x0BfvP7LH6+sZ+7M\n\tUPCw=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"NeVffUHK\"; 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=6Pu/E3yZHUFL7jfDGhxcod1G6B+EAehMGf3zdxn2Go0=;\n\tb=0c9CFcuHBu2R3pNuqz+UY5aXVS5kGCdYyan1Bd7lw52oFXU+v0Az3faf8emJZpaRVH\n\tSbVmP9Ay/x3bARsjjFkalXlrjW5QEtckaluLQheszOzpZbxPhJ66RRqAovFxm3B0lS0H\n\tZseSTM9JNSqYxApUDsXcS9cRLi12FEXVUoTL3ohhb+vT0u6Hhq53r1+gOiG2sWa/a9qg\n\tqSXGBl91Ak7xucT2QOJep/llmwUoSAA36kDupZFAJbo6l6bj5s9HFCVCpQakQQ0YZYuF\n\t1TgX2JeVlBcHP/wgMNTwT14x4fkqPLZsl2nsbSqhN3Tu2mCYtarErHgBSZNGQFfGSRdZ\n\tXgag==","X-Gm-Message-State":"AFqh2kqjTCBYQcq6floQXpWDsCydnJTVdRcSA3tWqTXcnqa4Rv/RIpcc\n\tKVHKTaQG7ZTwSdLc9HAB82EKxqBwWwCPG9AuBow=","X-Google-Smtp-Source":"AMrXdXsPgjEqJghSce77KbkUg22vSnB5teKvgtZRLLM+rYG0YULPFKyjMcSGsd+gzR9Ay3Nnkdu6qw==","X-Received":"by 2002:a5d:5190:0:b0:2bd:fde4:885c with SMTP id\n\tk16-20020a5d5190000000b002bdfde4885cmr33059578wrv.63.1674834222197; \n\tFri, 27 Jan 2023 07:43:42 -0800 (PST)","To":"libcamera-devel@lists.libcamera.org","Date":"Fri, 27 Jan 2023 15:43:18 +0000","Message-Id":"<20230127154322.29019-12-naush@raspberrypi.com>","X-Mailer":"git-send-email 2.25.1","In-Reply-To":"<20230127154322.29019-1-naush@raspberrypi.com>","References":"<20230127154322.29019-1-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v6 11/15] pipeline: raspberrypi: Add\n\tminimal memory usage config file","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":"Add a platform configuration file that allocates the least amount of\nframe buffer memory possible. This configuration does come with the\nfollowing compromises:\n\n- Startup frame drops are disabled, so the first few frames will not\nhave fully converged AE/AWB/ALSC applied.\n\n- Applications must provide ISP Output0 and Unicam Image (if a RAW\nstream is configured) buffers in requests.\n\n- Only 1 Unicam Image buffer will be allocated if a RAW stream is not\nconfigured, causing the framerate to be effectively halved.\n\nTo use the configuration on the Raspberry Pi platform, invoke the\napplication with the following prepended to the command line:\n\nLIBCAMERA_RPI_CONFIG_FILE=/usr/local/share/libcamera/pipeline/raspberrypi/minimal_mem.yaml\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: David Plowman <david.plowman@raspberrypi.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n .../pipeline/raspberrypi/data/meson.build     |  1 +\n .../raspberrypi/data/minimal_mem.yaml         | 37 +++++++++++++++++++\n 2 files changed, 38 insertions(+)\n create mode 100644 src/libcamera/pipeline/raspberrypi/data/minimal_mem.yaml","diff":"diff --git a/src/libcamera/pipeline/raspberrypi/data/meson.build b/src/libcamera/pipeline/raspberrypi/data/meson.build\nindex 1c70433bbcbc..6aecd8ae68c8 100644\n--- a/src/libcamera/pipeline/raspberrypi/data/meson.build\n+++ b/src/libcamera/pipeline/raspberrypi/data/meson.build\n@@ -2,6 +2,7 @@\n \n conf_files = files([\n     'example.yaml',\n+    'minimal_mem.yaml',\n ])\n \n install_data(conf_files,\ndiff --git a/src/libcamera/pipeline/raspberrypi/data/minimal_mem.yaml b/src/libcamera/pipeline/raspberrypi/data/minimal_mem.yaml\nnew file mode 100644\nindex 000000000000..5e4906af7cfd\n--- /dev/null\n+++ b/src/libcamera/pipeline/raspberrypi/data/minimal_mem.yaml\n@@ -0,0 +1,37 @@\n+{\n+        \"version\": 1.0,\n+        \"target\": \"bcm2835\",\n+\n+        \"pipeline_handler\":\n+        {\n+                # The minimum number of internal buffers to be allocated for\n+                # Unicam. This value must be greater than 0, but less than or\n+                # equal to min_total_unicam_buffers.\n+                #\n+                # A larger number of internal buffers can reduce the occurrence\n+                # of frame drops during high CPU loads, but might also cause\n+                # additional latency in the system.\n+                #\n+                # Note that the pipeline handler might override this value and\n+                # not allocate any internal buffers if it knows they will never\n+                # be used. For example if the RAW stream is marked as mandatory\n+                # and there are no dropped frames signalled for algorithm\n+                # convergence.\n+                #\n+                \"min_unicam_buffers\": 0,\n+\n+                # The minimum total (internal + external) buffer count used for\n+                # Unicam. The number of internal buffers allocated for Unicam is\n+                # given by:\n+                #\n+                # internal buffer count = max(min_unicam_buffers,\n+                #         min_total_unicam_buffers - external buffer count)\n+                #\n+                \"min_total_unicam_buffers\": 1,\n+\n+                # Override any request from the IPA to drop a number of startup\n+                # frames.\n+                #\n+                \"disable_startup_frame_drops\": true\n+        }\n+}\n","prefixes":["libcamera-devel","v6","11/15"]}