{"id":17605,"url":"https://patchwork.libcamera.org/api/1.1/patches/17605/?format=json","web_url":"https://patchwork.libcamera.org/patch/17605/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/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":"<20221014131846.27169-10-naush@raspberrypi.com>","date":"2022-10-14T13:18:45","name":"[libcamera-devel,v1,09/10] pipeline: raspberrypi: Add minimal memory usage config file","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"5652903a6943b2fa78b1406859ae48fdc196fa0a","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/1.1/people/34/?format=json","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/17605/mbox/","series":[{"id":3555,"url":"https://patchwork.libcamera.org/api/1.1/series/3555/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3555","date":"2022-10-14T13:18:37","name":"Raspberry Pi: Platform configuration and buffer allocation improvements","version":1,"mbox":"https://patchwork.libcamera.org/series/3555/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/17605/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/17605/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 27B48C3288\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 14 Oct 2022 13:19:05 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BDE6862DE3;\n\tFri, 14 Oct 2022 15:19:04 +0200 (CEST)","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 CFC8E62DCF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 14 Oct 2022 15:18:58 +0200 (CEST)","by mail-wm1-x32e.google.com with SMTP id\n\to20-20020a05600c4fd400b003b4a516c479so3506628wmq.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 14 Oct 2022 06:18:58 -0700 (PDT)","from naush-laptop.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tg17-20020a05600c001100b003c6bbe910fdsm8282458wmc.9.2022.10.14.06.18.57\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 14 Oct 2022 06:18:57 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1665753544;\n\tbh=2Sy/DBqiypKC+W+kxP3byCJXUzU49e8NfVm12XkvPo8=;\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=MKW3mTYF2slIeet+PfjQJzM7L/i7HmcKUAZftCp7J0NYoSia1P7x+J2AZOmcyyXSC\n\tjZIuHb8bwKwfWjVGiNhdannDwGkt0nNFwxT1+syLVYQKQM6jntAN21oKL679Dnlu3H\n\tYE32PIa4EvPy0ukEoQ/ORqiIK0eAS7XqBX1dJXy01nwqO0/B9UeEkv7IwSaFA3rdsF\n\t9WJYztSek0uPW6P3+QGw50g6Dc4IpIaN/Xk8sBX9lyb98Cq6n09MNr9GlTtwUsLe7z\n\tUsu4oL/nr9g3JP9OvC8+0iGxjOPKUXwJ4Ov50SpoijQr4069Bgc/ngavfMF4afdeo6\n\tOoB7jTKfHfk8A==","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=4AWqYSoWbUS8BtecNwzpxgH9URcP2OOV0lO91UAnwdI=;\n\tb=omazfqa+MPZ0rd+BFv0rnNzJ52pXillSPep8KIXvhACWG3eZjVn8fFiMfe6txHWjNO\n\tNdfIEWLQm3xYpi1LQRSwiU/afCIBcqqUjj2YJiPLDxMpU95GZJ0LS40Bx1e8cetfl6Nx\n\t0YyJYPtvzVbK5Er+40aZTQm+cUVi1GeI2AQLYJADEWwUwgSLwLLzvN/W4VHSPV4828wE\n\t2c0L2Tis5r0rFw0yS9Ij0BhMPJa7GKFVC4QubAuFWBZHNRm1G+aSWjNDDzdtQvCP0r+r\n\tuLYKETtyyztDkBIpBf861o92OGxje2xr3I+hEQ/zuhatxc/4UF2P7Rl6x5/JB2ftM+a/\n\tuB8A=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"omazfqa+\"; 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=4AWqYSoWbUS8BtecNwzpxgH9URcP2OOV0lO91UAnwdI=;\n\tb=Y+Yb7Uqv1MiOrXHV3Z7LSwXtv7OgMblAJidjkovxvMaY10UhsIn/oa2cEoPI04L4Mj\n\tXqGDTptIauxt9cYSSdt2RjPBTCCbSMSjwLzmZK5divwfWGj8+AVnp2Q/7ZJkXHuWKh2r\n\tQ20aN6cq+d0WPjs4cYHNzXS8XYODH4D+RuoTLmUkOktl+bhdb27e6WlwdxiD6HtV17Rm\n\tMXmLRZSfJ/BeQpwfjdtN83ucyyJ1++n7H5wyXxbFvOHgt+j9DMQMFeuE9CFYvbiBnOxa\n\tEJo3YMjU+aqyw3yi4Ewryt1jgZvuWUHI/TEI+x+TS+M/2QhLhwtBVx+d8LUZeza1wNiT\n\tRTlg==","X-Gm-Message-State":"ACrzQf2+TtbMJwdtOYuv8LRsdnp/OrgfjqgauRR2B+grleBd64VvY0kt\n\t7LOpSChw1qPJgNVuzhPDcLsTYMovQhTRnA==","X-Google-Smtp-Source":"AMsMyM5OE977jpOMddr+WGv9LnfyVSbQQQwrSa0brto/kgYloYPYXh4bkv66e8/T1PYvahiooS72AA==","X-Received":"by 2002:a05:600c:358b:b0:3c6:e3e4:828f with SMTP id\n\tp11-20020a05600c358b00b003c6e3e4828fmr3529084wmq.10.1665753538331; \n\tFri, 14 Oct 2022 06:18:58 -0700 (PDT)","To":"libcamera-devel@lists.libcamera.org","Date":"Fri, 14 Oct 2022 14:18:45 +0100","Message-Id":"<20221014131846.27169-10-naush@raspberrypi.com>","X-Mailer":"git-send-email 2.25.1","In-Reply-To":"<20221014131846.27169-1-naush@raspberrypi.com>","References":"<20221014131846.27169-1-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v1 09/10] 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 frame\nbuffer memory possible. This configuration does come with the following\ncompromises:\n\n- Startup frame drops are disabled, so the first few frames will not have\nfully converged AE/AWB/ALSC applied.\n\n- Applications must provide ISP Output0 and Unicam Image (if a RAW stream is\nconfigured) 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 application\nwith the following prepended to the command line:\n\nLIBCAMERA_RPI_CONFIG_FILE=/usr/local/share/libcamera/pipeline/raspberrypi/minimal_memory.json\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n .../pipeline/raspberrypi/data/meson.build     |  1 +\n .../raspberrypi/data/minimal_mem.json         | 28 +++++++++++++++++++\n 2 files changed, 29 insertions(+)\n create mode 100644 src/libcamera/pipeline/raspberrypi/data/minimal_mem.json","diff":"diff --git a/src/libcamera/pipeline/raspberrypi/data/meson.build b/src/libcamera/pipeline/raspberrypi/data/meson.build\nindex 232f8b43c5fd..0592fc53877d 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     'default.json',\n+    'minimal_mem.json',\n ])\n \n install_data(conf_files,\ndiff --git a/src/libcamera/pipeline/raspberrypi/data/minimal_mem.json b/src/libcamera/pipeline/raspberrypi/data/minimal_mem.json\nnew file mode 100644\nindex 000000000000..fb306aa08f94\n--- /dev/null\n+++ b/src/libcamera/pipeline/raspberrypi/data/minimal_mem.json\n@@ -0,0 +1,28 @@\n+{\n+        \"version\": 1.0,\n+        \"target\": \"bcm2835\",\n+\n+        \"pipeline_handler\":\n+        {\n+                # The minimum number of internal buffers to be allocated for Unicam.\n+                # This value must less than or equal to min_total_unicam_buffers.\n+                \"min_unicam_buffers\": 0,\n+\n+                # The minimum total (internal + external) buffer count used for Unicam.\n+                # The number of internal buffers allocated for Unicam is given by:\n+                # internal buffer count = max(min_unicam_buffers,\n+                #                             min_total_unicam_buffers - external buffer count)\n+                \"min_total_unicam_buffers\": 1,\n+\n+                # The number of internal buffers used for ISP Output0.\n+                \"num_output0_buffers\": 0,\n+\n+                # Override any request from the IPA to drop a number of startup frames.\n+                \"disable_startup_frame_drops\": true,\n+\n+                # Always process a pending request with the last captured sensor frame.\n+                # Note that this might lead to avoidable frame drops during periods\n+                # of transient heavey CPU loading.\n+                \"return_newest_frames\": false\n+        }\n+}\n","prefixes":["libcamera-devel","v1","09/10"]}