[{"id":26286,"web_url":"https://patchwork.libcamera.org/comment/26286/","msgid":"<167421395240.42371.12033325964097869830@Monstersaurus>","date":"2023-01-20T11:25:52","subject":"Re: [libcamera-devel] [PATCH v5 12/12] pipeline: raspberrypi: Add\n\tminimal memory usage config file","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Naushir Patuck via libcamera-devel (2023-01-18 08:59:53)\n> Add a platform configuration file that allocates the least amount of frame\n> buffer memory possible. This configuration does come with the following\n> compromises:\n> \n> - Startup frame drops are disabled, so the first few frames will not have\n> fully converged AE/AWB/ALSC applied.\n> \n> - Applications must provide ISP Output0 and Unicam Image (if a RAW stream is\n> configured) buffers in requests.\n\nThis sounds like a configuration option that should prevent configuring\nstreams with the OptionalStream hint set.\n\n> \n> - Only 1 Unicam Image buffer will be allocated if a RAW stream is not\n> configured, causing the framerate to be effectively halved.\n> \n> To use the configuration on the Raspberry Pi platform, invoke the application\n> with the following prepended to the command line:\n> \n> LIBCAMERA_RPI_CONFIG_FILE=/usr/local/share/libcamera/pipeline/raspberrypi/minimal_mem.yaml\n> \n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> Reviewed-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\n> \n> diff --git a/src/libcamera/pipeline/raspberrypi/data/meson.build b/src/libcamera/pipeline/raspberrypi/data/meson.build\n> index 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,\n> diff --git a/src/libcamera/pipeline/raspberrypi/data/minimal_mem.yaml b/src/libcamera/pipeline/raspberrypi/data/minimal_mem.yaml\n> new file mode 100644\n> index 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\nIt seems like there will be a lot of duplciation of the documentation..\n\nBut aside from that, I think this fits the previous patches so :\n\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> +        }\n> +}\n> -- \n> 2.25.1\n>","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 98F8FC3240\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 20 Jan 2023 11:25:58 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0E033625D8;\n\tFri, 20 Jan 2023 12:25:58 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B0BD461EFD\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 20 Jan 2023 12:25:55 +0100 (CET)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 3F8D3514;\n\tFri, 20 Jan 2023 12:25:55 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1674213958;\n\tbh=KIWNh8KD1XxRDhclt5KSabODgoYFo4ng3phhUJeog7g=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=1W+83FvtFyJgjgB5sBaZ0xuXd/22npAOehYJn7yNIS4JBsgDTO6ZZ1zwc25ScrEsA\n\tpGb3lO4aHGG9R32mBNyVkLR5llX6DkIE1bHKRN8g0RNplShlCUcCAU4Vdo92s8r8MH\n\tYZnwQyOLgLGc2+ZgHYTP4Rhgcitn3LMhfFpDqVkSEvhz7W8PaAHPxq4bBMfIdAJGh6\n\tTBY+MAwBSqvPElsqbJgsWvPUp285RXtFlvtTMfuktkEsGdz51tT+XEfZ4VzNgMllVd\n\tDxMGOv82Hv3z2YRfFrrCPogZ7Pa/GD8Y3Iutt2FmsJ4qn3AF3fsbwvWXEl4NGzbpXK\n\tN85PJJrci5uOQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1674213955;\n\tbh=KIWNh8KD1XxRDhclt5KSabODgoYFo4ng3phhUJeog7g=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=UAepslSisNrHpl8TVhLRvOSuyPaatGapSdkED+AkmCmF/2F/d0YjJof+CB9+nu/sl\n\t5pxkrjiBkKZOFOU4/GEJTPq2GKxMRm99F3pA+zs4QShSMv/PAXQEQL6Ajx4I2djm1A\n\tOplmwD6vqqUPv55RkLzGQIaBwwDxOr1gAvE7UPH8="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"UAepslSi\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20230118085953.7027-13-naush@raspberrypi.com>","References":"<20230118085953.7027-1-naush@raspberrypi.com>\n\t<20230118085953.7027-13-naush@raspberrypi.com>","To":"Naushir Patuck <naush@raspberrypi.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Fri, 20 Jan 2023 11:25:52 +0000","Message-ID":"<167421395240.42371.12033325964097869830@Monstersaurus>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH v5 12/12] 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":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]