{"id":17956,"url":"https://patchwork.libcamera.org/api/1.1/patches/17956/?format=json","web_url":"https://patchwork.libcamera.org/patch/17956/","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":"<20221206135459.25521-14-naush@raspberrypi.com>","date":"2022-12-06T13:54:59","name":"[libcamera-devel,v3,13/13] pipeline: raspberrypi: Add minimal memory usage config file","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"d5f82bf433b245270a163b5c125e7fbf133b61b6","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/17956/mbox/","series":[{"id":3659,"url":"https://patchwork.libcamera.org/api/1.1/series/3659/?format=json","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/17956/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/17956/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 F1364C3284\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  6 Dec 2022 13:55:20 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B94C86335E;\n\tTue,  6 Dec 2022 14:55:20 +0100 (CET)","from mail-wm1-x336.google.com (mail-wm1-x336.google.com\n\t[IPv6:2a00:1450:4864:20::336])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 75F546335C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  6 Dec 2022 14:55:15 +0100 (CET)","by mail-wm1-x336.google.com with SMTP id\n\tm4-20020a05600c3b0400b003d1cb516ce0so663359wms.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 06 Dec 2022 05:55:15 -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.14\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 06 Dec 2022 05:55:14 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1670334920;\n\tbh=a3YaJE7CSXCIWHjsIpjMGKKlrxVHNtGXnCOROHKsYI0=;\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=HeVcyz3g3w06wmHUncGl3+EffYPydP+Go64Fh5nO+Ily8da/ejBtLlfFyNdrXuZP7\n\tNYeDTcvbYII3R3twe/PGrt+QF2H6HWznPjrBaPr/H9+l3zZHYRVguzVrYC0mOIOM1V\n\ttgn+sC2p4wpzVPJUCX1/wuL+3oSoGAWkGfw4R5xUPQU/TD6bACYC1tlP1MslC3fmmE\n\t7wS3Mbxd6jYyxc6QPPFkrWLk4pCwJh4eTfU9oHFrthdMYNd0XmwVd8+AQdjy+ba3B0\n\twT79donXyLU6JIqGa8gDrEXWMxzlKa30dVpkk8lVZGbNxdvBbAIzP1kL5e+5iPmy2m\n\tHKZ9JMuTREFzA==","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=sWILBBIXlzAhPGU6fvcIkhjxcYBCw5crq4jorvb3iUU=;\n\tb=dzqYglzOfQxskrsTrzJZpzVyd1meLJkz2spte3XD2cZKK9yPZv9G+jcjv/e2eA/ajc\n\tozK64aMZ0dzenqE9R6yJpi5WJaWN56rVXJKPJpRnSRT/yhgWysgB9mFx7lgAQQGY4H7O\n\tqzF2LaUSPBs4ScIwxfBIhf6xEo7XtqLhke5FqAXT8RAfY6UtIPa8Joxf2taOeQAd2ZE9\n\t+0RnBtLfNUgsc8X9723LbzbCimihYdV6X2IaGECulJFmH+Zqh/1mo+e/9wF3GCQ/cD7Q\n\tpSOeTOgXhyNjgXAb2PVUZnOhXYLWduHTSR7lksVbv+j9ypeN6nKcUm/YMyHo031pQkbB\n\timSw=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"dzqYglzO\"; 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=sWILBBIXlzAhPGU6fvcIkhjxcYBCw5crq4jorvb3iUU=;\n\tb=1MzmYQp5SJc0kx0SvSSXniIeY4pwQ+dAPyoYLwnxKw4UXazmkqOAydDlOyw4W76Clp\n\tCSAKSQC9dOsbnaTvlpo2eVMXfYSGCJpGXZ+v8YW4o2Y6Jz7WzfTKaZqO94D2GUgxJxeb\n\tUH8zpFoRjD0sHKwELYAX7VnYySmQjPvcVsJ0mAE8SOehiQutiW87PHw0qacV1H09yUPJ\n\tt2MZahvT8WLQlMC7LpFG1FZD8UQ75rI0seIkiZVHDQRPT6F3pOng0vM2RpXpQgP51bBh\n\tJfxjNP0TEiFCqnEuIteAmat/GeSZHGT2fB0cPdi7sP4kZ5AJbLF7jYgX/jZPaiAGivvI\n\tlXww==","X-Gm-Message-State":"ANoB5pkI95NAFWTcoYS9Oa7oFjg6gMJRIP2WG90l5JT3wYOnkQqmWd+L\n\tjkHCvFuC5jNmFJXIkWfqNdscc39eM9Ao0brs","X-Google-Smtp-Source":"AA0mqf7VJe1TMveit0puu9y5W1h3TbWConnZSgMMD0RnnqqSct4imaP4Yx5jsE1FDSpmoT66rHxpiA==","X-Received":"by 2002:a05:600c:4f45:b0:3cf:9be3:8d26 with SMTP id\n\tm5-20020a05600c4f4500b003cf9be38d26mr56184608wmq.185.1670334914941; \n\tTue, 06 Dec 2022 05:55:14 -0800 (PST)","To":"libcamera-devel@lists.libcamera.org","Date":"Tue,  6 Dec 2022 13:54:59 +0000","Message-Id":"<20221206135459.25521-14-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 13/13] 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_mem.yaml\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.yaml         | 29 +++++++++++++++++++\n 2 files changed, 30 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..5cd593025140\n--- /dev/null\n+++ b/src/libcamera/pipeline/raspberrypi/data/minimal_mem.yaml\n@@ -0,0 +1,29 @@\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+                \"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+                \"min_total_unicam_buffers\": 1,\n+\n+                # Override any request from the IPA to drop a number of startup\n+                # frames.\n+                \"disable_startup_frame_drops\": true,\n+\n+                # Always process a pending request with the last captured sensor\n+                # frame.  Note that this might lead to avoidable frame drops\n+                # during periods of transient heavy CPU loading.\n+                \"return_newest_frames\": false\n+        }\n+}\n","prefixes":["libcamera-devel","v3","13/13"]}