Skip to content

Commit f19ba70

Browse files
6by9mchehab
authored andcommitted
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 <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 6627428 commit f19ba70

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/media/i2c/imx208.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -937,8 +937,12 @@ static int imx208_init_controls(struct imx208 *imx208)
937937

938938
imx208->hflip = v4l2_ctrl_new_std(ctrl_hdlr, &imx208_ctrl_ops,
939939
V4L2_CID_HFLIP, 0, 1, 1, 0);
940+
if (imx208->hflip)
941+
imx208->hflip->flags |= V4L2_CTRL_FLAG_MODIFY_LAYOUT;
940942
imx208->vflip = v4l2_ctrl_new_std(ctrl_hdlr, &imx208_ctrl_ops,
941943
V4L2_CID_VFLIP, 0, 1, 1, 0);
944+
if (imx208->vflip)
945+
imx208->vflip->flags |= V4L2_CTRL_FLAG_MODIFY_LAYOUT;
942946

943947
v4l2_ctrl_new_std(ctrl_hdlr, &imx208_ctrl_ops, V4L2_CID_ANALOGUE_GAIN,
944948
IMX208_ANA_GAIN_MIN, IMX208_ANA_GAIN_MAX,

0 commit comments

Comments
 (0)