From patchwork Wed Nov 20 07:36:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harvey Yang X-Patchwork-Id: 22020 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 7ED4AC32F7 for ; Wed, 20 Nov 2024 07:38:18 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DA4D765F37; Wed, 20 Nov 2024 08:38:17 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="HX64mfd2"; dkim-atps=neutral Received: from mail-oa1-x32.google.com (mail-oa1-x32.google.com [IPv6:2001:4860:4864:20::32]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 64A8165F31 for ; Wed, 20 Nov 2024 08:38:14 +0100 (CET) Received: by mail-oa1-x32.google.com with SMTP id 586e51a60fabf-29645a83b1bso2801845fac.1 for ; Tue, 19 Nov 2024 23:38:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1732088293; x=1732693093; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=50Vwsjv8FKssIk2L0Et8YVUWhR030qaowLcXFucgh3s=; b=HX64mfd29vVuXuogNE18rPb+vMkmhMVKyUhI8lgsctUVQXNcqTHA7ebYLRKiCZUnhk thMWCRr9P0faurHXYoEnVpBe7cS0uajTRn0HeLgb4jI57zbRgb1qiEJEPLAYAD9DOjaP rFk6kG7HyhJYNyIwDArSZFe707YxVVupXcQyo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732088293; x=1732693093; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=50Vwsjv8FKssIk2L0Et8YVUWhR030qaowLcXFucgh3s=; b=jf+++jd7l7ERSRM/5vFSWS81q7Akap41TNZZY1YgtmBzfOPLfrlGSnx+xf4I2n+Uq0 hTVO3P/6yaL7ai5YFYlepX7SdZV11t97w3AR3mFYHWcPR4Kl6vI2Nw0ltONOEjnhRVpF 8L6A8Bg4eQpfHAUCb0X/a5f2y20t/i9TxXJzyBENwheu51+OTXn8Fg9CnEw+DxZ+ulsf eu1ExaipQN1QekltC1IIpkVK2/cp0vHzUc9/2NLYi7x7zFRyEKNO/Ie+e6iTFptAre3P LQB+87HW97tezuuXdxEnJLYK7EYCXMSJi+BlD8oXPFxp3/2fMXvOUWswXF6nASdHLfpG s2+A== X-Gm-Message-State: AOJu0YyNPKEiTKcYaS8xxOhdszIT0zk7wRkcVf+6MueTb2B26kIq9Fm8 62IIWdNKI1c5Ji6i9+oHSTS1V+g87M3pyUiCTQMEY8+7CEc6B7MeVkcirwH2KzomZ4UasMcEvWg = X-Google-Smtp-Source: AGHT+IHmduA68AOlEkJ3Q04v5zmj5qR/V7KC7gX/96UvldWHjSg+VxP4yBREfgssuNguVYUXmffwEw== X-Received: by 2002:a05:6871:460c:b0:295:eb96:9fd4 with SMTP id 586e51a60fabf-296d9b8174amr1806700fac.11.1732088292713; Tue, 19 Nov 2024 23:38:12 -0800 (PST) Received: from chenghaoyang-low.c.googlers.com.com (27.247.221.35.bc.googleusercontent.com. [35.221.247.27]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7f8c1c16ef0sm8943445a12.1.2024.11.19.23.38.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Nov 2024 23:38:12 -0800 (PST) From: Harvey Yang To: libcamera-devel@lists.libcamera.org Cc: Harvey Yang , Han-Lin Chen , Xing Gu , Yudhistira Erlandinata , Harvey Yang Subject: [PATCH v4 1/2] libcamera: libipa: camera_sensor: Add GalaxyCore gc05a2 sensor properties Date: Wed, 20 Nov 2024 07:36:59 +0000 Message-ID: <20241120073806.3552478-2-chenghaoyang@chromium.org> X-Mailer: git-send-email 2.47.0.338.g60cca15819-goog In-Reply-To: <20241120073806.3552478-1-chenghaoyang@chromium.org> References: <20241120073806.3552478-1-chenghaoyang@chromium.org> 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: Harvey Yang Provide the GalaxyCore gc05a2 camera sensor properties and registration with libipa for the gain code helpers. Signed-off-by: Han-Lin Chen Co-developed-by: Xing Gu Co-developed-by: Yudhistira Erlandinata Co-developed-by: Harvey Yang --- src/ipa/libipa/camera_sensor_helper.cpp | 12 ++++++++++++ src/libcamera/sensor/camera_sensor_properties.cpp | 7 +++++++ 2 files changed, 19 insertions(+) diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp index c6169bdc7..904d5c978 100644 --- a/src/ipa/libipa/camera_sensor_helper.cpp +++ b/src/ipa/libipa/camera_sensor_helper.cpp @@ -519,6 +519,18 @@ private: }; REGISTER_CAMERA_SENSOR_HELPER("ar0521", CameraSensorHelperAr0521) +class CameraSensorHelperGc05a2 : public CameraSensorHelper +{ +public: + CameraSensorHelperGc05a2() + { + blackLevel_ = 64; + gainType_ = AnalogueGainLinear; + gainConstants_.linear = { 100, 0, 0, 1024 }; + } +}; +REGISTER_CAMERA_SENSOR_HELPER("gc05a2", CameraSensorHelperGc05a2) + class CameraSensorHelperImx214 : public CameraSensorHelper { public: diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp index 6d4136d03..2f048d4a3 100644 --- a/src/libcamera/sensor/camera_sensor_properties.cpp +++ b/src/libcamera/sensor/camera_sensor_properties.cpp @@ -70,6 +70,13 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen { controls::draft::TestPatternModeColorBarsFadeToGray, 3 }, }, } }, + { "gc05a2", { + .unitCellSize = { 1120, 1120 }, + .testPatternModes = { + { controls::draft::TestPatternModeOff, 0 }, + { controls::draft::TestPatternModeColorBars, 1 }, + }, + } }, { "hi846", { .unitCellSize = { 1120, 1120 }, .testPatternModes = {