[v3,0/2] libcamera: Add Samsung S5K5E8 sensor properties and helper
mbox series

Message ID 20261201112304.3425319-1-huynhtuankiet33@gmail.com
Headers show
Series
  • libcamera: Add Samsung S5K5E8 sensor properties and helper
Related show

Message

Tuan Kiet Huynh Dec. 1, 2026, 11:23 a.m. UTC
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(+)