From patchwork Fri Nov 29 12:27:49 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: 22141 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 31AD0BE175 for ; Fri, 29 Nov 2024 12:30:45 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4CFC166032; Fri, 29 Nov 2024 13:30:43 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="mTZrR7r0"; dkim-atps=neutral Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id BA3EA6600C for ; Fri, 29 Nov 2024 13:30:40 +0100 (CET) Received: by mail-pg1-x52e.google.com with SMTP id 41be03b00d2f7-7e6cbf6cd1dso878558a12.3 for ; Fri, 29 Nov 2024 04:30:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1732883439; x=1733488239; 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=BCzlqBtgz57zUrJdOaIck/Ya9bpeZNRRZ6Hw2VUu3Hc=; b=mTZrR7r0qQvteVdrvH4Qjy/kl4cJY26JKa+8fTTyh2pmfekdImRebry6w/PBc2nWLM 4JlIycSIDdJH6izQOM8CSUUBA/WTUuWOepFUdKnt28qOB18UaPFYLhHh7wAbKQrElV8P YrnjliUk0gfO9KXZ60ZklTP0RQgbSTccBcqJ8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732883439; x=1733488239; 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=BCzlqBtgz57zUrJdOaIck/Ya9bpeZNRRZ6Hw2VUu3Hc=; b=Sz8LAB735uxJT38RWGYYgdbu/hdXAJgkNJbfxVXubwqzk0TGHXLFyqZHyalwqqDMTA vSirCy1GOFNVjHBNSW9FYJtTLiVTwKM6Pon5/DRZfvJrdDaw4IIwMJdvyMV2VuxUuTI3 td5sK4ooEUtKfwgEmgwxdXWm6JW/fnXn/xiybz4/M1qpbn9BpfnoQFOzws6ky83ck6Ki qa9f/hvlL1P3n3Xeq8hQ6THPyTxMi+YXklx9yq11QfNLg7KbiZLs0lqRodpNCTnGU80F UIw1EzkfoR/5BtomhQVDSvSZgEyV0JZjQcgLTcG5vbTn126HymbpGgMalXCn/cBKSy0m LLyQ== X-Gm-Message-State: AOJu0YyizQLJqzSC7WNCo96xldd5mH1GhO8TGK4aycZYWt275OKeC/fx gjxQjZ6irfe0rx2fhj8V7Kc05NfsQwqkqNYRO4OBF1iakEE8Rz96z1RPxS7TqV5u+SuiwAQtTRs = X-Gm-Gg: ASbGnctR0cNvydR+MHcRSKJ5zpyB56A2H7FrxQ2tpaZcBGXVDJDLlnera7tqAvU/njC wAVjkXch3XhomplmBkMJ/tITIWfmwN/YAacKpj+/aIXtM+NUGERyccx5v7dB5M5eQ8Cgwd7ILqM oTmnMlbHY9YuhDumaopsSFILklaOJqm286gwaDQbMKhjIB0lk65S2yqAcqQNG5OT9TPMheDXd/v 3i/0kRvHzdhiu2SD8fGm6EmVyIFVFwhShpHYy77JfPTEPV0+Hz6lfCzfUQRpvaoaN9Dbm8bgPPM 1tiDsawfNaiC5rrQ2LfIolCxGpoaTBO3J20ATs3lV2TAAdDu3C/oy/+i X-Google-Smtp-Source: AGHT+IHevGXNFHj11vsGp2GAkIGarA7gGAWYsgMYaKmMu1GpAOPNzcSyXcwB5LBUY5jY5TSJdnNxsA== X-Received: by 2002:a05:6a20:158a:b0:1e0:dac7:ecd6 with SMTP id adf61e73a8af0-1e0e0b2c759mr19409821637.21.1732883438964; Fri, 29 Nov 2024 04:30: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-7fc9c2d3e28sm3017469a12.17.2024.11.29.04.30.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Nov 2024 04:30:38 -0800 (PST) From: Harvey Yang To: libcamera-devel@lists.libcamera.org Cc: Harvey Yang , Han-Lin Chen , Xing Gu , Yudhistira Erlandinata , Kieran Bingham Subject: [PATCH v7 1/2] libcamera: libipa: camera_sensor: Add GalaxyCore gc05a2 sensor properties Date: Fri, 29 Nov 2024 12:27:49 +0000 Message-ID: <20241129123032.2957763-2-chenghaoyang@chromium.org> X-Mailer: git-send-email 2.47.0.338.g60cca15819-goog In-Reply-To: <20241129123032.2957763-1-chenghaoyang@chromium.org> References: <20241129123032.2957763-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" 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 12:27:50 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: 22142 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 A3EDABE175 for ; Fri, 29 Nov 2024 12:30:46 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 56CEE66038; Fri, 29 Nov 2024 13:30:46 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="cKNNtc+p"; dkim-atps=neutral Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 11A3966025 for ; Fri, 29 Nov 2024 13:30:43 +0100 (CET) Received: by mail-pg1-x534.google.com with SMTP id 41be03b00d2f7-7fc1f1748a3so1078429a12.1 for ; Fri, 29 Nov 2024 04:30:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1732883441; x=1733488241; 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=K8YaB+JYVPMHWZwLhk6hnbN4hmP1/cjWpRP55TaTqnI=; b=cKNNtc+pa2hV6Z9h/4lkUsElaI75NYb79RKU269+7XOUBo3ynCEFru0Bl7wmggcxYc XTEvBj+2pQichxl28O6We3ObtHuag+hv/Rc8hPQwNRZURn+nojgdnZK2q1Mc4GTl41Fy dwzGSWOvogmf1eJnFIdz5gtnjGskH/yS03uTY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732883441; x=1733488241; 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=K8YaB+JYVPMHWZwLhk6hnbN4hmP1/cjWpRP55TaTqnI=; b=D/N5/UOszCV6v6MIG+DoKrkYbGQDwuVU6RYS6tMlshUhtWCIEaNPodlDgjcN5H2YF+ zmJ3dV5vro+vaoZShA+LC5/T6gdhf4DSwNGYXXeD6KmWQ8S8T9/WnlS/OYvkttklpvM6 zOAsggE9wanXYJequ/mkW0S9+6ucs8oKMQCb2VaQ2vJRfYssJFodH8sGmosRuBLU3fHE Ez0nDXxDHzZLa11RoSZnYruLcBQgaOlWX44Yk+uJiNzc2AKdEU1vQ0k9I7tDUEccuvc3 PEi8YP3B6JxlaCVM6m0yWRHTmvXZdNb3eX9f6XdefvRLKtcjmByNiQfjise1pDnPXdk5 s0KA== X-Gm-Message-State: AOJu0Yz6N7lLKvhA/jghMTRaCnfTCCTj7Y/yQSvagOqrOM17K+Is3Df4 oqjmI8bx4lyhPk5jk4rv8K9UN61ZbYubBl9DRlEwnxkg4HVaMHPGbkSSTfmHX2CU1O1i97BE+I0 = X-Gm-Gg: ASbGncv3kagD4oj6pMW33KrvuEMuC/qJowfh9cGUVzGM0HdeYkAS+OpVl1Kol6gidB4 g/mVCs3NOyjf8jJG//ApU2gevX8TrSILU/MUXm1O8zUCxcW7nUMQKmZj/hnq2eoYrj29QAjAtxv 7ia670nrN0U0A3EnNsXrAlWSi9x28VTYez11b4Ki/tcH+3yiJM4VHgU4H5B7YmPWs7GPbGoRL2i s/ZcPIuWJ9y2ixXSoSRHRrRMS7FnbbyDcJora/0GjpR5cwP08YxRNUU78ALoVXUeBaedl65BkQb /u4Jcd0WJ3yzY0qxk0Tkj/ikwXVHxWsAy5ytj9r7Jpe7PJJlYcuf3/xP X-Google-Smtp-Source: AGHT+IFDoiTJMVFuMFE2wtSyfZJZ3VSgfxUI8aeNAd8uetuGiOiH9sAua/N7H+uVJK7XFNV/h7pHJA== X-Received: by 2002:a05:6a21:2d87:b0:1e0:c954:ea7c with SMTP id adf61e73a8af0-1e0e0b16a5emr16233679637.27.1732883440679; Fri, 29 Nov 2024 04:30:40 -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-7fc9c2d3e28sm3017469a12.17.2024.11.29.04.30.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Nov 2024 04:30:40 -0800 (PST) From: Harvey Yang To: libcamera-devel@lists.libcamera.org Cc: Harvey Yang , Han-Lin Chen , Xing Gu , Yudhistira Erlandinata , Kieran Bingham Subject: [PATCH v7 2/2] libcamera: libipa: camera_sensor: Add GalaxyCore gc08a3 sensor properties Date: Fri, 29 Nov 2024 12:27:50 +0000 Message-ID: <20241129123032.2957763-3-chenghaoyang@chromium.org> X-Mailer: git-send-email 2.47.0.338.g60cca15819-goog In-Reply-To: <20241129123032.2957763-1-chenghaoyang@chromium.org> References: <20241129123032.2957763-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" 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 = {