From patchwork Tue Dec 1 11:23:01 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: 29127 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 679B5C3300 for ; Tue, 1 Dec 2026 11:23:11 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1D8776AABB; Tue, 1 Dec 2026 12:23:11 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="q+1CtJp+"; dkim-atps=neutral Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4F0EA6AAB5 for ; Tue, 1 Dec 2026 12:23:09 +0100 (CET) Received: by mail-pg1-x52e.google.com with SMTP id 41be03b00d2f7-cd6028ff33fso5794770a12.0 for ; Tue, 01 Dec 2026 03:23:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796124187; x=1796728987; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=Q4Tyv2OY+wJQJ3synBXGxLQOUsvd5z0q0KY/TmpOW4Y=; b=q+1CtJp+WD8kgmWgBh2GMLLqlSouVSdKorzgDIWvlJCt3t1GZYonMt7Nc3c0xPwtWq e5TUcXu+I1WoJfedgJd4HfvZVg27rb3SYinE5yXw+cMFfP7iuxIBt5ulD1EpDTG4FSkK BmCKs+PGuKx8lTl/vbBCbdm/9BsFR0cK7JO1h5gQwBpKM9J67jNFCwATmcLwiqQHnKdJ LNgndI+r5YoPtcBaEsYNLWR07hsNxjHzJV/WKY5rdxJEsEYeB0mxsge31eyJ9/UhipVq ZqK+66F/lmmDIgVEsCPW0WDdHiPG0C+x677JVAwHgwAJkZn355ioTuMtdL6PVAiJaR5P WBBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796124187; x=1796728987; h=content-transfer-encoding:mime-version: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=Q4Tyv2OY+wJQJ3synBXGxLQOUsvd5z0q0KY/TmpOW4Y=; b=qa4bgRdLpUMP0hUWvdlTi0BblzEu+vXdDxDXYHSb5/t6XkKv8TvSUEmtDJqftoXune CrlirXcwXxnDXO2GE3kas2GqBRdsGtY/U1y/VYp6Tr0ZtYv/JEJDYGHmIhdXRupmNNUr snYAfBJ4m7NunEqkBr60tMPWWQE1Ww1Bur2/G1eIIsrmqAkGuz2yHDDz7VQTLMf0D89n vuwiIU9yew46tAaIUgdwvZ7frxoS8gmf5kPMVK3OtPs07bjwaBOucECHK2sxitdW/lka dABwt3gg/G7e/TTNaFjuEm84mwOiQOZ/IHpNFZiJQlmWWllCoOXc3iy06dmWZis/VSam eErA== X-Gm-Message-State: APuU4Z8sJpQTxjqF+w084+PUQKsS0Yt+N6Gyj/85bPrdslKFwYN3Aoe0 3k6sKPz/PJ94S4oAVcV47DdbSFsDvaUwavop1i2qYmLtWis1x8Lcq3TgFteCkm9S2oCZcA== X-Gm-Gg: AZFdTZda501y4zPcAdrlsMfI3XtBqNKaIlJDXOMUs61k92Y8Ln8UKOTeB/7bzFk5A/P FHrpgRy/hpbxx1fwWsVP9eLbprhvHp5yWblCULcfKEfJP7AzuMT6m6hllsC9bQFHyufDdm2ba3p nTKhcLXXnZ/EitPO+iiweTbYGOuiPRNnB2ZvF6XkEEpn4jgfcOB0lg4NKqBmwaWZFUo1rjUdkUV zeHEeOPPPkMgyRibGYY1sGa0ZmDh6l8EQq+WeZN/Hjbtd8IvgaWo/FIVQw9BP1eRfWtKMknm6m3 nTeh4cusabUn1t8QXCImFWqvpzF55Ff8OYDjCnDSWi3WwbrxzWk+etOPlyqjtW+tWfW7hZYaJ8Z ZWi+wheeRj3oilqfPFG0uaTHVCvTX5+vaaIt87PGOn4I4YUXy5MUaCUx8+GEYXqxgjWjGkqzfTA eLpAjW5cu4T6mcN8MZKexow3H0Vd0nwZeqEGOLomBBNNoqrVhZwjViGZ3j8/V6d46YvGJKn7I/f pykw/xqJjFdjuoSqZM8Wa38Tm4Fg3B2ZwgiX8n0FUmiInqbZP3ZLKI31IlwP/N5L5j0b+iaGx4W 2KEOzWSdbdy/Vy9/84QKTn2RcRHTvazJJv3/0VVPV2fzSGpCWuZq0pQx3EQEnnmh0B8BLtwcOXC 9dgOdAL/jwLxoyyIyoYIXy+nh17o= X-Received: by 2002:a17:903:2d2:b0:2ef:f652:a08f with SMTP id d9443c01a7336-2f03f1ba0b3mr413381065ad.42.1796124187503; Tue, 01 Dec 2026 03:23:07 -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.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 03:23:07 -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 0/2] libcamera: Add Samsung S5K5E8 sensor properties and helper Date: Tue, 1 Dec 2026 18:23:01 +0700 Message-ID: <20261201112304.3425319-1-huynhtuankiet33@gmail.com> X-Mailer: git-send-email 2.43.0 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 This is v3 of the Samsung S5K5E8 support for libcamera. The sensor is the 5MP front camera of the Xiaomi Redmi Note 4X (mido), whose kernel driver was submitted separately to linux-media: Link: https://lore.kernel.org/all/20261201110235.3327189-1-huynhtuankiet33@gmail.com/ Changes in v3: - Add test pattern mode 4, PN9, to the S5K5E8 properties (1/2). This addresses the review comment on v2 asking whether mode 4 is Pn9: it is. The updated kernel driver (PN9 support is in the v4 kernel series) exposes PN9 as test pattern mode 4 (16-bit register 0x0600, value 4), and I verified it on mido hardware: a mode 4 capture is a deterministic pseudo-random 10-bit frame (mean 512.5, std 295.0, mid-row lag-1 autocorrelation 0.004 at 1304x980, whole-frame -0.006, two consecutive frames byte-identical), distinct from modes 0-3, which were re-checked and still work. Note: this is the sensor's PN9 mode, not a bit-exact textbook m-sequence. The driver change itself is already tested on mido. - Add a Link: trailer to the kernel submission in 1/2, as requested in the same review. The thread linked above is the mido S5K5E8 submission; the other S5K5E8 thread found by the reviewer is a separate, independent submission for tissot by Hikmah Gumelar. - The sensor delays in 1/2 are unchanged from v2 (exposure 2, gain 1, vblank 2, hblank 2). 1/2 now carries a comment stating the counting convention and the measurement behind them: the S_CTRL is issued during frame N+1 after DQBUF(N), and on mido the first frame showing the change is N+3 for exposure and vblank and N+2 for gain (3 trials each). vblankDelay is deliberately not below exposureDelay: DelayedControls writes a shorter-delay control a frame later, so a smaller vblankDelay would have the new exposure written while the old vblank still bounds it, and the V4L2 control core would clamp it to the old maximum. - 2/2 is unchanged in values from v2; it expands the black-level comment with the mido dark-frame measurement (median 64 at 10 bits, mean 64.14) and adds a gain-linearity comment with the mido spot-check (4.06x measured for 4.00x requested). (The delay comment belongs to 1/2.) Changes in v2: - v2 was a resend of v1 after v1 was held in the list moderation queue (reported by Kieran Bingham on 2026-11-28), but not a pure resend: as submitted, v1 listed both the S5K5E8YX front sensor and the S5K3L8 rear sensor, and v2 dropped the S5K3L8 entry and renamed s5k5e8yx to s5k5e8. (v1 was held in moderation and is not on the public record, so this is from my own submission record.) Tuan Kiet Huynh (2): libcamera: sensor: camera_sensor_properties: Add Samsung S5K5E8 ipa: libipa: camera_sensor_helper: Add Samsung S5K5E8 src/ipa/libipa/camera_sensor_helper.cpp | 24 +++++++++++++ .../sensor/camera_sensor_properties.cpp | 36 +++++++++++++++++++ 2 files changed, 60 insertions(+)