From patchwork Fri Nov 10 11:00:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 19198 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 CD5AAC32B8 for ; Fri, 10 Nov 2023 11:00:06 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id EEA28629D0; Fri, 10 Nov 2023 12:00:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1699614005; bh=1AU+IJ1M/QDQijTXGAuccno9bu5RU0Owm0U59pqB/ls=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=fWSQtSKraT1nRxPz4c7bHroi1rXH0QL2TbO/y8ARg1g09gv4rtWgug9KCEObU0mVm OeBupYj6CbQ7OviT2kIS/oeM7ELa6eqVuzMaJre/O3L+TizXivLFLmhYp0H6n/nc6t h0wvoltbD87ntUG6nxKxB48ff+uvwkcIgY/y/6DqC8WlgeWn9kp7jM0XqIHIEyh9cJ I8pZVPsjmekZ3qGnhhOOah1j6y7UzI4AZSx9nydEJHLptFC12PyxPnJABznjUCGXpC JfngOyvbJScROy69PfkFhF65zqe6z4F/ph7ZQAo0QEw3H3aZ6PKE0aq+wh92qXHVAi UY3UMZP9o2zbg== Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 53FF7629C9 for ; Fri, 10 Nov 2023 12:00:01 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="Hm/WvHyJ"; dkim-atps=neutral Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4084095722aso14074515e9.1 for ; Fri, 10 Nov 2023 03:00:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1699614001; x=1700218801; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=93proqkiUMkkk25+FdjfHybOo3hIivrSKFMW3MZhICg=; b=Hm/WvHyJ/2xwuvdWJ5BdPBf89vbcSYARJp6DAVHotfzGq0QIf6zqj42qccoHMg7Q97 DMW4hy2WVfYrcCOOmqxQOmCm3W6znlYpiMyNLF84Xk+EcFZgDDgD8lXwCFtM/ytvhyhp /rabDiJgdohtT03Dmo6JAWdadQoKOlRuQa0ZtpnUiJST6nzLS0rtbUrhjaJtprmGj2Oz AIAIrQ4VdAaLLzX/LPH0sLFWnTF3m+eUAQ3Dkr+NCjm0p2iCYExf4BalmPFuac9Brdhq 6ePjlwZrHP9YsZKwvSFbxt0aoyEK0Ccf3i0UBvucCJZ+Pt6apjkpA7V6p0FmHmQJd0TY r0Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699614001; x=1700218801; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=93proqkiUMkkk25+FdjfHybOo3hIivrSKFMW3MZhICg=; b=SwY7sZaJA3ouAnRTtddkdpNdmtda4IDmILW8WNb81L1yxCCMgxW535JdcpY/Haj6nz XLcrSjp6UT4Llh/W4EfdhulT/bYIb76xqCax4vhlPIPySZnmsWirUlqBfiNLc6/i4UKU ifScpmVdLyIBNST+VK4Fks0WmyFs/svA209b6uvRfEvZjV2Ain4uuni/gIHb33TRmKnt M7emwPPhkvdYlwmpJhS1i/zBZxMNAX3F4YN9I5NKPep0AfQxKqvTIT+OUxuHCHvC889c k3DvDyut4/PdB3TPH+yz3QPfq0TCmcEkBlPzyrmRYjBboAUrouHXt3uf8TEto0lEpl+1 1zEg== X-Gm-Message-State: AOJu0YwZ+fwDSfutmn1iy2PRu0WNk1MM2Rts0zBIqr93DtF0fT9+3fOH SVb+CBgOocXEJrMGHAbAwRU+ndGLQr7SGf6btJd9QQ== X-Google-Smtp-Source: AGHT+IF5/GAIVtoWOfGc9fUb7PO0hOmaM1g2zVjcl/HiR6HQZ567njNDuveBEtPDxtdWFQTVybI7gQ== X-Received: by 2002:a05:600c:a4c:b0:409:718b:33e0 with SMTP id c12-20020a05600c0a4c00b00409718b33e0mr7741973wmq.16.1699614000672; Fri, 10 Nov 2023 03:00:00 -0800 (PST) Received: from localhost.localdomain ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id r15-20020a05600c35cf00b0040531f5c51asm4883156wmq.5.2023.11.10.03.00.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Nov 2023 03:00:00 -0800 (PST) To: libcamera-devel@lists.libcamera.org Date: Fri, 10 Nov 2023 11:00:02 +0000 Message-Id: <20231110110002.21381-6-naush@raspberrypi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231110110002.21381-1-naush@raspberrypi.com> References: <20231110110002.21381-1-naush@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v1 5/5] documentation: Document vendor specific control and properties handling 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" Add some documentation to the pipeline handler file describing how to implement and handle vendor specific controls and properties with a small example. Signed-off-by: Naushir Patuck --- Documentation/guides/pipeline-handler.rst | 53 +++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/Documentation/guides/pipeline-handler.rst b/Documentation/guides/pipeline-handler.rst index 10b9c75c2a7f..417eceeb62bd 100644 --- a/Documentation/guides/pipeline-handler.rst +++ b/Documentation/guides/pipeline-handler.rst @@ -672,6 +672,59 @@ handling controls: #include #include +Vendor specific controls and properties +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Vendor specific controls and properties may be defined in a separate YMAL file +and included in the build by defining the pipeline handler to file mapping in +include/libcamera/meson.build. + +For example, adding a Raspberry Pi vendor control file for the PiSP pipeline +handler is done with the following mapping: + +.. code-block:: meson + + vendor_mappings = { + # Mapping of vendor (pipeline handler) specific controls files + 'controls': + { + 'rpi/pisp': 'control_ids_rpi.yaml', + }, + # Mapping of vendor (pipeline handler) specific properties files + 'properties': + { + + } + } + +It is also possible (though inadvisable for maintenance purposes) to add vendor +specific controls directly in the the src/libcamera/`control_ids.yaml`_ or +src/libcamera/`properties_ids.yaml`_ files. + +Vendor specific controls and properties must contain a `vendor: ` +tag in the YAML definition. Every unique vendor tag must define a unique and +non-overlapping range of reserved control IDs in src/libcamera/control_ranges.yaml. + +For example, the following block defines a vendor specific control with the +`rpi` vendor tag: + +.. code-block:: yaml + + - PispConfigDumpFile: + type: string + vendor: rpi + description: | + Triggers the Raspberry Pi PiSP pipeline handler to generate a JSON + formatted dump of the Backend configuration to the filename given by the + value of the control. + +This controls will be generated in the vendor specific namespace +`libcamera::controls::rpi`. Additionally a `#define +LIBCAMERA_RPI_VENDOR_CONTROL` will be available to allow applications to test +for the availability of these controls. + +Note that draft controls are defined with the `vendor: draft` tag. + Generating a default configuration ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~