From patchwork Fri Nov 26 00:31:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scally X-Patchwork-Id: 14783 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 B9904BDB13 for ; Fri, 26 Nov 2021 00:31:30 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A3B8060494; Fri, 26 Nov 2021 01:31: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="LHF2ncm3"; dkim-atps=neutral Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A918B6011D for ; Fri, 26 Nov 2021 01:31:27 +0100 (CET) Received: by mail-wr1-x42f.google.com with SMTP id u18so14960407wrg.5 for ; Thu, 25 Nov 2021 16:31:27 -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=pipgRkyNdN3zOdLgsOQQkNd8St+GO3v6G5ig4Ux9pEo=; b=LHF2ncm3Vw5a7cOyw1CmSkOycHt4nmbiVUtLi7imQE3mXIIsy69BWbrR7p+HyWjm+1 T3GP+JYOoci/Tz9bUwRmPF0VUDAjf/T3WIMdFmkiaxmjo9tpqVv/L3TnuhUCqSsR6jCf Y8RbKgACTNJ3pelcW5/mrDRLdZTvPc1Pv/U48FxkqKXQQvANWDjHrE6qIMU9uAxhoQVT dK96hz+z/2bS2dNGhdsvqmE6Yu/lqGo7mMXlyrD83iRmahfd35uM9znOz2Ieiq2bDlYd JnfdOhXlDPe56P1La7TyIOXrBJfircDnzMolFmeb4BZB0gAC+DHCu1mZHO0xklpFEDjG gMVQ== 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=pipgRkyNdN3zOdLgsOQQkNd8St+GO3v6G5ig4Ux9pEo=; b=e4NcBBCgnzD0H3ZYfn4C4OpBzvfX8AmRZAqSkw0+4W7nxaytte9yAUkLJW2p7N74Jp +Cs/w2T6DT+9Eoi8BeaGHugpZN8rfSQY7w1rVhP7waBm/NFQiDn2mqgifEQ9bKy6Rafy Eg9NuUDpLIm27tGR1Kf21IzkTj1q65omXZJHciy4ENcft97VtstHjZW1CCLXWDB2/6IN m2fxIrVvHIuleKMh7CmGtRfsAdQxuOp20moYoLIPBjP1SSJI6J3ujsFXs+vEOYYMoQAK odA/rszZ1jXISAhQ66Gaj8DQzgGxMXZGDW7y9yRSCjUZmZEAgWzMd6zwm+gjCSxfVYiW X1wA== X-Gm-Message-State: AOAM5308DJRVy1HfygDnnQIu0N6FaSMqoYd+nt0rh0SllKr936uFlQ2y 015kLjW0RnbvwhzElNMmVmCSFbnfdRI= X-Google-Smtp-Source: ABdhPJwr5kHV711ymMen3ICUb6iCw4+4ilZ5OBRQh+rEiQNc0XLlO2hgRSEfeiwjEhXRYQQPlrDQ+Q== X-Received: by 2002:adf:8296:: with SMTP id 22mr10349353wrc.581.1637886687345; Thu, 25 Nov 2021 16:31:27 -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 b188sm4381455wmd.45.2021.11.25.16.31.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Nov 2021 16:31:27 -0800 (PST) From: Daniel Scally To: libcamera-devel@lists.libcamera.org Date: Fri, 26 Nov 2021 00:31:13 +0000 Message-Id: <20211126003118.42356-1-djrscally@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/5] 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 described in my series to linux-media [0] to find VCMs connected to Sensors in libcamera. It's based on top of a series from Han-Lin [1] and another from Kate Hsuan [2] (both of which series are pretty neat, by the way) 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, replacing the matching on driver/device names in Han-Lin's original series. With the CameraLens available to carry out the controlling of the VCM, I have pushed the controls to the pipeline handler and removed both all of that functionality (including the open()/close() of the VCM subdev) from Kate's work instead. Thanks Dan [0] https://patchwork.linuxtv.org/project/linux-media/list/?series=6792 [1] https://patchwork.libcamera.org/project/libcamera/list/?series=2743 [2] https://patchwork.libcamera.org/project/libcamera/list/?series=2750 Daniel Scally (5): libcamera: Add support for ancillary links to MediaLink libcamera: media_device: Handle ancillary links in populateLinks() libcamera: ipu3-cio2: Discover VCMs through ancillary links ipa: ipu3: Send lens controls to pipeline handler ipa: ipu3: af: Remove v4l2 interaction from AF algorithm include/libcamera/internal/media_object.h | 10 +++++ include/linux/media.h | 1 + src/ipa/ipu3/algorithms/af.cpp | 29 +------------ src/ipa/ipu3/algorithms/af.h | 3 -- src/ipa/ipu3/ipu3.cpp | 4 ++ src/libcamera/media_device.cpp | 52 ++++++++++++++++------- src/libcamera/media_object.cpp | 24 ++++++++++- src/libcamera/pipeline/ipu3/cio2.cpp | 45 +++++++++++--------- 8 files changed, 101 insertions(+), 67 deletions(-)