Re: [PATCH v2 1/3] media: i2c: ov5693: Program the mode registers on stream start
From: Marco Ziliani
Date: Fri Nov 20 2026 - 12:28:33 EST
Hi Sakari,
Thanks for the review.
On Fri, Nov 20, 2026 at 11:37:10AM +0200, Sakari Ailus wrote:
> This doesn't seem quite right. The static register list should be written
> on power-on and the rest when they change. Also there shouldn't be overlap
> between the register list and the registers programmatically determined by
> the driver.
There are three such overlaps in ov5693_global_regs today: 0x3820 and
0x3821 (FORMAT1/FORMAT2, whose binning and flip bits the driver sets
from the format and the flip controls) and 0x350b (the low byte of the
analogue gain). They predate this series, but I'll fix them in v3 with
a separate patch: drop 0x350b from the list, and let the driver program
0x3820/0x3821 whole, including the bits it doesn't manage today.
For the rest, I'd keep writing the mode registers on power-on as
before, and also write them from set_fmt() and set_selection() on the
active state when the sensor is powered, instead of on every stream
start. That needs pm_runtime_get_if_active() rather than the
pm_runtime_get_if_in_use() the controls use, so that a change made
during the autosuspend delay is written too. It fixes the same bug:
today a format change made while the sensor stays powered never reaches
the hardware.
Does that match what you had in mind?
Thanks,
Marco