From patchwork Thu Jul 22 11:22:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 13070 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 676DEC322B for ; Thu, 22 Jul 2021 11:23:00 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B9F6568543; Thu, 22 Jul 2021 13:22:59 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="OjNLTXXh"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 762176027A for ; Thu, 22 Jul 2021 13:22:58 +0200 (CEST) Received: from perceval.ideasonboard.com (unknown [103.238.109.21]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 58D37465; Thu, 22 Jul 2021 13:22:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1626952978; bh=LNSEhVMASzZWUTpu7E3xXeRHGONI4Chew2bcS3xmiNc=; h=From:To:Cc:Subject:Date:From; b=OjNLTXXhewKcBms8s+513+4u4fOgIyhqEb+pElP2cmwTQSLt963DLTa4P9v9giekW UpYKGJVXCvH4OMayR1GAm8SOpPUNpYKoUId15jU2yDpEAW5dRQrkndRGmX0jXjAFFy EXj1/fLGR/wG3JL6Ic9HnwgUGqQRgt6kHOd6Kfsg= From: Umang Jain To: libcamera-devel@lists.libcamera.org Date: Thu, 22 Jul 2021 16:52:50 +0530 Message-Id: <20210722112250.805973-1-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2] libipa: Add CameraSensorHelper for IMX258 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" Extend the CameraSensorHelper factory with support for the IMX258 sensor found in the Nautilus Chromebook. The values are read by manually tweaking the IMX258 kernel driver. The IMX258 kernel driver hints that the sensor may be compatible with the MIPI CCS specification, as the register set matches. The values for analog gain constants are obtained by reading the register indexes, corresponding to the analog gain constants, as mentioned in MIPI CCS v1.1 specification. Signed-off-by: Umang Jain Reviewed-by: Laurent Pinchart --- v1 -> v2: - Revamp commit message. - Dave from RPi can confirm these values from the datasheet. --- src/ipa/libipa/camera_sensor_helper.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp index 709835a8..c43368df 100644 --- a/src/ipa/libipa/camera_sensor_helper.cpp +++ b/src/ipa/libipa/camera_sensor_helper.cpp @@ -295,6 +295,16 @@ public: }; REGISTER_CAMERA_SENSOR_HELPER("imx219", CameraSensorHelperImx219) +class CameraSensorHelperImx258 : public CameraSensorHelper +{ +public: + CameraSensorHelperImx258() + { + analogueGainConstants_ = { AnalogueGainLinear, 0, 512, -1, 512 }; + } +}; +REGISTER_CAMERA_SENSOR_HELPER("imx258", CameraSensorHelperImx258) + class CameraSensorHelperOv5670 : public CameraSensorHelper { public: