From patchwork Tue Dec 6 13:54:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 17943 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id B13B8BE08B for ; Tue, 6 Dec 2022 13:55:08 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id AD90263342; Tue, 6 Dec 2022 14:55:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1670334907; bh=cN1B3/JAs+LKUBmCLjULGB8F+IrDlR9lSojo+mBolFM=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=QVnriiwzSGJ7zncn0XAA+vaRLdmp1XRBVySf8ichVWfB11CTYkawiNx8bCMY6wZrh G6g/6L8d+t4ugJUSuahHPj6PSu2HBiWYKS9rVSISc3tEuFyW3z5CJAoqPvyodYJbOk iTq+DKKmSgvELHXwTQkt916zol1QtDFcH6U0UFPLCX7wLZJhnYZ8p4YqL+f69isPWw oDJYwyMxuzy1iwwsdrSKi64a1tL2T32q/lwOtAbm/gfnZgsIaZFISZb1hb7YC2Mkzl cWUlOpVPfkoSmVOK7TlOuwjGWge7Dh0kcRFHJD3gWkluVYZXLWnwDvA8+2UHE/Aqi0 h/9cEKl2Ecxvw== Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D29FC603CD for ; Tue, 6 Dec 2022 14:55:05 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="ZY0e/UaZ"; dkim-atps=neutral Received: by mail-wm1-x330.google.com with SMTP id ay14-20020a05600c1e0e00b003cf6ab34b61so14325016wmb.2 for ; Tue, 06 Dec 2022 05:55:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=DmC5z7V/wmK/YyuW9AvxIiwzi4s1Qqe4YWNCOKTRCmw=; b=ZY0e/UaZ0doysOAJKP1eNhfJWqWZt4sboLHAMbESCwEqvwYqXmJ06hLWU9wpzn+29X WeA4kMnL2CMK15bZr2Nws25ztTVwolfQUTip8zX5xpfEje1PyNfni/iRNAKwZDa6SgKO hbkkdQXCktYD9WOoG0ZX84lsBPPI5hf0S8jKPVusiBcuF5lx8VcGTXj3b9GeKldntHuT uGf4OYiI7To1sj9EqEK3XoMn1pkF+rmPg/kFRMnGGX+63o3A8v/zBpK7ejU/L1TRbAEU Fy/u0rF7jKQYfgSUdM9cdQ3B7vGW3Pz7Lr76iosJlIsi3fXST66YLgdVS/boufNp/EDX dnjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=DmC5z7V/wmK/YyuW9AvxIiwzi4s1Qqe4YWNCOKTRCmw=; b=H35DFcUt+59vK11mOISaWInKyochS//2Ckz3IVppp5ZgVU60tTcJQnp5PRxITDW0AS n4Lm1L/cMnLPhPqxKgBWTrzfv5b+luG1yjQDvup4/5r0SXY8lN1wMuw34ZIUkj5xyj7W s+WwP54H3a5NItAOw0Fh3KBANoG7qaOD59yCWHp+Wyc0MJDW7fih8/jRtHLJmb6Qvafm zeYFuk/XxeLgrD640DB45xIxbk7V+1lI0FVHGC6BXEJtHkcs+6bJnTHFb6MhcPLCyB6Z CrWfygoaT+tplHBQKzdTdEbsn5S8Kn5krxk6FSonS5d3nCmT/euONiSD8++T2KbZQxCL LOAQ== X-Gm-Message-State: ANoB5pk2TNiBp8F7E1oXIkt83I+ADv7aRFWjaCXZ+8mTwcLBfPRPpaq3 DnuGL91YwfEFVBXb+BWcEIul2DixqOp2puG7 X-Google-Smtp-Source: AA0mqf4qpqKlT+1qjwwdeo6u+cLrHYAeK6i46ffEgTX0dAjXyKnwa1UkPySdc1bUgzHk4es1N9P5ag== X-Received: by 2002:a05:600c:1f1b:b0:3cf:35c8:289f with SMTP id bd27-20020a05600c1f1b00b003cf35c8289fmr55788808wmb.153.1670334905203; Tue, 06 Dec 2022 05:55:05 -0800 (PST) Received: from naush-laptop.localdomain ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id q6-20020a05600c2e4600b003c6bd91caa5sm19444059wmf.17.2022.12.06.05.55.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Dec 2022 05:55:04 -0800 (PST) To: libcamera-devel@lists.libcamera.org Date: Tue, 6 Dec 2022 13:54:46 +0000 Message-Id: <20221206135459.25521-1-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 00/13] Raspberry Pi: Platform configuration and buffer allocation improvements X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Naushir Patuck via libcamera-devel From: Naushir Patuck Reply-To: Naushir Patuck Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hi, Quite a few changes in version 3 of this series! I've addressed all of Laurent's and David's comments from version 2. Additionally, some of the major changes in this version include: - Adding a hints flag to StreamConfiguration. This allows us to remove the "num_output0_buffers" configuration option. This also required changes to the config validation, and buffer count calculations. - Reorder some of the commits to make more logical sense. - Switch to using *.yaml for the config files. Note that the format is still JSON based to be consistent with our tuning file. - Remove default.json. If no config file is provdied in the env variable, we simply use const defaults that match default.json from v2. - We no longer need rpi_apps.yaml. This will be handled by the application setting up the appropriate hint flag. Thanks, Naush Naushir Patuck (13): libcamera: stream: Add stream hints to StreamConfiguration libcamera: pipeline: Add a platform configuration file helper pipeline: raspberrypi: Add a pipeline config structure pipeline: raspberrypi: Reorder startup drop frame initialisation pipeline: raspberrypi: Handle MandatoryRequestBuffer hints for Unicam Image libcamera: pipeline: build: Add pipeline_data_dir variable pipeline: raspberrypi: Read config parameters from a file pipeline: raspberrypi: Disable StreamOn for ISP Output0/1 when dropping frames pipeline: raspberrypi: Handle MandatoryRequestBuffer hints for ISP Output0 pipeline: raspberrypi: Validate MandatoryRequestBuffer in queueRequestDevice() pipeline: raspberrypi: Add a parameter to disable startup drop frames pipeline: raspberrypi: Allow pipeline handler to always use the newest frame pipeline: raspberrypi: Add minimal memory usage config file include/libcamera/internal/pipeline_handler.h | 3 + include/libcamera/stream.h | 8 + src/libcamera/pipeline/meson.build | 3 + .../pipeline/raspberrypi/data/example.yaml | 29 ++ .../pipeline/raspberrypi/data/meson.build | 9 + .../raspberrypi/data/minimal_mem.yaml | 29 ++ .../pipeline/raspberrypi/meson.build | 2 + .../pipeline/raspberrypi/raspberrypi.cpp | 252 +++++++++++++++--- src/libcamera/pipeline_handler.cpp | 60 +++++ src/libcamera/stream.cpp | 24 ++ 10 files changed, 384 insertions(+), 35 deletions(-) create mode 100644 src/libcamera/pipeline/raspberrypi/data/example.yaml create mode 100644 src/libcamera/pipeline/raspberrypi/data/meson.build create mode 100644 src/libcamera/pipeline/raspberrypi/data/minimal_mem.yaml