From patchwork Thu Mar 3 23:49:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scally X-Patchwork-Id: 15407 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 21AF4BE08A for ; Thu, 3 Mar 2022 23:50:15 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 2BA0361168; Fri, 4 Mar 2022 00:50:14 +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="i+6fmFLf"; dkim-atps=neutral Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id ED26B601FF for ; Fri, 4 Mar 2022 00:50:11 +0100 (CET) Received: by mail-wm1-x32d.google.com with SMTP id m42-20020a05600c3b2a00b00382ab337e14so5072012wms.3 for ; Thu, 03 Mar 2022 15:50:11 -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=BNH+tKsaAlHOijEprGYrkBllN+NwpP5o2z8hbEXXQcQ=; b=i+6fmFLfApAHcDR9iqMvwFRe4JCZ/JEoT9ghyOZct5pBavbqi3CiveZ+8OBnR3OA0a PisJRA51sWKoH5IfqSlNBuHQfYKDSjjk17Csd4TgbJ4SXOX7WKrRXOMEY7wZa8fs/ten xr4qrM5kLuWqXy2oMwvLyJr6w/PiwJQxcDDzshsmGzYu9yv4pKUMuwh4ByBFY1V/+oe2 seZTyQ/5zp+cTtmMs1Mza+7sFjv1ApQRijA9tQyTjraGcLd1A0izdWfKQ48gSb3YXVka FhXLcIstZMljwbPedkowZnwRIHsOtDfxlIFsZuNgbvW5ZzNb2P+DRBdaOjrYklCn/aTL Ivvg== 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=BNH+tKsaAlHOijEprGYrkBllN+NwpP5o2z8hbEXXQcQ=; b=BfMcm1jAZBcSAG3a0lMon4EfEVlmLGnLJG0dDatyLkqUnsJYbxpzWJWQRlZfIDlRiZ 1khojKjt63c9/hK4HWaR1mUhlPo1/8ni7pxJHXeYtCIRxXRPcbrC6kAoF+FwA+oMfSsW bPwCIO1oUeb/2nvxufOZkf43iJ7J1Ihkt2DyTFCCPKnh8OFLvowYjKfxvUprcK21telt yJ0+Mo3jswCSJJHuLXLAlBDumQiDnH9v2/5b8fiunN+3//PcHd0zpDR6brLykwcDZudd bn6qoy5kocGmQZq322c/62evcqZAKP+V/fJVdKLinEgEvsKLDDoaDmi3sQTgRIS+hhnr qYRg== X-Gm-Message-State: AOAM533s1OxanAZp2gQ5Fssi6HEPCgHPcaf5HrI8lyvWCpw9h8WWqrD7 9pJEAN7wSceA9ViyaooB0GM3bJOVf5rd9Q== X-Google-Smtp-Source: ABdhPJwj5mHOzUf/qUxGRXEMzjPOb2P9GDVygYXkZOHKPnSnBqM2EW3Cphq29AHzZa+7dPPy7jP7ag== X-Received: by 2002:a1c:f003:0:b0:37b:d5fc:5c9e with SMTP id a3-20020a1cf003000000b0037bd5fc5c9emr5620862wmb.154.1646351411440; Thu, 03 Mar 2022 15:50:11 -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 y4-20020adff144000000b001f022290737sm3079779wro.6.2022.03.03.15.50.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Mar 2022 15:50:10 -0800 (PST) From: Daniel Scally To: libcamera-devel@lists.libcamera.org Date: Thu, 3 Mar 2022 23:49:47 +0000 Message-Id: <20220303234956.1463551-1-djrscally@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v5 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 v8 [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-February/029029.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 | 40 ++++++++++++++ src/libcamera/media_device.cpp | 64 ++++++++++++++++------ src/libcamera/media_object.cpp | 15 +++++ src/libcamera/pipeline/ipu3/ipu3.cpp | 5 ++ 11 files changed, 149 insertions(+), 27 deletions(-)