diff options
author | Dave Stevenson <dave.stevenson@raspberrypi.com> | 2022-12-05 16:21:46 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2022-12-06 08:23:19 +0100 |
commit | f19ba70fc982563554d31fca2e7ca406657ee9b2 (patch) | |
tree | f23cd35b1e25e62b144afde67ef91920b3034bbd /drivers/media | |
parent | media: i2c: ov2680: Set V4L2_CTRL_FLAG_MODIFY_LAYOUT on flips (diff) | |
download | linux-f19ba70fc982563554d31fca2e7ca406657ee9b2.tar.xz linux-f19ba70fc982563554d31fca2e7ca406657ee9b2.zip |
media: i2c: imx208: Set V4L2_CTRL_FLAG_MODIFY_LAYOUT on flips
The driver changes the Bayer order based on the flips, but
does not define the control correctly with the
V4L2_CTRL_FLAG_MODIFY_LAYOUT flag.
Add the V4L2_CTRL_FLAG_MODIFY_LAYOUT flag.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/i2c/imx208.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/i2c/imx208.c b/drivers/media/i2c/imx208.c index a0e17bb9d4ca..64c70ebf9869 100644 --- a/drivers/media/i2c/imx208.c +++ b/drivers/media/i2c/imx208.c @@ -937,8 +937,12 @@ static int imx208_init_controls(struct imx208 *imx208) imx208->hflip = v4l2_ctrl_new_std(ctrl_hdlr, &imx208_ctrl_ops, V4L2_CID_HFLIP, 0, 1, 1, 0); + if (imx208->hflip) + imx208->hflip->flags |= V4L2_CTRL_FLAG_MODIFY_LAYOUT; imx208->vflip = v4l2_ctrl_new_std(ctrl_hdlr, &imx208_ctrl_ops, V4L2_CID_VFLIP, 0, 1, 1, 0); + if (imx208->vflip) + imx208->vflip->flags |= V4L2_CTRL_FLAG_MODIFY_LAYOUT; v4l2_ctrl_new_std(ctrl_hdlr, &imx208_ctrl_ops, V4L2_CID_ANALOGUE_GAIN, IMX208_ANA_GAIN_MIN, IMX208_ANA_GAIN_MAX, |