Skip to content

Commit bdf2401

Browse files
6by9mchehab
authored andcommitted
media: i2c: imx319: 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 f19ba70 commit bdf2401

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/media/i2c/imx319.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2328,8 +2328,12 @@ static int imx319_init_controls(struct imx319 *imx319)
23282328

23292329
imx319->hflip = v4l2_ctrl_new_std(ctrl_hdlr, &imx319_ctrl_ops,
23302330
V4L2_CID_HFLIP, 0, 1, 1, 0);
2331+
if (imx319->hflip)
2332+
imx319->hflip->flags |= V4L2_CTRL_FLAG_MODIFY_LAYOUT;
23312333
imx319->vflip = v4l2_ctrl_new_std(ctrl_hdlr, &imx319_ctrl_ops,
23322334
V4L2_CID_VFLIP, 0, 1, 1, 0);
2335+
if (imx319->vflip)
2336+
imx319->vflip->flags |= V4L2_CTRL_FLAG_MODIFY_LAYOUT;
23332337

23342338
v4l2_ctrl_new_std(ctrl_hdlr, &imx319_ctrl_ops, V4L2_CID_ANALOGUE_GAIN,
23352339
IMX319_ANA_GAIN_MIN, IMX319_ANA_GAIN_MAX,

0 commit comments

Comments
 (0)