Revert "media: i2c: imx290: Explicitly set v&h blank on mode change"
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Mon, 5 Sep 2022 10:50:30 +0000 (11:50 +0100)
committerPhil Elwell <8911409+pelwell@users.noreply.github.com>
Mon, 5 Sep 2022 16:16:15 +0000 (17:16 +0100)
This reverts commit 090d29f5854aa7b6511b0ae8a926929130fd3978.

Whilst the behaviour of not resetting the frame rate to the
"correct"/default value on mode change is useful, it is not correct
under the V4L2 API.

Revert the patch so that blanking values persist.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
drivers/media/i2c/imx290.c

index 2c0c0b9..da7d0d9 100644 (file)
@@ -916,23 +916,17 @@ static int imx290_set_fmt(struct v4l2_subdev *sd,
                        __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);
-                       __v4l2_ctrl_s_ctrl(imx290->hblank,
-                                          mode->hmax - mode->width);
-               }
-               if (imx290->vblank) {
+               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,
                                                 IMX290_EXPOSURE_MIN,