Re: [PATCH 1/7] media: i2c: ov7251: Fix link frequency index

From: Dan Scally

Date: Tue Oct 27 2026 - 12:09:30 EST


Hi Antoine

On 26/10/2026 11:10, Antoine Pichot wrote:
ov7251_check_hwcfg() stores i, the index into the firmware's
link_frequencies array, in link_freq_idx, which the driver then uses to
index its own link_freq[], pixel_rates[] and pll1[] tables. The matching
driver entry is j. Store j.

Observed on a Surface Book 2, where ipu-bridge lists one link frequency,
319.2 MHz, which is link_freq[1]: V4L2_CID_LINK_FREQ reads 240000000,
and the pixel rate and PLL registers are off the same way.

Fixes: cc125aaa5a78 ("media: i2c: Provide ov7251_check_hwcfg()")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Antoine Pichot <antoine.pichot@xxxxxxxxx>
---

Thanks for the patch, this is right:

Reviewed-by: Daniel Scally <dan.scally@xxxxxxxxxxxxxxxx>

drivers/media/i2c/ov7251.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/i2c/ov7251.c b/drivers/media/i2c/ov7251.c
index fce6344b51..1413f1856e 100644
--- a/drivers/media/i2c/ov7251.c
+++ b/drivers/media/i2c/ov7251.c
@@ -1523,7 +1523,7 @@ static int ov7251_check_hwcfg(struct ov7251 *ov7251)
goto out_free_bus_cfg;
}
- ov7251->link_freq_idx = i;
+ ov7251->link_freq_idx = j;
out_free_bus_cfg:
v4l2_fwnode_endpoint_free(&bus_cfg);