From patchwork Tue Nov 19 07:37:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harvey Yang X-Patchwork-Id: 21984 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 A13EFC326B for ; Tue, 19 Nov 2024 07:39:30 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4BE4965ED8; Tue, 19 Nov 2024 08:39:30 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="KffKaq8c"; 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 4BB3E6590A for ; Tue, 19 Nov 2024 08:39:27 +0100 (CET) Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-20c7ee8fe6bso5083385ad.2 for ; Mon, 18 Nov 2024 23:39:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1732001965; x=1732606765; 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=C3iiMNBB1m8uI4hxT5LLOMk5V5qewpefbGuGgeb6PFw=; b=KffKaq8cTfdxhGOWfw/XI5lNeWQk+8Vc7z8KN051+PclC/KhmT2LXzkOOvJMt+Ubpf 9JRgA22oNh2b+ejtXHrgUm33V5CVpQUw3uI8wT36+6n1hpE1juJRvr/0WxT37PrZm3yC DxyZOXm6f72/Ccb4dmufNqbQta57hNzf0kXvQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732001965; x=1732606765; 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=C3iiMNBB1m8uI4hxT5LLOMk5V5qewpefbGuGgeb6PFw=; b=h57l3TbwUcfvrmrF6MkiUe0DZv9hAxSw9RBk2iiGg5g0T/7utCrE9R3Ntdw6eLwdeQ yMtKEhLrWO/hOl/gpcPmJOfC3ipXspjqT9273BinR1PwK5WualG3M2wPqByhMqT+K4vu 9AVdI2feBa0C8ZQ2cCL3WTqKhjApjhpAtL+/cJldNC8+4GwK2exzGv26pOo/3w5mw3k+ rtuYx0nceiqPyOeFwuRgLO8CLH/lACgiAauCDt6kHsPjl9moFaQsJE5bORh9S++6cGTn JJIg30c4x3EYsmwXefEQZcbjFA15rMOnvcZnU5ClPt/zISO9W1IOeAD2dsbpDJvQyk+y ZPog== X-Gm-Message-State: AOJu0Yx0+9PDTvqTdivxifN69JV4/OJmnOAMlpnmLKcxeo0F986KSGqd WXVFz2XN+1Owu/EAaAPB5vwkuQlFB+c4aXE6iSVaMLHetSMyG7ELCOk/phoAw8TAgKLSNHOACJc = X-Google-Smtp-Source: AGHT+IE1t8iEgP8jAOzHDB0nq1idlVxxSMKm4jrC1j0SBbIym+MEIlu0leERHoru+Y9N0aS0UIk+nA== X-Received: by 2002:a17:903:182:b0:212:1f:e66b with SMTP id d9443c01a7336-212001feb63mr125243075ad.51.1732001965454; Mon, 18 Nov 2024 23:39:25 -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-211d0ec85fasm68548445ad.81.2024.11.18.23.39.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2024 23:39:25 -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 v3 1/2] libcamera: libipa: camera_sensor: Add MediaTek gc05a2 sensor properties Date: Tue, 19 Nov 2024 07:37:35 +0000 Message-ID: <20241119073913.500732-2-chenghaoyang@chromium.org> X-Mailer: git-send-email 2.47.0.338.g60cca15819-goog In-Reply-To: <20241119073913.500732-1-chenghaoyang@chromium.org> References: <20241119073913.500732-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 MediaTek 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 | 11 +++++++++++ src/libcamera/sensor/camera_sensor_properties.cpp | 7 +++++++ 2 files changed, 18 insertions(+) diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp index c6169bdc7..36555680b 100644 --- a/src/ipa/libipa/camera_sensor_helper.cpp +++ b/src/ipa/libipa/camera_sensor_helper.cpp @@ -519,6 +519,17 @@ private: }; REGISTER_CAMERA_SENSOR_HELPER("ar0521", CameraSensorHelperAr0521) +class CameraSensorHelperGc05a2 : public CameraSensorHelper +{ +public: + CameraSensorHelperGc05a2() + { + 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 Tue Nov 19 07:37:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harvey Yang X-Patchwork-Id: 21985 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 C7E21C326B for ; Tue, 19 Nov 2024 07:39:33 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 87A1865BB8; Tue, 19 Nov 2024 08:39:33 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="ePxo+q8W"; dkim-atps=neutral Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0D19365902 for ; Tue, 19 Nov 2024 08:39:30 +0100 (CET) Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-211c1bd70f6so37665595ad.0 for ; Mon, 18 Nov 2024 23:39:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1732001968; x=1732606768; 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=w7U/yp8TEpmXcQJ0y3/vDIBfGx3XGgZzQm+gtDwHrqY=; b=ePxo+q8WehWS+WPCED0214mC9CE+VZ33lS6qqz2GaJPDcH82PMnrOAk7uBP3J0lPB2 DWRmRkFFpnl5U5WK1a0Gn8Ari/BKHCIq69BaEavvfPuFxHuTP1dYIAQ6JpR0qIvka8j2 hHMOPWDOJVrCmp390yZy0Qu9vWwFtXjWaMqVQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732001968; x=1732606768; 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=w7U/yp8TEpmXcQJ0y3/vDIBfGx3XGgZzQm+gtDwHrqY=; b=goCp9d5qNScNyxAyyLcwz267jNSCAsakt2FtEMkOzbQWi9goOhPXflvddKk8aNo8I4 0Ws6lz6aLutrqsUByurWoXBgm4XMJyypt853x/+P6zkqH26GwuV/HvyrzfzBCBuW4C7Z FP/7hxefsfboKUNAOoTyrRzePpA8/3Q/GArOFJNPAFqBKG3wPc6CVyLAB8J+lL9E0xs9 arbjGc7qnzsBxOn7t8h8q7Xf+6pnsldaO/bPB13X8Z+30b33e+MY63T2gKk8mLa0Ksop /9Sb0LNw9oI6xce4RyC7aUQllYL1AYD3KJLnAVKtuovFY/fCU9Vdt+CD63I/4CdlvtjB PUEA== X-Gm-Message-State: AOJu0YyImY2GmC1LyMDyLRsFJ1GZaBuq9beuTL++VyhEa2KJ47mKiGr0 Y6iAtqDCZvbcvcbSlHs+2GFfWLiMlniQGqruW3terwFn4LRTABOz3ZZqJXfVaiVFMIO+dQHsMiw = X-Google-Smtp-Source: AGHT+IE/0DHDvyG1/JkQcix4NZOqHmzweW0MkakY3oVbW2FGPqaHdZBq9C4jjKUT/DAmwgiwjObz6g== X-Received: by 2002:a17:903:98f:b0:20b:db4:d913 with SMTP id d9443c01a7336-2124e8d02fbmr31176645ad.11.1732001968315; Mon, 18 Nov 2024 23:39:28 -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-211d0ec85fasm68548445ad.81.2024.11.18.23.39.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2024 23:39:27 -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 v3 2/2] libcamera: libipa: camera_sensor: Add MediaTek gc08a3 sensor properties Date: Tue, 19 Nov 2024 07:37:36 +0000 Message-ID: <20241119073913.500732-3-chenghaoyang@chromium.org> X-Mailer: git-send-email 2.47.0.338.g60cca15819-goog In-Reply-To: <20241119073913.500732-1-chenghaoyang@chromium.org> References: <20241119073913.500732-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 MediaTek 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 --- src/ipa/libipa/camera_sensor_helper.cpp | 11 +++++++++++ src/libcamera/sensor/camera_sensor_properties.cpp | 7 +++++++ 2 files changed, 18 insertions(+) diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp index 36555680b..638ff68c6 100644 --- a/src/ipa/libipa/camera_sensor_helper.cpp +++ b/src/ipa/libipa/camera_sensor_helper.cpp @@ -530,6 +530,17 @@ public: }; REGISTER_CAMERA_SENSOR_HELPER("gc05a2", CameraSensorHelperGc05a2) +class CameraSensorHelperGc08a3 : public CameraSensorHelper +{ +public: + CameraSensorHelperGc08a3() + { + 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 = {