Re: [PATCH 0/4] media: i2c: ov7251: runtime PM, non-continuous MIPI clock, and strobe OE
From: Robert IJtsma
Date: Fri Nov 27 2026 - 16:55:09 EST
Hi Antoine,
On Sat, Nov 28, 2026 at 06:16:53AM +0900, Antoine Pichot wrote:
> Your patch 4 adds the same control as patch 8 of my ov7251 series, whose
> v3 went to this list on 13 Nov:
> https://lore.kernel.org/linux-media/20261113024059.1087031-1-antoine.pichot@xxxxxxxxx/
>
> Mine drives the same STROBE pin, for the infrared emitter of the
> Surface Book 2 and Surface Pro 7 and 7+, and its
> V4L2_CID_FLASH_STROBE_OE is off by default too. The main differences:
>
> - The pulse follows the exposure, from 52 to 776 lines as the Windows
> driver clamps it, and never more than 45% of the frame. A fixed
> 512-line pulse lights about 60% of each frame at 60 fps and 90% at
> 90 fps.
> - It lights alternate frames (pattern 0xaa), as Windows Hello does, so
> the dark frames give the ambient light reference.
>
> Could you please try my series on the Surface Pro X? It has only been
> tested on Intel camera interfaces (IPU3, IPU4 and IPU6), so a Tested-by
> from your Qualcomm SC8180X would show that it does not depend on the
> platform. If the Pro X needs every frame lit, I can add a control for
> it. Patch 8 depends on patches 5 to 7.
Thanks for the pointer! I missed your v3 series on the list — your
exposure-clamped strobe span and 45% duty-cycle cap are much cleaner
than a fixed 512-line pulse.
I just built and tested patches 1-8 of your v3 series on the Microsoft
Surface Pro X SQ2 (Qualcomm SC8180X, CAMSS CSIPHY3 -> CSID3 -> VFE3 RDI0,
OV7251 rev 7 / 1F at 0x60, 19.2 MHz xclk, 240 MHz link frequency,
with non-continuous MIPI clock gating enabled on 0x4800 for Qualcomm
CSIPHY):
- orientation (Front) and rotation (0) parse cleanly from Devicetree.
- With strobe_output_enable=0 at 30 fps (640x480 Y10, exposure=550,
gain=32), dark baseline mean is ~16.8 / 1023 across all frames.
- With strobe_output_enable=1, alternate frames (0xaa) light cleanly
from frame 0 with zero bleed into dark frames across all three modes,
including back-to-back stream restarts and mode switches:
- 30.00 fps: lit ~193.5, dark ~16.8
- 60.14 fps: lit ~80.3, dark ~16.5 (45% duty cap active)
- 90.43 fps: lit ~58.6, dark ~16.7 (45% duty cap active)
- Howdy's dark_threshold skips the unlit frames automatically, so no
extra all-frames control is needed for Surface Pro X.
Feel free to add for patches 1-8:
Tested-by: Robert Ijtsma <robertijtsma@xxxxxxxxx> # Surface Pro X SQ2 (SC8180X)
> Your patches 2 to 4 conflict with mine, mostly because my patch 5
> converts ov7251_s_stream() and the driver's lock to the sub-device
> active state, so one of the two series will need a rebase. Your patch
> 1 applies on top of mine, but my patch 7 moves the common registers
> into the global init table, right after the software reset, so your
> wait would then come after those writes instead of before them.
Agreed — I have dropped my patch 4 in favor of your patch 8 and rebased
the remaining three patches on top of your v3 series for my v2:
1. Issue 0x0103 = 0x01 explicitly in ov7251_set_power_on() and wait
5-10 ms before writing ov7251_global_init_setting[] (good catch!).
2. Use pm_runtime_mark_last_busy() + pm_runtime_put_autosuspend() in
ov7251_s_ctrl() and ov7251_s_stream() so the 1000 ms autosuspend
window is actually honored across stream restarts (which also lets
your patch 7 keep the common registers alive in software standby
between streams).
3. Support V4L2_MBUS_CSI2_NONCONTINUOUS_CLOCK on 0x4800 during power-on.
I will post that 3-patch v2 with Based-on pointing to your v3 series.
Best regards,
Robert