From patchwork Mon Jan 31 22:33:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scally X-Patchwork-Id: 15305 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 E0A83BF415 for ; Mon, 31 Jan 2022 22:33:43 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 110A9609C7; Mon, 31 Jan 2022 23:33:43 +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="W8NY77Bo"; dkim-atps=neutral Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 59113609AC for ; Mon, 31 Jan 2022 23:33:42 +0100 (CET) Received: by mail-wr1-x436.google.com with SMTP id k18so28288390wrg.11 for ; Mon, 31 Jan 2022 14:33:42 -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=vQC/8PimOFaQGVrNJjO3lP1Sdf1EZ0nTELFz/bYHxfk=; b=W8NY77BoY8V1Rc2PRUWDknKa5SAPuaGrsGbRxYyDrpOaNqxKrz+FoxpSC2YtBmjADw reMMVBdEKgGYFTTS5vmG7lS+xcug8jhO0hbOM7S22FvoV2Sd7EpE5TBGg0VCQ2MdCw5H 6QQ2AxJyMAn8s0jNHBXJdSpzy6FbTwWh2+At4oiGvu9OkPWzwZXkQ9IKHw6C9VJ8+v82 ZgRYhkK0XS+Y2Os0ZBnuP0NZ+8vZyv/cVNrug6pJZnLPxpo5FunFBfvDx94MDpHwX4xp jsfac9wKfPb5Ynozw4tt3cft1+YGd81Fy6GE4Uuzhruzubm+5KNNxdaMK2lpeFj9KssA SX5A== 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=vQC/8PimOFaQGVrNJjO3lP1Sdf1EZ0nTELFz/bYHxfk=; b=QWni2VPc96TjZG4hleDB70i8gXEh9Ti6vLh6Heo7AfWhsx2Hda6Zj51cowkb5eRLM9 uwf3kgOcwdrJqWUW3iFxHOp3h0+WITf6rs1KqtVkdwc0i1mCxHviZVqWfSqSyq8O79qW Km5bt9ERu1vpQp3h/2CMANowdCF1s8HrgjXQCp5diANr0w31nnRR7nIx37A3f8Jbw7q2 F/+CwKPUbK2jJ6ZYmccvTWK0Q3yz1AGoBR0GtzwJKZBKOVMP8b6+t13ujL0R0CGjJ7xC evKtxgn/Pva0QEDEY7K+MIsIQCheAnWALf445Dq45ZOEufyI3C34ibuKW/0wlk9m4seV rnNA== X-Gm-Message-State: AOAM533x55Eg39gi0SzbOKZNTtNIy6I8jp3N98ggL2g2Thg5/vLc7ABE Zm3+yW1dDdEF15O7I2nYQrtrNrSw2fI= X-Google-Smtp-Source: ABdhPJzqLcxLP8nIxciotfRs7kube/27lbGkDo2WiUkSD4oNuoMM/BuFtegy+Jd3MjJwc1cbCnud2Q== X-Received: by 2002:a05:6000:186e:: with SMTP id d14mr18383022wri.456.1643668421895; Mon, 31 Jan 2022 14:33:41 -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 q2sm6986740wrw.14.2022.01.31.14.33.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jan 2022 14:33:41 -0800 (PST) From: Daniel Scally To: libcamera-devel@lists.libcamera.org Date: Mon, 31 Jan 2022 22:33:21 +0000 Message-Id: <20220131223330.61563-1-djrscally@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 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. This is based on top of master, plus Kate's v5 [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. Thanks Dan [1] https://lists.libcamera.org/pipermail/libcamera-devel/2022-January/028837.html 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 | 30 ++++++---- src/libcamera/camera_lens.cpp | 11 ++++ src/libcamera/camera_sensor.cpp | 39 +++++++++++++ src/libcamera/media_device.cpp | 67 ++++++++++++++++------ src/libcamera/media_object.cpp | 15 +++++ src/libcamera/pipeline/ipu3/ipu3.cpp | 5 ++ 11 files changed, 151 insertions(+), 27 deletions(-)