Re: [PATCH v2 2/2] media: i2c: ov02e10: add OV02E10 image sensor driver

From: Bryan O'Donoghue
Date: Mon Mar 31 2025 - 20:35:47 EST


On 27/03/2025 07:36, Sakari Ailus wrote:
+static u64 to_pixel_rate(u32 f_index)
+{
+ u64 pixel_rate = link_freq_menu_items[f_index] * 2 * OV02E10_DATA_LANES;
+
+ do_div(pixel_rate, OV02E10_RGB_DEPTH);
The pixel rate control is for the pixel rate on the pixel array, not on the
CSI-2 interface. Without binning or sub-sampling these may the same still,
but this only works in special cases really.

Hmm computer says no, I don't think I have understood this comment..

Looking at other drivers, I'd say the above pattern is pretty common - taking ov8856 as an example that's pretty much equivalent logic to the above, ov08x40 does something similar.

=>

pixel_rate == link_freq * 2 * #oflanes / RGB_DEPTH
=> 360MHz * 2 * 2 / 10
=> 360000000 * 2 * 2 / 10
=> 144000000

If I'm understanding you though you mean the pixel rate for the control V4L2_CID_PIXEL_RATE expressed here should be the resolution * the FPS / bits_per_pixel

pixel_rate = wdith x height x fps / bpp
=> 1928 * 1088 * 30 / 10
=> 6292992

i.e. the pixel rate not related to the CSI2 link frequency ?

---
bod