ov5693.c (48ee4835b73c48590d05a54730dc8037ebd39d3b) ov5693.c (2a7f8142032a9196c680254dddd26bd63c1e79e2)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (c) 2013 Intel Corporation. All Rights Reserved.
4 *
5 * Adapted from the atomisp-ov5693 driver, with contributions from:
6 *
7 * Daniel Scally
8 * Jean-Michel Hautbois

--- 972 unchanged lines hidden (view full) ---

981
982 format->format = *fmt;
983
984 if (format->which == V4L2_SUBDEV_FORMAT_TRY)
985 return ret;
986
987 mutex_lock(&ov5693->lock);
988
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (c) 2013 Intel Corporation. All Rights Reserved.
4 *
5 * Adapted from the atomisp-ov5693 driver, with contributions from:
6 *
7 * Daniel Scally
8 * Jean-Michel Hautbois

--- 972 unchanged lines hidden (view full) ---

981
982 format->format = *fmt;
983
984 if (format->which == V4L2_SUBDEV_FORMAT_TRY)
985 return ret;
986
987 mutex_lock(&ov5693->lock);
988
989 ov5693->mode.binning_x = hratio > 1 ? true : false;
989 ov5693->mode.binning_x = hratio > 1;
990 ov5693->mode.inc_x_odd = hratio > 1 ? 3 : 1;
990 ov5693->mode.inc_x_odd = hratio > 1 ? 3 : 1;
991 ov5693->mode.binning_y = vratio > 1 ? true : false;
991 ov5693->mode.binning_y = vratio > 1;
992 ov5693->mode.inc_y_odd = vratio > 1 ? 3 : 1;
993
994 ov5693->mode.vts = __ov5693_calc_vts(fmt->height);
995
996 __v4l2_ctrl_modify_range(ov5693->ctrls.vblank,
997 OV5693_TIMING_MIN_VTS,
998 OV5693_TIMING_MAX_VTS - fmt->height,
999 1, ov5693->mode.vts - fmt->height);

--- 538 unchanged lines hidden ---
992 ov5693->mode.inc_y_odd = vratio > 1 ? 3 : 1;
993
994 ov5693->mode.vts = __ov5693_calc_vts(fmt->height);
995
996 __v4l2_ctrl_modify_range(ov5693->ctrls.vblank,
997 OV5693_TIMING_MIN_VTS,
998 OV5693_TIMING_MAX_VTS - fmt->height,
999 1, ov5693->mode.vts - fmt->height);

--- 538 unchanged lines hidden ---