From patchwork Thu Oct 23 10:56:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Isaac Scott X-Patchwork-Id: 24721 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 22848C3259 for ; Thu, 23 Oct 2025 10:57:05 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B3DFD607CD; Thu, 23 Oct 2025 12:57:04 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="OxQkvI8q"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 268BE607B3 for ; Thu, 23 Oct 2025 12:57:03 +0200 (CEST) Received: from isaac-ThinkPad-T16-Gen-2.infra.iob (cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 55539591; Thu, 23 Oct 2025 12:55:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1761216918; bh=nrPCtTTkGB41ijchyicSqlU+1bna/kzlGO/Ugrm9L/c=; h=From:To:Cc:Subject:Date:From; b=OxQkvI8qvL+joxLCA5LtyGnOBXHUSe89rYyNuCkjhh58uy8CRuLIZcEWdMJspiUIF F6yUQUuRzrjX7bx/WhYp5TfPi0tu5r6EvJbPB4mss/uott0WyoPoTtKVPiHtEN5vdd ZgSSGWoJMNSYtIVkbgxBSggW+F68SmZNgOpYWDtk= From: Isaac Scott To: libcamera-devel@lists.libcamera.org Cc: Isaac Scott Subject: [PATCH 0/4] libcamera: controls: Add support for camera module identifiers Date: Thu, 23 Oct 2025 11:56:47 +0100 Message-ID: <20251023105651.78395-1-isaac.scott@ideasonboard.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Introduce support for the V4L2_CID_CAMERA_MODULE_IDENTIFIER control, along with support for string control payloads. Different camera modules can include the same underlying camera sensor, but require different parameters to be used when applying algorithms such as LSC and CCM. This means they would need their own tuning file, which in turn would need their camera_sensor_helper. To avoid code duplication, we can query a string control containing the SKU of a camera module, and search for a tuning file pertaining to that exact unique camera module, as opposed to applying the potentially incorrect base sensor tuning file. If the control is not implemented by the camera's driver, we can fall back to the tuning file for the model of sensor. This series also includes a rework of searching for tuning files to take an initializer_list instead of two strings, meaning a pipeline handlers can pass as many 'fallback' tuning file paths as they like. Isaac Scott (4): libcamera: v4l2: Support string control payloads libcamera: controls: Add CAMERA_MODULE_IDENTIFIER ipa_proxy: Rework configurationFile to take variable numbers of paths sensor: camera_sensor_legacy: Get module identifier from control include/libcamera/controls.h | 3 +- include/libcamera/internal/camera_sensor.h | 2 + include/libcamera/internal/ipa_proxy.h | 7 ++- include/libcamera/internal/v4l2_subdevice.h | 2 + include/linux/v4l2-controls.h | 2 + src/libcamera/controls.cpp | 11 +++-- src/libcamera/ipa_proxy.cpp | 48 ++++++++++++------- src/libcamera/pipeline/ipu3/ipu3.cpp | 2 +- src/libcamera/pipeline/mali-c55/mali-c55.cpp | 4 +- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 11 +++-- src/libcamera/pipeline/vimc/vimc.cpp | 2 +- src/libcamera/property_ids_core.yaml | 8 ++++ src/libcamera/sensor/camera_sensor.cpp | 10 ++++ src/libcamera/sensor/camera_sensor_legacy.cpp | 5 ++ src/libcamera/sensor/camera_sensor_raw.cpp | 4 ++ src/libcamera/software_isp/software_isp.cpp | 2 +- src/libcamera/v4l2_device.cpp | 28 +++++++++++ src/libcamera/v4l2_subdevice.cpp | 34 +++++++++++++ test/ipa/ipa_interface_test.cpp | 2 +- 19 files changed, 153 insertions(+), 34 deletions(-)