Re: [PATCH v3 2/4] media: i2c: Add ST VD55G0 global shutter sensor driver

From: Sergey Lebedev

Date: Mon Nov 09 2026 - 08:31:06 EST


Hi Sakari,

On Mon, Nov 09, 2026 at 02:59:44PM +0200, Sakari Ailus wrote:
>> >> +static const s64 vd55g0_ev_bias_menu[] = {
>> >> + -3000, -2500, -2000, -1500, -1000, -500,
>> >> + 0,
>> >> + 500, 1000, 1500, 2000, 2500, 3000,
>> >
>> > Is this
>>
>> The sentence seems to have been cut off here. What did you mean? The
>> table is vd55g1's, in the control's 0.001 EV units.
>
> Uh, yes. I meant to ask if this is a firmware limitation. I guess so?

No, it is the driver's. The firmware has both a target and a
compensation register (UM2829, 14.7.3, Table 39 [1]):

AE_COMPENSATION VALUE 15:0 SFP 8.8 Compensation in EV
AE_TARGET_PERCENTAGE VALUE 15:0 UI Percentage relative to saturation

where "100 means saturated image". The driver writes the target from
this table, 27 * 2^EV, as vd55g1 does:

static const unsigned int index2exposure_target[] = {
3, 5, 7, 10, 14, 19, 27, 38, 54, 76, 108, 153, 216,
};

So +2.5 and +3 EV ask for 153 and 216, above saturation; I have not
tested what the AE does there.

v4 keeps vd55g1's table, unless you or Benjamin prefer the compensation
register.

[1] https://www.st.com/resource/en/user_manual/um2829-how-to-integrate-and-configure-the-vd55g0-device-from-a-hardware-and-software-perspective-stmicroelectronics.pdf

Sergey