Message ID | 284e2b654a03e0817b6af8b68f18cbc183024a62.1543826654.git-series.maxime.ripard@bootlin.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | media: ov5640: Misc cleanup and improvements | expand |
diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c index e36b04912dcc..536261618d0d 100644 --- a/drivers/media/i2c/ov5640.c +++ b/drivers/media/i2c/ov5640.c @@ -1992,7 +1992,8 @@ static int ov5640_set_mode(struct ov5640_dev *sensor) * All the formats we support have 16 bits per pixel, seems to require * the same rate than YUV, so we can just use 16 bpp all the time. */ - rate = mode->pixel_clock * 16; + rate = mode->vtot * mode->htot * 16; + rate *= ov5640_framerates[sensor->current_fr]; if (sensor->ep.bus_type == V4L2_MBUS_CSI2_DPHY) { rate = rate / sensor->ep.bus.mipi_csi2.num_data_lanes; ret = ov5640_set_mipi_pclk(sensor, rate);