From patchwork Thu Sep 2 06:44:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kepplinger X-Patchwork-Id: 13601 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 ADD2ABDC71 for ; Thu, 2 Sep 2021 06:45:11 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 42B636916A; Thu, 2 Sep 2021 08:45:11 +0200 (CEST) Received: from comms.puri.sm (comms.puri.sm [159.203.221.185]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9509360503 for ; Thu, 2 Sep 2021 08:45:09 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by comms.puri.sm (Postfix) with ESMTP id 60AC7E0165; Wed, 1 Sep 2021 23:44:37 -0700 (PDT) Received: from comms.puri.sm ([127.0.0.1]) by localhost (comms.puri.sm [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id a_7BjaSdi6SM; Wed, 1 Sep 2021 23:44:32 -0700 (PDT) From: Martin Kepplinger To: laurent.pinchart@ideasonboard.com, libcamera-devel@lists.libcamera.org Date: Thu, 2 Sep 2021 08:44:16 +0200 Message-Id: <20210902064416.6342-1-martin.kepplinger@puri.sm> Subject: [libcamera-devel] [PATCH] libcamera: add hi846 camera 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: , Cc: Martin Kepplinger Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Add camera sensor properties for the Hynix hi846 sensor. The part is also called YACG4D0C9SHC and a datasheet can be found at https://product.skhynix.com/products/cis/cis.go This is the selfie camera in the Librem 5 phone. Signed-off-by: Martin Kepplinger Reviewed-by: Laurent Pinchart --- Note that the driver is not yet merged into the mainline but being reviewed: https://lore.kernel.org/linux-media/20210831134344.1673318-1-martin.kepplinger@puri.sm/ libcamera doesn't warn about anything when using the camera. `cam` streams and qcam shows a (non-debayered) image. thanks, martin src/libcamera/camera_sensor_properties.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/libcamera/camera_sensor_properties.cpp b/src/libcamera/camera_sensor_properties.cpp index 4ee45e72..39bb282d 100644 --- a/src/libcamera/camera_sensor_properties.cpp +++ b/src/libcamera/camera_sensor_properties.cpp @@ -52,6 +52,24 @@ LOG_DEFINE_CATEGORY(CameraSensorProperties) const CameraSensorProperties *CameraSensorProperties::get(const std::string &sensor) { static const std::map sensorProps = { + { "hi846", { + .unitCellSize = { 1120, 1120 }, + .testPatternModes = { + { 0, controls::draft::TestPatternModeOff }, + { 1, controls::draft::TestPatternModeSolidColor }, + { 2, controls::draft::TestPatternModeColorBars }, + { 3, controls::draft::TestPatternModeColorBarsFadeToGray }, + { 4, controls::draft::TestPatternModePn9 }, + /* + * No corresponding test pattern mode for: + * 5: "Gradient Horizontal" + * 6: "Gradient Vertical" + * 7: "Check Board" + * 8: "Slant Pattern" + * 9: "Resolution Pattern" + */ + }, + } }, { "imx219", { .unitCellSize = { 1120, 1120 }, .testPatternModes = {