From patchwork Fri Nov 29 05:52:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cheng-Hao Yang X-Patchwork-Id: 22133 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 1254CC31E9 for ; Fri, 29 Nov 2024 05:53:43 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CF8D465FE9; Fri, 29 Nov 2024 06:53:40 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="HCKu5scy"; dkim-atps=neutral Received: from mail-oi1-x230.google.com (mail-oi1-x230.google.com [IPv6:2607:f8b0:4864:20::230]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8D07165FE2 for ; Fri, 29 Nov 2024 06:53:38 +0100 (CET) Received: by mail-oi1-x230.google.com with SMTP id 5614622812f47-3ea68fc1a7cso643089b6e.0 for ; Thu, 28 Nov 2024 21:53:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1732859617; x=1733464417; 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=trMwrlEwaXahNOC8jOa41wck1eBNwIwqGHQXCuJvaxQ=; b=HCKu5scyw02zZsu3YKlP3E1QGMGlPdoqZS/8a2Fi1V3rhVutgzZWT+ekdKffc4T9Wk mzGyzfoFZLp4qvodrv6mku577HOGBcwIDpnlQZqCCrjtYS9flcjuTp5cP1X4T83lcjry 21z8Nqebz1+c/OPGScNa/vioTSe+jD9T6+k28= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732859617; x=1733464417; 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=trMwrlEwaXahNOC8jOa41wck1eBNwIwqGHQXCuJvaxQ=; b=KlxEpVFepKzFJrr9qf+selPW71JqVvZTDD3N1aZyKqm95ibu440bsN0Ej8AHxKVvZW yXwSLq4mvL80GPUh8J9hwGdr7XbPrujm/Rct2wilfW/mdF6WQtHLRbov8osm/RBBWOdM yQ/RIVAt4pO2duwQ9YPyiNKeLhCQ+0X1eScbJ03EApk4R+dhbNtfCRM7HoBUP0Er/xgy TJZaucGlA0Rj2pQ+XsSOJOQo8iYc/TdfpYSA4PIu/HkC9UHzgZEZvhXnVbTO5DRGVHhK v38A2mcYzCrVuESFqVpw3J9AT/esQg6Y90Q2jYGkB9OSnsIamVPQaPjx08LBERlyRbWV aLsg== X-Gm-Message-State: AOJu0YztsyEH2eoMPrhc0HQ0Muv5siQIk5LCG3H0XKrLIPbeahV3KpCT Hmt9yFvL1xeush/ezdGoHq5m3p8UMAiH54JlmSWTC8FK+3B2QD0mOirT+2X8Cyf4C/Q1ITk0+A4 = X-Gm-Gg: ASbGncsn2w/EjdXWXu7kVSyw+rWoaEfPPuxuz2i+C9jn+66vHJIqBCRUJPx9qTmpi98 AEzjHTOiEJFhd64P+ZBkm1WaGutCIxGgMGNeJycm6zWMOlsn+nJ266n4Bd6osbfEwOxCeBHR9j4 kkr+hVWJGoJqlIjxMk2/eq3r4mM0oYo2xHZw77PHIielq1RJy64WGr82O/iC0Iq3LNJmLbyfj/0 q8obb3cVf85/JshzKfdDW4l2BlFol6iSdTs/VV59BSGf9mTzA1D4zwNGk34ohQKdwiQbCCmhcPO ROgo0U70KcDcm32xiuUYpN6Hwn6nLFfQQiSnnKTKgIptcBZE0zv2AGnr X-Google-Smtp-Source: AGHT+IGn2qfGUYAH+t8z6PhbGyJzFyS+vn6QMceRw6v3aJrsXq+kjU7ayTWJF2/6m9+eErCJBhhihw== X-Received: by 2002:a05:6808:1452:b0:3ea:4aad:a877 with SMTP id 5614622812f47-3ea6dda6c24mr8073652b6e.43.1732859616924; Thu, 28 Nov 2024 21:53:36 -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.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Nov 2024 21:53:36 -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 1/2] libcamera: libipa: camera_sensor: Add GalaxyCore gc05a2 sensor properties Date: Fri, 29 Nov 2024 05:52:18 +0000 Message-ID: <20241129055331.2490988-2-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 gc05a2 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 a0a5437aa..9fb55bcfa 100644 --- a/src/ipa/libipa/camera_sensor_helper.cpp +++ b/src/ipa/libipa/camera_sensor_helper.cpp @@ -519,6 +519,19 @@ private: }; REGISTER_CAMERA_SENSOR_HELPER("ar0521", CameraSensorHelperAr0521) +class CameraSensorHelperGc05a2 : public CameraSensorHelper +{ +public: + CameraSensorHelperGc05a2() + { + /* From datasheet: 64 at 10bits. */ + blackLevel_ = 4096; + 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 3fe18c164..73c47b9a1 100644 --- a/src/libcamera/sensor/camera_sensor_properties.cpp +++ b/src/libcamera/sensor/camera_sensor_properties.cpp @@ -106,6 +106,19 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen }, .sensorDelays = { }, } }, + { "gc05a2", { + .unitCellSize = { 1120, 1120 }, + .testPatternModes = { + { controls::draft::TestPatternModeOff, 0 }, + { controls::draft::TestPatternModeColorBars, 1 }, + }, + .sensorDelays = { + .exposureDelay = 2, + .gainDelay = 2, + .vblankDelay = 2, + .hblankDelay = 2 + }, + } }, { "hi846", { .unitCellSize = { 1120, 1120 }, .testPatternModes = { 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: Cheng-Hao 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 = {