Skip to content

Commit 1dc3388

Browse files
6by9mchehab
authored andcommitted
media: i2c: imx355: 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 bdf2401 commit 1dc3388

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/media/i2c/imx355.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1617,8 +1617,12 @@ static int imx355_init_controls(struct imx355 *imx355)
16171617

16181618
imx355->hflip = v4l2_ctrl_new_std(ctrl_hdlr, &imx355_ctrl_ops,
16191619
V4L2_CID_HFLIP, 0, 1, 1, 0);
1620+
if (imx355->hflip)
1621+
imx355->hflip->flags |= V4L2_CTRL_FLAG_MODIFY_LAYOUT;
16201622
imx355->vflip = v4l2_ctrl_new_std(ctrl_hdlr, &imx355_ctrl_ops,
16211623
V4L2_CID_VFLIP, 0, 1, 1, 0);
1624+
if (imx355->vflip)
1625+
imx355->vflip->flags |= V4L2_CTRL_FLAG_MODIFY_LAYOUT;
16221626

16231627
v4l2_ctrl_new_std(ctrl_hdlr, &imx355_ctrl_ops, V4L2_CID_ANALOGUE_GAIN,
16241628
IMX355_ANA_GAIN_MIN, IMX355_ANA_GAIN_MAX,

0 commit comments

Comments
 (0)