From patchwork Fri Apr 26 13:25:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 19962 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 086DFBE08B for ; Fri, 26 Apr 2024 13:25:29 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 9109B6341B; Fri, 26 Apr 2024 15:25:28 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="dUYFvkUX"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A62A961A9B for ; Fri, 26 Apr 2024 15:25:25 +0200 (CEST) Received: from fedora.local (unknown [103.251.226.119]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B0BDCD7E; Fri, 26 Apr 2024 15:24:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1714137872; bh=2TNOfJyyaEGsLn760PXMR1nVjxvW/PW1nrboV868MwY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dUYFvkUXP8MNVukA7elLt6cFV5dsuSOQp3o46pt0ZbIXgC30F+oJ9NUjmWfUlBWoE RYs+axdjgln/4cQOU9gx7EBEshwoJUkhMN/wGZtA3/rmTY52G7mz5bcaol8bn2AGEp dhmjkqkm3fGsqV9sdB2OqW/RUbXf0DvdRtWBBMos= From: Umang Jain To: libcamera-devel@lists.libcamera.org Cc: Kieran Bingham , Laurent Pinchart , Umang Jain Subject: [PATCH v2 1/2] libcamera: libipa: camera_sensor: Add Sony IMX283 sensor properties Date: Fri, 26 Apr 2024 18:55:15 +0530 Message-ID: <20240426132516.11085-2-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240426132516.11085-1-umang.jain@ideasonboard.com> References: <20240426132516.11085-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 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" From: Kieran Bingham Provide the IMX283 camera sensor properties and registration with libipa for the gain code helpers. The test patterns exposed by the IMX283 do not map well to the current set of test pattern controls supplied by libcamera. These are left inentionally unimplemented. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Umang Jain Reviewed-by: Stefan Klug Reviewed-by: Jacopo Mondi --- src/ipa/libipa/camera_sensor_helper.cpp | 11 +++++++++++ src/libcamera/sensor/camera_sensor_properties.cpp | 4 ++++ 2 files changed, 15 insertions(+) diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp index ce29f423..f70d898f 100644 --- a/src/ipa/libipa/camera_sensor_helper.cpp +++ b/src/ipa/libipa/camera_sensor_helper.cpp @@ -417,6 +417,17 @@ public: }; REGISTER_CAMERA_SENSOR_HELPER("imx258", CameraSensorHelperImx258) +class CameraSensorHelperImx283 : public CameraSensorHelper +{ +public: + CameraSensorHelperImx283() + { + gainType_ = AnalogueGainLinear; + gainConstants_.linear = { 0, 2048, -1, 2048 }; + } +}; +REGISTER_CAMERA_SENSOR_HELPER("imx283", CameraSensorHelperImx283) + class CameraSensorHelperImx290 : public CameraSensorHelper { public: diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp index 6e28b09e..4eabbbda 100644 --- a/src/libcamera/sensor/camera_sensor_properties.cpp +++ b/src/libcamera/sensor/camera_sensor_properties.cpp @@ -99,6 +99,10 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen { controls::draft::TestPatternModePn9, 4 }, }, } }, + { "imx283", { + .unitCellSize = { 2400, 2400 }, + .testPatternModes = {}, + } }, { "imx290", { .unitCellSize = { 2900, 2900 }, .testPatternModes = {}, From patchwork Fri Apr 26 13:25:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 19963 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 B4C36C32A2 for ; Fri, 26 Apr 2024 13:25:30 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 81FA46341C; Fri, 26 Apr 2024 15:25:29 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="v8v0LV2U"; dkim-atps=neutral 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 D9F4F633ED for ; Fri, 26 Apr 2024 15:25:26 +0200 (CEST) Received: from fedora.local (unknown [103.251.226.119]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 8DF47CC8; Fri, 26 Apr 2024 15:24:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1714137873; bh=TdHfMff+GcsZM9+Y7fLjqLDfV2EkU8gZ30Yc/7y5j6c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=v8v0LV2U9z7BCID8QEPALbe/LA5nvWUng7vI40aSNvDFHttIDqKWRbmExzl6sD3TN fwNItcpg5YUbpF9n31BR3IuW2olHAg4rtHeCFT/dIsRWyUI1cqI7/yJVFsiURLaX3n /5YYIbKIhgGFqeJ1cp0PnmyN9z0TK24KKb/oljsU= From: Umang Jain To: libcamera-devel@lists.libcamera.org Cc: Kieran Bingham , Umang Jain Subject: [PATCH v2 2/2] libcamera: libipa: camera_sensor: Add Sony IMX335 sensor properties Date: Fri, 26 Apr 2024 18:55:16 +0530 Message-ID: <20240426132516.11085-3-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240426132516.11085-1-umang.jain@ideasonboard.com> References: <20240426132516.11085-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 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" From: Kieran Bingham Provide the Sony IMX335 camera sensor properties and registration with libipa for the gain code helpers. The test patterns exposed by the IMX335 do not map well to the current set of test pattern controls supplied by libcamera. These are left inentionally unimplemented. Signed-off-by: Kieran Bingham Signed-off-by: Umang Jain Reviewed-by: Stefan Klug Reviewed-by: Jacopo Mondi Reviewed-by: Laurent Pinchart --- src/ipa/libipa/camera_sensor_helper.cpp | 11 +++++++++++ src/libcamera/sensor/camera_sensor_properties.cpp | 4 ++++ 2 files changed, 15 insertions(+) diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp index f70d898f..84d52d10 100644 --- a/src/ipa/libipa/camera_sensor_helper.cpp +++ b/src/ipa/libipa/camera_sensor_helper.cpp @@ -455,6 +455,17 @@ class CameraSensorHelperImx327 : public CameraSensorHelperImx290 }; REGISTER_CAMERA_SENSOR_HELPER("imx327", CameraSensorHelperImx327) +class CameraSensorHelperImx335 : public CameraSensorHelper +{ +public: + CameraSensorHelperImx335() + { + gainType_ = AnalogueGainExponential; + gainConstants_.exp = { 1.0, expGainDb(0.3) }; + } +}; +REGISTER_CAMERA_SENSOR_HELPER("imx335", CameraSensorHelperImx335) + class CameraSensorHelperImx477 : public CameraSensorHelper { public: diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp index 4eabbbda..895bf967 100644 --- a/src/libcamera/sensor/camera_sensor_properties.cpp +++ b/src/libcamera/sensor/camera_sensor_properties.cpp @@ -115,6 +115,10 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen .unitCellSize = { 2900, 2900 }, .testPatternModes = {}, } }, + { "imx335", { + .unitCellSize = { 2000, 2000 }, + .testPatternModes = {}, + } }, { "imx477", { .unitCellSize = { 1550, 1550 }, .testPatternModes = {},