From patchwork Tue Dec 7 22:45:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scally X-Patchwork-Id: 15066 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 8AD0BBDB13 for ; Tue, 7 Dec 2021 22:45:30 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A3A3B60872; Tue, 7 Dec 2021 23:45:29 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="c5rfUs7J"; dkim-atps=neutral Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7126560592 for ; Tue, 7 Dec 2021 23:45:28 +0100 (CET) Received: by mail-wr1-x431.google.com with SMTP id t18so698049wrg.11 for ; Tue, 07 Dec 2021 14:45:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HR3T2vC7fx0ABdsh4HRiDGsgEVy4shj+EfJ1dNk47Oo=; b=c5rfUs7J9dT7MP9Gz7UJ77gYmtdNbNRYcp7E9lh+IMJkwVlYqK4zypUTqGtlYM62jm KzONRQRfCy/xzjRUvogPFxjbTQSeh0koBGgLCdcBMl/uTg8vDyqH+jMdGCygIZXVgQdD o13YFEnYoPFFsgjE7MGK6fdUxn2kfZ8n+tyLrGIVwPfiaaLBO6AFTeZBcktq2ig5z7MR vTmV83kY8/mnqyg87jZKoOA7JJYj6g81+7U9G/AnsDTNuPcNXns+W5DufbPKnJyoYZHR i6ph+MIaA5PtW1iqA5rBKIFg17On169kPxSgfhiianhuCAgpqiIBjMy8s2wbnAhp2N9l DEtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HR3T2vC7fx0ABdsh4HRiDGsgEVy4shj+EfJ1dNk47Oo=; b=AvVf4dTE0AeuMk1s9ICALxXuHTaJYn098QThzgjvQXXH4PBe6yDbjTGFiKvO7hfRtU DbGOioVwe2lM/TAqTYwO/dlAA+VZ2U+w83CmIER9pSvh4qmwhBhSAkoqjtqjtPGNIrSh hOI2I+4yqEtW3s2mEA83zxrOpH8hXx7/y7JY+hJtE8I7Wc1FGD6OTvhp10MaPtkYUh7w tz+Z55xfIqSjtd9lnC5wrbpqyMru4+OmUMOAdyIzm1I8A1gFyN/UkTxs2LO6+BALm+4L BG28RqTUkyHCBkT2ZacURZWJYT7tP4/MbGFfU/JAmpbCTrpBypl+6Wltxm5gaxJHApFp FsSw== X-Gm-Message-State: AOAM533NFnXk/GrZXLNKN/FFLhkMGsiiXORDXxrnhHDLc2IeKCLYWIBg AONQk/bQzoieCtigDccIkTDRMiO32Jo= X-Google-Smtp-Source: ABdhPJzxo+aMbp88UaR1gbz+3af1tEhl02VEZWcgNuySJbUXKOmUUW45AapIPIglqrDEQojMXC84Og== X-Received: by 2002:a05:6000:381:: with SMTP id u1mr54557272wrf.302.1638917128148; Tue, 07 Dec 2021 14:45:28 -0800 (PST) Received: from localhost.localdomain (cpc141996-chfd3-2-0-cust928.12-3.cable.virginm.net. [86.13.91.161]) by smtp.gmail.com with ESMTPSA id y12sm980332wrn.73.2021.12.07.14.45.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Dec 2021 14:45:27 -0800 (PST) From: Daniel Scally To: libcamera-devel@lists.libcamera.org Date: Tue, 7 Dec 2021 22:45:03 +0000 Message-Id: <20211207224512.753979-1-djrscally@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 0/9] Enumerate CameraLens by following sensor's ancillary links 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" Hello All This series is an attempt at making the incoming VCM support a little more agnostic, by following the new style of media links to find VCMs connected to Sensors in libcamera. Now that Han-Lin's series is merged this is based on top of master, plus Kate's v3 [1] The general principle of the new links is an entity to entity link which will be connected by the kernel between a sensor's entity and an entity for a VCM device, where those entities have a fwnode match based on the "lens-focus" property against the sensor. These links are then discovered by libcamera and followed to create an instance of the CameraLens class. With the CameraLens available to carry out the controlling of the VCM, I have pushed the controls to the pipeline handler. Series changes in v3: - New patch #2 which splits out from #3 - New patch #7, which renames the existing ctrls_ field to sensorCtrls_ to make clear the distinction. Thanks Dan [1] https://patchwork.libcamera.org/patch/15011/ Daniel Scally (9): libcamera: Add members to MediaEntity to support ancillary entities include: linux: Add MEDIA_LNK_FL_ANCILLARY_LINK libcamera: media_device: Handle ancillary links in populateLinks() libcamera: camera_sensor: Discover VCMs through ancillary links libcamera: camera_lens: Add function to fetch subdev controls libcamera: ipa: Add lens control member to ipu3 ipa interface libcamera: ipa: Rename ctrls_ member libcamera: ipu3: Pass lens controls to config info ipa: ipu3: Send lens controls to pipeline handler include/libcamera/internal/camera_lens.h | 4 ++ include/libcamera/internal/camera_sensor.h | 1 + include/libcamera/internal/media_object.h | 4 ++ include/libcamera/ipa/ipu3.mojom | 1 + include/linux/media.h | 1 + src/ipa/ipu3/ipu3.cpp | 32 ++++++++----- src/libcamera/camera_lens.cpp | 11 +++++ src/libcamera/camera_sensor.cpp | 39 +++++++++++++++ src/libcamera/media_device.cpp | 55 +++++++++++++++------- src/libcamera/media_object.cpp | 15 ++++++ src/libcamera/pipeline/ipu3/ipu3.cpp | 5 ++ 11 files changed, 141 insertions(+), 27 deletions(-)