From patchwork Tue Dec 1 11:23:02 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tuan Kiet Huynh X-Patchwork-Id: 29128 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 434D5C3300 for ; Tue, 1 Dec 2026 11:23:13 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id BDDEC6AAC9; Tue, 1 Dec 2026 12:23:12 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="jZlZM46c"; 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 C26B86AAB5 for ; Tue, 1 Dec 2026 12:23:10 +0100 (CET) Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-2f037bc348dso90908615ad.0 for ; Tue, 01 Dec 2026 03:23:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796124189; x=1796728989; 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:content-type; bh=Hrj+v1mgFOpehThznT2e+B4FWMOo9xLX7bGTCxoXHy4=; b=jZlZM46cSEeL37KwbvFOKMLDqe7XU5MJ11lxEz2G56tYpXUemT/LUETnU7WrPVV7Fb /GKgD+NRFAOLUhcQYVOh/Y1O/41EfCcgPAQsr80I5uqW2mVQjmGS2j1hsp3wK3vOCsJ1 haozta86rfOXtehby5Qg/q2xNQtDUkaQ0Lt8JwsyUWQ4gJkcUxzSQxNGU+ogn3fLIqp0 dhRtdBXt5ufMXHgNp8q3878+1O8Qkgd64PtX7efRuXpqdgNlWB9InTR67Ez+x0O5R546 WXcgAgdrPXMCeHJq+oQ2uwcz7R/X3S54AfOzIxDmFT6ARp/COWd6bJxbUO5m8D33r7/u KV3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796124189; x=1796728989; 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:content-type; bh=Hrj+v1mgFOpehThznT2e+B4FWMOo9xLX7bGTCxoXHy4=; b=amsBQQODmpkrAQ6osRY3hillgZy6DMWjjX2bl0Wp3V5YUbLVUfuYRZ9xLRFNjrdUpr StOeBz3tM/Ud1QOXDaXzhSOxkPJCKM5MyM8naw6wA+y//chpvfpq+48HYUoJM1VVo7U/ 3kzLFjgaQaCj2qYB0bz0O7Yqhsw0thMl5xAuhChoQswdRq0TfEv8FbTSu8LF+/r+AzfN hipHVZqiLx4t8kkrnnioODijas580tir7xq8y1lO3AmDyeiqVCrwWhKSmII4yxHTy4ic J5cYBZ9xAAYSHg5sKVFYCvJQJli26hRfP9j9KwPA+f6wj/4eKWdzhDyyu1Z3n494Dgux /l5Q== X-Gm-Message-State: APuU4Z9sXi6hnEFAaHYlqwaMwjau07dtUSFPUDR32fxQROpnYW+yCdBz xKDtQs+LhKtqPtrEtHFjLtbJogh+EqApMG5ym/WlLGCsCP7oUkcSzRk7kF2n9fXBrFfXrQ== X-Gm-Gg: AZFdTZfDimjqyubV3+7WVJfv5Obyj9tgGqYWnjjPi8b2izz27feB9a3HV0wmLkRkcSY 9PXOjztuaAM8LXGCROXLVA/GUO/jNYuMCJV8TRoxn2cSHV1dqsKgtcbBE9dvWgTuHZC0dIWqjVM 2sB1GBblI6OUVWZSAxKtXqtLk9joxqXBTaMvEEAJlD0qN8TfgPbJIJnyUO/tpm8QbMm5IYauRA2 AH7VD8RT93wiDbCeIHz5Ak+ahl03njyRkRKCsxW3KZOchOhCusXiI0wq0m2LUKH0c3FcSkaXeqy ZSZCJI/40g5K8oHVbPGVrszbxhX0mwVmZ77t19xAAcddZ9Z1kPsjOPR5LJZtWqSNihT0VpgvR+S 0e3rUn4/d5OUKFXWIHGU9pfoZpFZDYBM6uONqmIKkkkkJ1W8kaQj1478knS5n+/TtVZhrldGuxi he2BnahnACANxxPTeGO1j4UY01jBdnX0ppgy2V99hYnfoto57c1xAMagcIrU1VWVIHDo4Ii2dDu LgyX1zL/PCp/IKm15LyMlSjqoZfQAjgjv/iDfL9H1ip5IWfPlhbG5w8Af97kNKM0WoGAx7D24Jb eNF9ZZmJtV1JkdUkLkXrC9xx9wl4HDJjgwQtw6aeW45qLtoNVQNWQdDo0JOcTNU3s9rAUrcxJBr TLS5wEdPZlCce6czIvAeXBXDPOs0= X-Received: by 2002:a17:902:e5c5:b0:2ed:a96:8a03 with SMTP id d9443c01a7336-2f03f27e77amr349234975ad.55.1796124189053; Tue, 01 Dec 2026 03:23:09 -0800 (PST) Received: from default-vnic.defaultvcn.oraclevcn.com ([161.118.211.100]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2f0457fd68dsm169955545ad.39.2026.12.01.03.23.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 03:23:08 -0800 (PST) From: Tuan Kiet Huynh To: libcamera-devel@lists.libcamera.org Cc: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= , Tuan Kiet Huynh Subject: [PATCH v3 1/2] libcamera: sensor: camera_sensor_properties: Add Samsung S5K5E8 Date: Tue, 1 Dec 2026 18:23:02 +0700 Message-ID: <20261201112304.3425319-2-huynhtuankiet33@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261201112304.3425319-1-huynhtuankiet33@gmail.com> References: <20261201112304.3425319-1-huynhtuankiet33@gmail.com> 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 Add static sensor properties for the Samsung S5K5E8 5MP CMOS image sensor (1.12 um pixel pitch, test pattern modes 0..4 including PN9, and hardware-verified control delays on Xiaomi Redmi Note 4X where analogue gain takes effect 1 frame earlier than exposure and vertical blanking). The kernel driver for this sensor was submitted separately to linux-media: Link: https://lore.kernel.org/all/20261201110235.3327189-1-huynhtuankiet33@gmail.com/ Reflow only: the vblankDelay comment is re-wrapped to stay within 80 columns; no content change. Signed-off-by: Tuan Kiet Huynh --- .../sensor/camera_sensor_properties.cpp | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp index fbe82d47..16f17b09 100644 --- a/src/libcamera/sensor/camera_sensor_properties.cpp +++ b/src/libcamera/sensor/camera_sensor_properties.cpp @@ -611,6 +611,42 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen }, .sensorDelays = { }, } }, + { "s5k5e8", { + .unitCellSize = { 1120, 1120 }, + .testPatternModes = { + { controls::draft::TestPatternModeOff, 0 }, + { controls::draft::TestPatternModeSolidColor, 1 }, + { controls::draft::TestPatternModeColorBars, 2 }, + { controls::draft::TestPatternModeColorBarsFadeToGray, 3 }, + { controls::draft::TestPatternModePn9, 4 }, + }, + /* + * Frame delays, counted from the S_CTRL that applies + * them. The S_CTRL is issued during frame N+1, after + * DQBUF(N). Measured on the Redmi Note 4X (3 trials + * each): the first frame showing the change is N+3 + * for exposure (900 -> 1964 lines) and for vblank + * (24 -> 1968, frame period 33.5 -> 66.5 ms), and + * N+2 for gain (32 -> 128), so the delays are 2, 1 + * and 2. hblankDelay is unmeasured and carried over + * as 2 from v2. The driver does expose HBLANK, but + * read-only (264 lines full mode, 1480 binned), and + * the RPi pipeline registers it in DelayedControls, + * so the delay is consumed there; it has no visible + * effect on mido's simple pipeline. vblankDelay must + * not be less than exposureDelay: DelayedControls + * writes a shorter-delay control a frame later, so + * the new exposure would be written while the old + * vblank still bounds it, and the V4L2 control core + * would clamp it to the old maximum. + */ + .sensorDelays = { + .exposureDelay = 2, + .gainDelay = 1, + .vblankDelay = 2, + .hblankDelay = 2 + }, + } }, { "vd55g1", { .unitCellSize = { 2160, 2160 }, .testPatternModes = {