{"id":17916,"url":"https://patchwork.libcamera.org/api/1.1/patches/17916/?format=json","web_url":"https://patchwork.libcamera.org/patch/17916/","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":"<20221129134534.2933-10-naush@raspberrypi.com>","date":"2022-11-29T13:45:33","name":"[libcamera-devel,v2,09/10] pipeline: raspberrypi: Add minimal memory usage config file","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"2aec048014d15274492e2cc076447644af8ad43b","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/17916/mbox/","series":[{"id":3647,"url":"https://patchwork.libcamera.org/api/1.1/series/3647/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3647","date":"2022-11-29T13:45:24","name":"Raspberry Pi: Platform configuration and buffer allocation improvements","version":2,"mbox":"https://patchwork.libcamera.org/series/3647/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/17916/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/17916/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 E37B8C3287\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 29 Nov 2022 13:45:51 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9630263347;\n\tTue, 29 Nov 2022 14:45:51 +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 20FC66333E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 29 Nov 2022 14:45:45 +0100 (CET)","by mail-wm1-x32f.google.com with SMTP id\n\tr66-20020a1c4445000000b003d05a3775d4so4906618wma.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 29 Nov 2022 05:45:45 -0800 (PST)","from naush-laptop.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tn8-20020a05600c3b8800b003cfbbd54178sm3565636wms.2.2022.11.29.05.45.43\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 29 Nov 2022 05:45:43 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1669729551;\n\tbh=nhMjr/8XCo8fFgW+XAgMjAcAbVxyemxB03eGT+6+vxs=;\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=l9RD19RU3s1W4RvjEhpL+nofyNXNxgIOEXDHMudUoTeRvsL9vY+1MhDpuuVneYL19\n\tFdL460FTgQjiHlsyXDYiCVpsz81bJnu0Ty1qfFFqMIylTGHm8lk6hv3cpPYUIFb5BJ\n\tdY3kfUeDAbdXzMSck4hYlGOHQW5kRqNxY3tzSwDihx6Z7evRZZYpVYTiZdCSVI+s1l\n\tFM62/A1I3GjTlZsO6cqF8Kd2KC9M/HdBzWoBA6gY+fV015R81VRXej3w7/6Jrwj395\n\t9PQTt1cUBao6Cld/euiSKApFOZl97VkcR4lACOLzDcxkSF+B8KMr3Cp/0+KFPRkNUf\n\tXsC1x/4+mJjSQ==","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=uJOuSzayRsCSnI+YDcJu56Ukq9KBYQOZTGGIta+kJ1s=;\n\tb=ZORRXxnCiRc8flmuTH/kQr6CEz52pIShKitteOTnQSh8UIJoU9Szmkh0uRD4QKofxq\n\ttY+lZ1PhqBf2FuUkRue7YTXXD/E/JD0HQEMjmHi9xkTlfr25R/y5X3TP3GECk/Nu48Rl\n\tMMB0oMktmuGjH+BdVQIsKaL/GvW6sLtbs1xkH80SqiD32O0zPQfu/YErfBfnTivp4ou4\n\tOIqLqFpgUf19ufIozffay9Y+YEdJvB0pHXCgr1Kl5BCUHBJ9YZC7rKf1LuKipdml0C7Z\n\tqrK5EK3/slnDjZn/qcTS66Bbv7kPWI0JWw/zzcM0ilCprUyePtQ3TOAViXEsZmfoVM20\n\tgPtA=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"ZORRXxnC\"; 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=uJOuSzayRsCSnI+YDcJu56Ukq9KBYQOZTGGIta+kJ1s=;\n\tb=iJZxdmFMmTAZzjfy2idEkdFIB2pXWf7q9RLbIExLqm0uSm0J7hiVnMAjA2NUKL4hb9\n\tvwRLVMT4DJNxMdnsf+9MTzO8ftUjuMAofCGsklLLH/wRAaCNUwCl1zwVu20eOCDTB/JC\n\tDL9v4yOQTPeCb3k47S2u0exRhC5YA36VU7Qw/PsHfA5pKaciy9Bk+Q6twxSWPpnVpKgj\n\ttCP85mQIx+plTwvMhxDev3F5uhcSDNU0Cgkju+8vlHv9M96epJLhw0eR6tij/R9Z3YAB\n\tlnqOQqE4HHEBq57s0sglr+3bGVOTZBT2ske4AUpA0e6AzdaVcfkT4VmR49P4GpU4WeVL\n\t3YrA==","X-Gm-Message-State":"ANoB5pnL/7DEMr0AUe8FWYYXcTOvZuctVxwFtY/VBIdNReR9s4jmBitm\n\twD/yy1q/MkLK30yFV1r71r+JFCxdUIVWHg==","X-Google-Smtp-Source":"AA0mqf41NKF86WS+iBFQkQFbURtlNbQUYRedri5HAOm2V0Zk3CxQ7RKigAO61pxuSV+d13aFks0Qvg==","X-Received":"by 2002:a1c:4b0f:0:b0:3cf:735c:9d5a with SMTP id\n\ty15-20020a1c4b0f000000b003cf735c9d5amr34915263wma.113.1669729544261; \n\tTue, 29 Nov 2022 05:45:44 -0800 (PST)","To":"libcamera-devel@lists.libcamera.org","Date":"Tue, 29 Nov 2022 13:45:33 +0000","Message-Id":"<20221129134534.2933-10-naush@raspberrypi.com>","X-Mailer":"git-send-email 2.25.1","In-Reply-To":"<20221129134534.2933-1-naush@raspberrypi.com>","References":"<20221129134534.2933-1-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v2 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>\nReviewed-by: David Plowman <david.plowman@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..87ede70ee854\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 heavy CPU loading.\n+                \"return_newest_frames\": false\n+        }\n+}\n","prefixes":["libcamera-devel","v2","09/10"]}