From patchwork Tue Nov 30 21:34:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scally X-Patchwork-Id: 14912 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 97EF2BF415 for ; Tue, 30 Nov 2021 21:34:35 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id EBD2C60726; Tue, 30 Nov 2021 22:34:33 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="nVM5R1nC"; dkim-atps=neutral Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id BB9A3605C4 for ; Tue, 30 Nov 2021 22:34:31 +0100 (CET) Received: by mail-wr1-x42c.google.com with SMTP id a18so47508204wrn.6 for ; Tue, 30 Nov 2021 13:34:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references; bh=kTvLjJS9WG2McZQABpbwOF0yPio+OC/y+/XehGfEp3Q=; b=nVM5R1nCICdkvo2rr7pAS1T5vyvQS+Fdt5w1IB2K5PiGnxKNg5sQfkp9Gj8T/cU2h9 hZ3EtD7N/i9rQoLF92KnYkYWbXgGRbrkHbOQqezSSCWFE13N1WRDHZCQdyo48JOk2uSs U3wwDlIB5jDVb+W6megTE0wSsov5bCkftYeARVZ73FwFuuMcWKwvjE7H6YUN4EsTatlz Kb2vL7gvgjjCtruTh4stuJ09KAPrDKmMpByUmQNRfU9NEGWdv6TYwqMukxzCa0j+4TsH DQygtkvuW/8fxpV+5CDnTxsrqQ3sRes9Fwl265rdXwp9DXk0r0BdyUZ/54legrWhLNgk Gojw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=kTvLjJS9WG2McZQABpbwOF0yPio+OC/y+/XehGfEp3Q=; b=nzEadzIy0Mgr/TUJawLpVt4oNKXVSCAO8mVAn699LzY99stHZ9jvMSxiXAAegQelxu f9+D3wu0k1ofz+X6ENmcnwfkdVsoyX0Im9AQqr8sz0XqB2/kGBr3JJW7JQeiHBBpFd03 UwMkpmo5pUfjKYndqet8TcKXCEFW6lr6ZrIgBgcNxhoLRdUsbjoww3fb2T1OekLSvHMn cIvS3kqfzSXVNxYbfQnIvjsODFPhCkZQd9Dh+wd3qasdrslwYLj//av14QHWxRjlYdnK dOndZ6tZPSMr3ICUDV2qIvG5z7GIGjx7q0VQyV1PrhT7dGrma8jaceXOOwpZY74N7uev MOJQ== X-Gm-Message-State: AOAM5331L5EzNa8ifgBLZarZP/cpj1pzk6tHtdb8pBArrZ8apXTNOmGM 0Q3XXpE61actKfOIN6pHaB+UrkxNbrw= X-Google-Smtp-Source: ABdhPJx1cVRJ4aVopqo4YSBQ9Ltib3Cj3YKgUNmGC5Zj787b4wgXpfYPLVARbALCzTbHM0vMMb9B+w== X-Received: by 2002:adf:8b0e:: with SMTP id n14mr1601818wra.281.1638308071529; Tue, 30 Nov 2021 13:34:31 -0800 (PST) Received: from localhost.localdomain (cpc141996-chfd3-2-0-cust928.12-3.cable.virginm.net. [86.13.91.161]) by smtp.gmail.com with ESMTPSA id p13sm3519642wmi.0.2021.11.30.13.34.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 13:34:31 -0800 (PST) From: Daniel Scally To: libcamera-devel@lists.libcamera.org Date: Tue, 30 Nov 2021 21:34:10 +0000 Message-Id: <20211130213411.20149-2-djrscally@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211130213411.20149-1-djrscally@gmail.com> References: <20211130213411.20149-1-djrscally@gmail.com> Subject: [libcamera-devel] [PATCH 1/2] libipa: Add CameraSensorHelper for ov2680 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" Add a CameraSensorHelperOv2680 class. The OV2680 is found in concert with an IPU3 on the Lenovo Miix 510. The constants set are a bit of a guess, as the datasheet doesn't document the gain control field any further than giving its width in bits, but the default is 0x10 so we assume that to be 1x gain. Signed-off-by: Daniel Scally --- src/ipa/libipa/camera_sensor_helper.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp index 0b0eb503..fd951505 100644 --- a/src/ipa/libipa/camera_sensor_helper.cpp +++ b/src/ipa/libipa/camera_sensor_helper.cpp @@ -305,6 +305,16 @@ public: }; REGISTER_CAMERA_SENSOR_HELPER("imx258", CameraSensorHelperImx258) +class CameraSensorHelperOv2680 : public CameraSensorHelper +{ +public: + CameraSensorHelperOv2680() + { + analogueGainConstants_ = { AnalogueGainLinear, 1, 0, 0, 16 }; + } +}; +REGISTER_CAMERA_SENSOR_HELPER("ov2680", CameraSensorHelperOv2680) + class CameraSensorHelperOv5670 : public CameraSensorHelper { public: From patchwork Tue Nov 30 21:34:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scally X-Patchwork-Id: 14913 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 372A6BF415 for ; Tue, 30 Nov 2021 21:34:38 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E831860721; Tue, 30 Nov 2021 22:34:37 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="TZfFxUCm"; dkim-atps=neutral Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8291760718 for ; Tue, 30 Nov 2021 22:34:32 +0100 (CET) Received: by mail-wr1-x42d.google.com with SMTP id c4so47416992wrd.9 for ; Tue, 30 Nov 2021 13:34:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references; bh=E/CEtXGNiOknSi/eDT4C/NHTK+aDkzFI6byRu7enb84=; b=TZfFxUCmE21Oz8gnEdwoeHmISCE+Shzy1CAvX7fs6RlbHpk21U7ltoohxgYOjis367 ejPgzhG+7aBYSHWwIdNuoTVnqU8ZafdO656J2zZmoqKxACBEgUdbXj/6kM36TMUwdFo2 Wq+iAfh/XG/R4qszkWEsLSGK/OnPZ63q5xvs7pPcpHhYp2Hi5r1drdBb6k+R9IyaF7Sy Uf1kAtjKnAHAoafPCo/TvCSSdaQS+GWhUmSc6D2Z8d0iUctUfyLDD89ORYU95nxsZRwg 1kCI8h0kL3/DuVWgxiJ8Eiw9JrCtBZuob7BV5xP582htFrP8SByriJfa+JL34e7XAniH Ff2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=E/CEtXGNiOknSi/eDT4C/NHTK+aDkzFI6byRu7enb84=; b=bJ2XKqfkN+hVF8MrHrqsFfundeTifJ1husACh1nqtSrda+4dasG9bHDV9lS/WrxxvC 7zntk5HupUYMFGkpnFIswUJ/ZCss7qMYnL68nrhkYtrv7eQ7mG05ebId2E5Jd/pMOYfv kYtpdCiYQ00Gx+q2olxt0ujxT/2FZh6bZH9U5npRp/d0nTUpp5Yn4dtUYu84nyPydZVc M2TEFR5Rw4MmaOj1j3k9AhAgBKzdkQHWdWZn+cfGfgDKm4USAtRwKay90AQNgldAmA/u Z3RiWulToqBuFRn6OWfJYBh04jv4w4emJWYjyDnW94nAiNTtBHamMgx7ec3rI/j8m+Tx DDQw== X-Gm-Message-State: AOAM533JFIdm8VoSpVl7bO1h97/Ca4kBVWlwQBAYJvdBcUBjPGKz9au9 J28dJI2+hLqwSninzlq3oXxkCQwAEUI= X-Google-Smtp-Source: ABdhPJxE0tneDbKOOEl1WCi6jLQXVhwSbf1RSndkGqc/lJ3SZkVGx7BR309MNi4AadEw1rSxXgonJA== X-Received: by 2002:adf:fa4b:: with SMTP id y11mr1753896wrr.460.1638308072342; Tue, 30 Nov 2021 13:34:32 -0800 (PST) Received: from localhost.localdomain (cpc141996-chfd3-2-0-cust928.12-3.cable.virginm.net. [86.13.91.161]) by smtp.gmail.com with ESMTPSA id p13sm3519642wmi.0.2021.11.30.13.34.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 13:34:32 -0800 (PST) From: Daniel Scally To: libcamera-devel@lists.libcamera.org Date: Tue, 30 Nov 2021 21:34:11 +0000 Message-Id: <20211130213411.20149-3-djrscally@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211130213411.20149-1-djrscally@gmail.com> References: <20211130213411.20149-1-djrscally@gmail.com> Subject: [libcamera-devel] [PATCH 2/2] libcamera: Add OV2680 sensor properties 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" Add camera sensor properties for the OV2680 sensor - this is the user facing camera on the Lenovo Miix 510. Signed-off-by: Daniel Scally --- src/libcamera/camera_sensor_properties.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/libcamera/camera_sensor_properties.cpp b/src/libcamera/camera_sensor_properties.cpp index 48305ac4..a97552ce 100644 --- a/src/libcamera/camera_sensor_properties.cpp +++ b/src/libcamera/camera_sensor_properties.cpp @@ -90,6 +90,19 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen { controls::draft::TestPatternModePn9, 4 }, }, } }, + { "ov2680", { + .unitCellSize = { 1750, 1750 }, + .testPatternModes = { + { controls::draft::TestPatternModeOff, 0 }, + { controls::draft::TestPatternModeColorBars, 1 }, + /* + * No corresponding test pattern mode for: + * 2. "Random Data" + * 3. "Square" + * 4. "Black Image + */ + }, + } }, { "ov5647", { .unitCellSize = { 1400, 1400 }, .testPatternModes = {},