Re: [PATCH 1/2] media: i2c: ov08x40: Implement the selection API
From: Oleg Keri
Date: Mon Sep 14 2026 - 10:40:47 EST
Hi Pierre,
On Fri, Sep 04, 2026 at 03:45:23PM +0200, Pierre Pinon wrote:
> The mode register lists program only the low bytes of the vertical
> window (0x3803, 0x3807) and the output size (0x3808-0x380b). The
> horizontal window (0x3800/0x3801, 0x3804/0x3805) and the high bytes of
> the vertical window (0x3802, 0x3806) are never written and keep their
> power-on values, so they cannot be derived from the driver source.
They are written, just not per mode: ov08x40_global_regs has
{0x3800, 0x00},
{0x3801, 0x00},
{0x3802, 0x00},
{0x3804, 0x0f},
{0x3805, 0x1f},
{0x3806, 0x09},
which is exactly what you read back, so the first caveat in the message
can go. The same five rectangles and the 3872x2432 array also match
what I see on a Lenovo Yoga Slim 7x Gen 11 (Qualcomm CAMSS, 2 lanes)
with libcamera.
One small thing you may want to consider: V4L2_SEL_TGT_CROP for
V4L2_SUBDEV_FORMAT_TRY returns the active mode's crop here. Looking up
the mode that matches the TRY format in the subdev state, the way
ov08x40_get_pad_format() does, would keep a TRY set_fmt and a TRY
get_selection consistent.
Thanks,
Oleg