Commit f19ba70f authored by Dave Stevenson's avatar Dave Stevenson Committed by Mauro Carvalho Chehab
Browse files

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: default avatarDave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent 66274280
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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,