Re: [PATCH v2 2/4] media: i2c: Add ST VD55G0 global shutter sensor driver
From: Sergey Lebedev
Date: Tue Nov 03 2026 - 07:56:43 EST
Sashiko's review of this patch [1] went to devicetree, not linux-media.
All three points are right; v3 will fix them. Tested on the Surface Pro
11 with v2 and with the fix:
1. Auto exposure. Once a stream stops, the exposure and gains read back,
and carry into manual mode, the values set before switching to auto,
not the last applied ones. No runtime suspend is needed for this:
pm_runtime_get_if_in_use() fails as soon as the stream's reference
is dropped. Here the stream applied 1796/24/2048; after the stop the
controls read 123/7/333, the manual values set before, and a manual
stream then applied 123/7/333. v3 returns what the last stream
applied, which the driver already keeps for the next cold start; the
controls then read 1796/24/2048 and the manual stream applies that.
So the v2 cover letter's "carry over to manual mode" held only while
streaming.
2. Probe. The sensor was runtime suspended 22 ms after bind returned,
not after the 1 s autosuspend delay. v3 takes a reference before
pm_runtime_enable() and sets up autosuspend before registering, as
vd55g1 does, and drops the reference once registered; the sensor
then suspends 1.2 s after bind. The error path was not exercised.
3. RUNTIME_PM_OPS() and pm_ptr(): in v3. With CONFIG_PM=n,
vd55g0_pm_ops is then no longer in the object.
With the fix, v4l2-compliance passes 46 of 46, with no KASAN or lockdep
report.
[1] https://lore.kernel.org/all/sashiko-outbox-195119@xxxxxxxxxx/
Sergey