From patchwork Fri Jun 12 07:46:47 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bogdan Radulescu X-Patchwork-Id: 26876 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 07B38C328C for ; Fri, 12 Jun 2026 07:46:58 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A8515623C1; Fri, 12 Jun 2026 09:46:58 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=nimblex.net header.i=@nimblex.net header.b="AEKqfPJ/"; dkim-atps=neutral Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id ABCA361E76 for ; Fri, 12 Jun 2026 09:46:56 +0200 (CEST) Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-45eee266c6cso548999f8f.1 for ; Fri, 12 Jun 2026 00:46:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nimblex.net; s=google; t=1781250416; x=1781855216; 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=x81P1+PSXYnb1gCYKmFovk69d8TIXdubOfhhX4nu7Zc=; b=AEKqfPJ/VyBbU4F5qR6fit8TRPr8UeNadPM1RBqT1aOcwCYqUxDHtj21MJrCvo2NGb sRu2sihY+qQkza3wI4BA976yjfk5ecvhCu+1TLBl3G6TUqoKPcvPd8h1y2ibLpUVLAF5 gtX3RQDg0nVww0sQ3ORwXPLw3iTwMa+/NsRt8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781250416; x=1781855216; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=x81P1+PSXYnb1gCYKmFovk69d8TIXdubOfhhX4nu7Zc=; b=J3AhPzEwGyQFuF9BxLHdHh4HJA24IWnha0KiMfo1gVcK0Q2lmRFMdKTQWG0BnlEYLT tTL3N4EBZoUKINR8Cl1AQf+3Typ5xdjekzUI1aIfsgkLHR/PG8wcX+oiNpjA7asR/LHf Dkf5qhdxI/tM2Hnne1jDYGIWA3l5qpQVk5hxqH/tFTYd5utBaeg0i++3pPOxs5o8ttdt JHaw0qSzWVUWVvL3hsk1eMXQWpo/KksjQQpF7uoEPtNVtRsGCUQH56DRvpHbmlIg55UW zf7gWQd0LObRBAfnCiqNDQY+GEb5OLcA+dQeslnvkWDu9i46ioyCeRXlBKZ4WF9JhCh8 sRvg== X-Gm-Message-State: AOJu0YwTj5wDfWeboCPCx2mye/Vg78KZlIL1c60E8J2LLNMc3hqSDofu HJzG4ODVPv78eqQL/Rof0U+jDJoL6jK5n+ORNEvICsI9ueeZmS2MVgZd9m9Pk2IwBi6PlEX1/RN tZ66yQgI= X-Gm-Gg: Acq92OGmA5lBlCn0Vc8ePmFd0S5KQ2jl2IcUSdbgfJKSY2NNH+lIxthQQ4TnV9SE6XU K6JrZNH/jAeCH1OlXo4xr+IJXxtuwrPToWCSmktCbKMo/kjLBll8afpLeXnCtyNNAz0Y1/6z+/6 Blr6DSfVlj6lk4pIaFOnEBuY02yH42hKorsZK11reOjLx/rRITq81DlqXLin/HEy+HWbpYtM2LI 3/LkZAp3VNWhVGBcWXcXHXDNooIeKgaIzw7iJQ3NFbnSe2S4nxuldO+8MPWY2nLKm9G0LQHllX0 R3fFR3p14OC69B+G4MYGIGVcUgOLyDgCmT69qlEr660ms6ovr2TiW9M8brs+xORVO3D06s6JAqk 3CSrEp72V225kqmkPN84Shi5IYv1SQBbynJtJjYDn2o63BgIABAe7VMngsgDjcdNUUQdP46e6Tv C5c3reIR4eVDswN7l2roc= X-Received: by 2002:a05:6000:615:b0:45e:e44b:312b with SMTP id ffacd0b85a97d-4606da6a8a7mr2582011f8f.18.1781250415950; Fri, 12 Jun 2026 00:46:55 -0700 (PDT) Received: from nimblex ([2a02:2f0c:5605:2700:831f:a7f3:441:bb79]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4606f26f309sm3892588f8f.14.2026.06.12.00.46.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2026 00:46:55 -0700 (PDT) From: Bogdan Radulescu To: libcamera-devel@lists.libcamera.org Cc: Laurent Pinchart , Kieran Bingham , Hans de Goede , Bogdan Radulescu Subject: [PATCH v2] ipa: libipa: camera_sensor_helper: add ov08x40 Date: Fri, 12 Jun 2026 10:46:47 +0300 Message-ID: <20260612074647.3118148-1-bogdan@nimblex.net> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260512164926.2947313-1-bogdan@nimblex.net> References: <20260512164926.2947313-1-bogdan@nimblex.net> 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" Without an entry for ov08x40, the software ISP used by the simple pipeline handler can't run AGC for this sensor and logs: IPASoft: Failed to create camera sensor helper for ov08x40 The kernel driver (drivers/media/i2c/ov08x40.c) advertises analogue- gain register values in the range 0x80..0x07c0 with a default of 0x80, which is the same 1/128-step encoding already used by the other OmniVision sensors in this file (ov5675, ov8858, ov8865, ov13858). The sensor outputs 10-bit Bayer data and, like the other OmniVision sensors, applies a fixed 0x40 (64 LSB) black level pedestal, which scales to 4096 at the 16-bit width expected by blackLevel(). Add a helper that follows the same pattern. Tested on a Lenovo ThinkPad X1 Carbon Gen 13 (Intel Lunar Lake, IPU7), where this is the only front camera. Signed-off-by: Bogdan Radulescu --- Changes since v1: - Drop the explanatory comment on the gain model (it is already covered by the commit message). - Set blackLevel_ to 4096 (0x40 at 10 bits), which was missing. - Move the entry so the helpers stay sorted by sensor model (ov08x40 sorts before ov2685). src/ipa/libipa/camera_sensor_helper.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp index 3028197..eb9acd1 100644 --- a/src/ipa/libipa/camera_sensor_helper.cpp +++ b/src/ipa/libipa/camera_sensor_helper.cpp @@ -653,6 +653,17 @@ }; REGISTER_CAMERA_SENSOR_HELPER("imx708", CameraSensorHelperImx708) +class CameraSensorHelperOv08x40 : public CameraSensorHelper +{ +public: + CameraSensorHelperOv08x40() + { + blackLevel_ = 4096; + gain_ = AnalogueGainLinear{ 1, 0, 0, 128 }; + } +}; +REGISTER_CAMERA_SENSOR_HELPER("ov08x40", CameraSensorHelperOv08x40) + class CameraSensorHelperOv2685 : public CameraSensorHelper { public: