1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-02-15 04:42:02 +00:00
openmptcprouter/root/target/linux/bcm27xx/patches-5.15/950-0269-media-i2c-imx290-Explicitly-set-v-h-blank-on-mode-ch.patch

47 lines
1.6 KiB
Diff
Raw Normal View History

2022-04-22 15:00:47 +00:00
From 75af184001cebce51d587f90f9ef3023e24bf1a8 Mon Sep 17 00:00:00 2001
2021-11-24 17:32:01 +00:00
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
Date: Tue, 7 Jul 2020 10:31:53 +0100
2022-04-22 15:00:47 +00:00
Subject: [PATCH 269/828] media: i2c: imx290: Explicitly set v&h blank on mode
2021-11-24 17:32:01 +00:00
change
__v4l2_ctrl_modify_range only updates the current value should
it be invalid within the new range. That can leave modes producing
odd frame rates.
Explicitly update the HBLANK and VBLANK values so that on mode
change we revert to the default frame rate for the mode.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
---
drivers/media/i2c/imx290.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
--- a/drivers/media/i2c/imx290.c
+++ b/drivers/media/i2c/imx290.c
2022-04-22 15:00:47 +00:00
@@ -796,17 +796,23 @@ static int imx290_set_fmt(struct v4l2_su
2021-11-24 17:32:01 +00:00
__v4l2_ctrl_s_ctrl_int64(imx290->pixel_rate,
imx290_calc_pixel_rate(imx290));
- if (imx290->hblank)
+ if (imx290->hblank) {
__v4l2_ctrl_modify_range(imx290->hblank,
imx290->hmax_min - mode->width,
IMX290_HMAX_MAX - mode->width,
1, mode->hmax - mode->width);
- if (imx290->vblank)
+ __v4l2_ctrl_s_ctrl(imx290->hblank,
+ mode->hmax - mode->width);
+ }
+ if (imx290->vblank) {
__v4l2_ctrl_modify_range(imx290->vblank,
mode->vmax - mode->height,
IMX290_VMAX_MAX - mode->height,
1,
mode->vmax - mode->height);
+ __v4l2_ctrl_s_ctrl(imx290->vblank,
+ mode->vmax - mode->height);
+ }
if (imx290->exposure)
__v4l2_ctrl_modify_range(imx290->exposure,
mode->vmax - mode->height,