Re: [PATCH 1/5] media: i2c: ov2680: Set V4L2_CTRL_FLAG_MODIFY_LAYOUT on flips

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey Dave,
Many thanks for your patch.

Dave Stevenson <dave.stevenson@xxxxxxxxxxxxxxx> writes:

> 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@xxxxxxxxxxxxxxx>
> ---
>  drivers/media/i2c/ov2680.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/media/i2c/ov2680.c b/drivers/media/i2c/ov2680.c
> index de66d3395a4d..aca76d7d674a 100644
> --- a/drivers/media/i2c/ov2680.c
> +++ b/drivers/media/i2c/ov2680.c
> @@ -941,7 +941,11 @@ static int ov2680_v4l2_register(struct ov2680_dev *sensor)
>  	hdl->lock = &sensor->lock;
>  
>  	ctrls->vflip = v4l2_ctrl_new_std(hdl, ops, V4L2_CID_VFLIP, 0, 1, 1, 0);
> +	if (ctrls->vflip)
> +		ctrls->vflip->flags |= V4L2_CTRL_FLAG_MODIFY_LAYOUT;
>  	ctrls->hflip = v4l2_ctrl_new_std(hdl, ops, V4L2_CID_HFLIP, 0, 1, 1, 0);
> +	if (ctrls->hflip)
> +		ctrls->hflip->flags |= V4L2_CTRL_FLAG_MODIFY_LAYOUT;

Since you will need to respin this series, and to be more consistent
with the rest of the code, could you move this flags set near the others
done after the check for hdl::error, the gain and exposure.

with that change you could add.
Acked-by: Rui Miguel Silva <rmfrfs@xxxxxxxxx>

Cheers,
   Rui
>  
>  	ctrls->test_pattern = v4l2_ctrl_new_std_menu_items(hdl,
>  					&ov2680_ctrl_ops, V4L2_CID_TEST_PATTERN,
> -- 
> 2.34.1



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux