From patchwork Thu Dec 1 14:51:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 17929 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 5EF8FBE08B for ; Thu, 1 Dec 2022 14:52:42 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A09CA6333F; Thu, 1 Dec 2022 15:52:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1669906361; bh=mK3xYx6rRacV5gTJ1a1UJwGK/w5uzbQ2efjn9SapdCI=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=C7uL3cifiS1n3EJUR3n9OJ6kw7ovDdjQ8Bp77DYIwaHpLcVblbW0sDfgq0OEBJENN CHqpGqBVVbaAFTUzQvsU967+sbJvHv9xqMHF6SUN70JHGMogIicZWc9byc6d0WDlbb BpxFxe7TAhU4U9SvMZS6QB8OWu7Mm93CU8qKTnYFyNoVz9frmmEFgemjUJkitJgaD8 a0quXRRIHg3OqvdHqVQFhSsfce6vJGgo5TalIaRzvlNCbKwkLBhHr7iYeu86HkYfE1 2nSU2RhKZ0h3ziSISmK+MLfXNf1+wPL+zFGq2EhrfLTqx0SEQW4IfG3oYcNZEXQLFN esUlA+hlo7NLw== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C6ACF63335 for ; Thu, 1 Dec 2022 15:52:39 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Wx7gqkCz"; dkim-atps=neutral Received: from umang.jainideasonboard.com (unknown [210.186.188.117]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 8DFDC2D9; Thu, 1 Dec 2022 15:52:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1669906359; bh=mK3xYx6rRacV5gTJ1a1UJwGK/w5uzbQ2efjn9SapdCI=; h=From:To:Cc:Subject:Date:From; b=Wx7gqkCzzBZDdy8A/mTGT/CTBJ5WX7NEX4jCoIlh2b0TVQ2KDmabSl8WDGNgFcGDU +kTI72dFzVgxCfxIq+25KQftqobgNl/22qaC1ji61cuinCaxOylxPpzufh9OrUhEa5 mmqSxCONm6jZXogq6bwyzipZVSxcByEDNHjpcF2U= To: libcamera-devel@lists.libcamera.org Date: Thu, 1 Dec 2022 22:51:28 +0800 Message-Id: <20221201145133.479794-1-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/5] ipa: rapsberrypi: Introduce auto-focus (auto-mode) 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: , X-Patchwork-Original-From: Umang Jain via libcamera-devel From: Umang Jain Reply-To: Umang Jain Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Introduce the auto-focus working in auto mode. This is a split-off from https://patchwork.libcamera.org/project/libcamera/list/?series=3174 series. The patches have been tested by me on IMX519 module with ak7375 VCM, with mainline v6.1 **kernel. (I'll add T-b tags manually on the list) Only the auto mode is tested and the state machine hasn't been. I believe that shouldn't be an issue provided there was not reviews on the auto-focus series. If someone thinks that the state machine patches (patch 5/10 to patch 10/10) of the parent should be bundled as well, please speak up (it will need more testing on my end though). That doesn't mean the state machine will not be posted / integrated - it's just that I am not confident enough on those because I myself haven't got a chance to try them inside out. Samples are available at: https://drive.google.com/drive/folders/14BKHXATZ_mZCrm27wCB5TxqTQnGmfGFq?usp=sharing ** The kernel branch comprised of unicam + bcm2835-isp driver(meant to go upstream). Along with that IMX519 v3 patches [1] and ak7375 regulator support [2] was cherry-pick manually. This is was the test setup to test this series on RPi-4-Model-B. [1]: https://lore.kernel.org/linux-media/20221116091855.00007ebd@arducam.com/ [2]: https://lore.kernel.org/linux-media/20220711144039.232196-1-y.oudjana@protonmail.com/ Jean-Michel Hautbois (4): ipa: raspberrypi: Introduce an autofocus algorithm libcamera: raspberrypi: Control the lens from pipeline ipa: raspberrypi: Control the lens position ipa: raspberrypi: Send the AF status back Umang Jain (1): ipa: raspberrypi: imx519: Instantiate auto-focus algorithm include/libcamera/ipa/raspberrypi.mojom | 1 + src/ipa/raspberrypi/controller/af_algorithm.h | 33 +++ src/ipa/raspberrypi/controller/af_status.h | 21 ++ src/ipa/raspberrypi/controller/iob/af.cpp | 212 ++++++++++++++++++ src/ipa/raspberrypi/controller/iob/af.h | 62 +++++ src/ipa/raspberrypi/data/imx519.json | 5 +- src/ipa/raspberrypi/meson.build | 1 + src/ipa/raspberrypi/raspberrypi.cpp | 45 +++- .../pipeline/raspberrypi/raspberrypi.cpp | 17 ++ 9 files changed, 394 insertions(+), 3 deletions(-) create mode 100644 src/ipa/raspberrypi/controller/af_algorithm.h create mode 100644 src/ipa/raspberrypi/controller/af_status.h create mode 100644 src/ipa/raspberrypi/controller/iob/af.cpp create mode 100644 src/ipa/raspberrypi/controller/iob/af.h