From patchwork Fri Nov 29 05:52:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harvey Yang X-Patchwork-Id: 22134 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 B5E94C31E9 for ; Fri, 29 Nov 2024 05:53:45 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 7393A65FFA; Fri, 29 Nov 2024 06:53:45 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="gjmVRSmb"; dkim-atps=neutral Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5FB4965FE2 for ; Fri, 29 Nov 2024 06:53:41 +0100 (CET) Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-724d8422f37so1267627b3a.2 for ; Thu, 28 Nov 2024 21:53:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1732859619; x=1733464419; 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=SxKMVpxfI6WGI4nwOpzHjrREB0HhKaGiUooWehNfeSs=; b=gjmVRSmbjzcs11/fgkM8QEtw6lAYDc1s2xUSaTznLpWwvb5yPLv5kr77vafUEt7O7I 7RDzDeVvOt0eXZuY8gBKtE3Ec/Z0BOlgBiG6SO957uJsi7osOMjL1wQaKmtUZmpPTLa8 zbTMmsjFtL1AAsgLi2k3I1GlM2/3WU6gdb4V0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732859619; x=1733464419; 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=SxKMVpxfI6WGI4nwOpzHjrREB0HhKaGiUooWehNfeSs=; b=QLz3oWcGIrQ2xOmExLq2/PmIAu0Efm3XhauWJ/kYcBzeUgM+NacOZZNIbMyWB1Foxz 2DblWxEKq7AOttnVe6CSindR0a2kWgNDW9V4t75ap1JZvtctogmnoLySK/srrNWAdVWC wi7GLMNlqsLS8qwA8W90UL3/V6S3bMRLpC4aJI7oHIRJGYi2J3gAzTlWRKmaFiUY69qz q9CkvT8WJShIchezLoAtdDnA4pc1Cv7RInGKEka8qityaFMb53X+K0BsiV0nICbwpwTZ vHKkLfDtkY/P+OfHx8lJWLEUnJzh0y4YkL2p/HkxC+mz9gpGGtQe57c8+fAQsnip8zjO DD+Q== X-Gm-Message-State: AOJu0YzGHtiKQpfPKjnu+G8fjllj68SeUmgrVCosLy+hTZrBYN2RiRsU o0Keiln+FsgPuK67N0olNd5gPtlIHvhDQah0m85OGzOdRIzOwc6kmxHJ/CDgNH/wYszNbNDB54Q stQ== X-Gm-Gg: ASbGncubFGN+NPE8b301QgZ2JH+gQOWF49h4czWTqOdP7XtxhSX0EPMySmUkjCeni2e e2jqcv9TvSvGYRj8LvQZP0+JDtsMXyS8KNaZs7R03Z/bFtknH1fGzvB+wOemuyjjpOWsTkUWNXV ov9FrUpk18tGUlieUcz4w4p+bXxyTWrujaYXrB8zKEY9GUCXj1lrssf6NgpY/FjVf8Kp/eq9W49 i57682LOfQ5J2Bq8HEl9rBHdMNZSedaosEaAjBoNWXNH4hA5QkDRHs7Pkwmqmzf5u2pVN4ubOpR 2oL0WGOYGL9VwFpQX1Jxtb8F5iYuYGELZw0iVhKEsHzrYCiT5OJsIQ7s X-Google-Smtp-Source: AGHT+IFg4iufyXyeEDrLREP48+M2FY0/gQ5LJsjaay3RXCbpksr+ZUfvb/32yUWvilJRdvzBTX8g/Q== X-Received: by 2002:a05:6a00:4b11:b0:71e:573f:5673 with SMTP id d2e1a72fcca58-7253005dd87mr12885131b3a.15.1732859618785; Thu, 28 Nov 2024 21:53:38 -0800 (PST) Received: from chenghaoyang-low.c.googlers.com.com (112.212.229.35.bc.googleusercontent.com. [35.229.212.112]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7fc9c2e537fsm2029676a12.24.2024.11.28.21.53.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Nov 2024 21:53:38 -0800 (PST) From: Harvey Yang To: libcamera-devel@lists.libcamera.org Cc: Harvey Yang , Han-Lin Chen , Xing Gu , Yudhistira Erlandinata , Harvey Yang , Kieran Bingham Subject: [PATCH v6 2/2] libcamera: libipa: camera_sensor: Add GalaxyCore gc08a3 sensor properties Date: Fri, 29 Nov 2024 05:52:19 +0000 Message-ID: <20241129055331.2490988-3-chenghaoyang@chromium.org> X-Mailer: git-send-email 2.47.0.338.g60cca15819-goog In-Reply-To: <20241129055331.2490988-1-chenghaoyang@chromium.org> References: <20241129055331.2490988-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 gc08a3 camera sensor properties and registration with libipa for the gain code helpers. Signed-off-by: Han-Lin Chen Co-developed-by: Xing Gu Signed-off-by: Xing Gu Co-developed-by: Yudhistira Erlandinata Signed-off-by: Yudhistira Erlandinata Co-developed-by: Harvey Yang Signed-off-by: Harvey Yang Reviewed-by: Kieran Bingham --- src/ipa/libipa/camera_sensor_helper.cpp | 13 +++++++++++++ src/libcamera/sensor/camera_sensor_properties.cpp | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp index 9fb55bcfa..a76e5e754 100644 --- a/src/ipa/libipa/camera_sensor_helper.cpp +++ b/src/ipa/libipa/camera_sensor_helper.cpp @@ -532,6 +532,19 @@ public: }; REGISTER_CAMERA_SENSOR_HELPER("gc05a2", CameraSensorHelperGc05a2) +class CameraSensorHelperGc08a3 : public CameraSensorHelper +{ +public: + CameraSensorHelperGc08a3() + { + /* From datasheet: 64 at 10bits. */ + blackLevel_ = 4096; + gainType_ = AnalogueGainLinear; + gainConstants_.linear = { 100, 0, 0, 1024 }; + } +}; +REGISTER_CAMERA_SENSOR_HELPER("gc08a3", CameraSensorHelperGc08a3) + class CameraSensorHelperImx214 : public CameraSensorHelper { public: diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp index 73c47b9a1..2b06c5a1a 100644 --- a/src/libcamera/sensor/camera_sensor_properties.cpp +++ b/src/libcamera/sensor/camera_sensor_properties.cpp @@ -119,6 +119,19 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen .hblankDelay = 2 }, } }, + { "gc08a3", { + .unitCellSize = { 1120, 1120 }, + .testPatternModes = { + { controls::draft::TestPatternModeOff, 0 }, + { controls::draft::TestPatternModeColorBars, 2 }, + }, + .sensorDelays = { + .exposureDelay = 2, + .gainDelay = 2, + .vblankDelay = 2, + .hblankDelay = 2 + }, + } }, { "hi846", { .unitCellSize = { 1120, 1120 }, .testPatternModes = {