From patchwork Thu Nov 21 08:57:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harvey Yang X-Patchwork-Id: 22054 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 93734C32FB for ; Thu, 21 Nov 2024 08:58:12 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 0E96165FB0; Thu, 21 Nov 2024 09:58:12 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="OwJeyJbn"; dkim-atps=neutral Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id CFD6965FB3 for ; Thu, 21 Nov 2024 09:58:09 +0100 (CET) Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-2124a86f4cbso5562265ad.3 for ; Thu, 21 Nov 2024 00:58:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1732179487; x=1732784287; 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=N6DWD2m3kMuwEUR6nP5EWLaEJ601hgOnv73zR3F3bKM=; b=OwJeyJbnQyvPdMAZ7xHjXbnZgtdskZXDPrkKglTs3ESxAw83pe1rVgj/9Elb/Gy0Ab nETETsMURZm6taCGDIkNJr2poMSXfsLG5pHSJmCw5nHNLT4sv+Z/weenpXq89Dilg3wE xKuAUtMsBus9gvs83FsfkDRPPFBYnobWrVdik= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732179487; x=1732784287; 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=N6DWD2m3kMuwEUR6nP5EWLaEJ601hgOnv73zR3F3bKM=; b=LOVRQnTyK5UYky0uVySUcJ5tsnu0u5NihJMNbgHi1QNP5+caIDyesHGMGayWC916uQ lRnEjkDO8Y9fYdKExpW/Z0texAg+6svhHtH57R8NUg1A2Dy0NQMfFyR01TbbZG0WSF3j ph7xjT9a8apZjU/gn5r/aC1eGphOPCrK2YwOguzHXimLdEs16VKKvkmlt6f+QeFEa9z8 oLnBaaW5CLxxiticuwhhUKGAsVAyWAOlSLqUHpWYfSdP2ANre/ic38py40+wC/5wt6ig 2Gvk1wa3mueQwJ5/tP8pDEgqZ5+SYaUumPT7zjS7v/JUES7Jai6ckYzjsNpeuNg04K9V S/Pw== X-Gm-Message-State: AOJu0YyzDD2kOxxJhm600s1kxcU+Z6DrZfN6L7jou0C4WkdXbnXQsS74 qPLpJt5mOl2cWQxlgawgrkaJ5yPsW4s3MgjHNafuJHhVqHCgxBfyTrLefDXq2meTKBOo/Xy5dxQ = X-Gm-Gg: ASbGncu1DvPJf+2WTJgHqlu095qRiR8VOvaQzX8bJuilVJrEkQMhBIQRsuQ+LhqjbLE pYltyT+3zRFdb0995GTlp66vsmcTsjD5/VDxDCbJOfE96agoAB1otusdPAb/aOmVPdpP02PPLu0 Kc7bS+t0LrisBW0JnFORXZxQs9dV9A6whrwNgLXVOC7QuW2MlTdry6B/MVwjUmsLhmRNEunvCBv xiTJEEZ69kDXY1k23sSDcL9mLaPY+Vi4naWipixtQ8lvKec1mzEDYd9t/n6lbTQN9IJjWZo8W5a M1GAPJVDQCUAetTID1oywWUy5v36W9tpX3WthWp6aRJAJ8FvDsLWlw== X-Google-Smtp-Source: AGHT+IHFvBXW6MYLvAABqmxeqx25QssJcWpN1fVGb2yM9tKRBfXJobD4FwJdn4dfoTnBPGf09ItxCQ== X-Received: by 2002:a17:902:d551:b0:211:a6d:85e8 with SMTP id d9443c01a7336-2126a42ed32mr65333065ad.39.1732179487329; Thu, 21 Nov 2024 00:58:07 -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 d9443c01a7336-212882d1c66sm8734775ad.138.2024.11.21.00.58.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Nov 2024 00:58:06 -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 v5 1/2] libcamera: libipa: camera_sensor: Add GalaxyCore gc05a2 sensor properties Date: Thu, 21 Nov 2024 08:57:16 +0000 Message-ID: <20241121085800.3208123-2-chenghaoyang@chromium.org> X-Mailer: git-send-email 2.47.0.338.g60cca15819-goog In-Reply-To: <20241121085800.3208123-1-chenghaoyang@chromium.org> References: <20241121085800.3208123-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 Reviewed-by: Kieran Bingham --- src/ipa/libipa/camera_sensor_helper.cpp | 13 +++++++++++++ src/libcamera/sensor/camera_sensor_properties.cpp | 7 +++++++ 2 files changed, 20 insertions(+) diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp index c6169bdc7..3067d9bc1 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 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 = { From patchwork Thu Nov 21 08:57:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harvey Yang X-Patchwork-Id: 22055 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 3DA51C32FD for ; Thu, 21 Nov 2024 08:58:15 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B927965FB8; Thu, 21 Nov 2024 09:58:14 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="DP+cIkkW"; dkim-atps=neutral Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id F017165FB0 for ; Thu, 21 Nov 2024 09:58:10 +0100 (CET) Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-21200c749bfso6098265ad.1 for ; Thu, 21 Nov 2024 00:58:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1732179489; x=1732784289; 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=tgGqSxJF2d05q7ZsAxT/8t/I0WJ1ujmJl/I2wnjjeuQ=; b=DP+cIkkW3QHPHuKVK1DphwuCCtEhRi1gOjNtD/0lwPx4fysNlqsEJZAllKR/diIuIV djFYAqvkTLtSM+48R8eMXcIF74qIFiaKh73Xz0b1CXEXPyc8NGKTERU0eBpgCr3TWhUo gbIXTyHcxDuMGbxTlnLRzIWciat63di/DazvA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732179489; x=1732784289; 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=tgGqSxJF2d05q7ZsAxT/8t/I0WJ1ujmJl/I2wnjjeuQ=; b=Q2kiHyQS6NptVj7Ipz3kr0898TlVHvJeMnmJFIWLadHcyAT1z4M+EgFky41T9DmJWr Lg7D8bI4729r0/i2Y2gYVAc/mfBcGWXS79eF6IlhkthSy/a3DoIxcHhiCU+qEHDV9jBZ EsWdFwjocEzuNvAw6ghiR2Wg5uiSpnvooMIbgFeTq+gVTE1qvJLBIKg2roQ4Ib0x0b5u olUJyzhi7ETYHW1wcM0lMVY+yfCULPG7kZneblP3YhZsswI1zkdRkmd2dM918yVYkZYc FtTKvu4uCL51Ye0RHIXrhDI5C1WT11+SVxlsh70tCMiGaZADXGP7jYHZDJpUxncHr40R 2w8Q== X-Gm-Message-State: AOJu0YwumPDmeskeNkqKfhbg+QgumBNf0/zJaZU1YRAX2HFzJsWEuCxs FNySiJH50QsW4iYe0OsZoomurG5hy1tvcRAUIEjD9DP6eZSVRb6FD51QPho0Xcs+q98/igGrcs4 = X-Google-Smtp-Source: AGHT+IHiLnjEzBs3ZhvLTrJxEdhpaEyEEIdiE/DEUyxpGrYVRKGReouGEVa9Tg5Q20/O/BIVyJS4wA== X-Received: by 2002:a17:903:22c8:b0:212:12a2:4011 with SMTP id d9443c01a7336-2126c15b295mr65259035ad.27.1732179489081; Thu, 21 Nov 2024 00:58:09 -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 d9443c01a7336-212882d1c66sm8734775ad.138.2024.11.21.00.58.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Nov 2024 00:58:08 -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 v5 2/2] libcamera: libipa: camera_sensor: Add GalaxyCore gc08a3 sensor properties Date: Thu, 21 Nov 2024 08:57:17 +0000 Message-ID: <20241121085800.3208123-3-chenghaoyang@chromium.org> X-Mailer: git-send-email 2.47.0.338.g60cca15819-goog In-Reply-To: <20241121085800.3208123-1-chenghaoyang@chromium.org> References: <20241121085800.3208123-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 Co-developed-by: Yudhistira Erlandinata Co-developed-by: Harvey Yang Reviewed-by: Kieran Bingham --- src/ipa/libipa/camera_sensor_helper.cpp | 13 +++++++++++++ src/libcamera/sensor/camera_sensor_properties.cpp | 7 +++++++ 2 files changed, 20 insertions(+) diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp index 3067d9bc1..e2da07723 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 2f048d4a3..a15004341 100644 --- a/src/libcamera/sensor/camera_sensor_properties.cpp +++ b/src/libcamera/sensor/camera_sensor_properties.cpp @@ -77,6 +77,13 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen { controls::draft::TestPatternModeColorBars, 1 }, }, } }, + { "gc08a3", { + .unitCellSize = { 1120, 1120 }, + .testPatternModes = { + { controls::draft::TestPatternModeOff, 0 }, + { controls::draft::TestPatternModeColorBars, 2 }, + }, + } }, { "hi846", { .unitCellSize = { 1120, 1120 }, .testPatternModes = {