Lines Matching refs:crop
510 const struct v4l2_rect *crop; in imx296_setup() local
515 crop = v4l2_subdev_get_pad_crop(&sensor->subdev, state, 0); in imx296_setup()
521 if (crop->width != IMX296_PIXEL_ARRAY_WIDTH || in imx296_setup()
522 crop->height != IMX296_PIXEL_ARRAY_HEIGHT) { in imx296_setup()
525 imx296_write(sensor, IMX296_FID0_ROIPH1, crop->left, &ret); in imx296_setup()
526 imx296_write(sensor, IMX296_FID0_ROIPV1, crop->top, &ret); in imx296_setup()
527 imx296_write(sensor, IMX296_FID0_ROIWH1, crop->width, &ret); in imx296_setup()
528 imx296_write(sensor, IMX296_FID0_ROIWV1, crop->height, &ret); in imx296_setup()
534 (crop->width != format->width ? in imx296_setup()
536 (crop->height != format->height ? in imx296_setup()
694 struct v4l2_rect *crop; in imx296_set_format() local
696 crop = v4l2_subdev_get_pad_crop(sd, state, fmt->pad); in imx296_set_format()
703 if (crop->width == IMX296_PIXEL_ARRAY_WIDTH && in imx296_set_format()
704 crop->height == IMX296_PIXEL_ARRAY_HEIGHT) { in imx296_set_format()
712 crop->width / 2, crop->width); in imx296_set_format()
714 crop->height / 2, crop->height); in imx296_set_format()
716 hratio = DIV_ROUND_CLOSEST(crop->width, width); in imx296_set_format()
717 vratio = DIV_ROUND_CLOSEST(crop->height, height); in imx296_set_format()
719 format->width = crop->width / hratio; in imx296_set_format()
720 format->height = crop->height / vratio; in imx296_set_format()
722 format->width = crop->width; in imx296_set_format()
723 format->height = crop->height; in imx296_set_format()
769 struct v4l2_rect *crop; in imx296_set_selection() local
793 crop = v4l2_subdev_get_pad_crop(sd, state, sel->pad); in imx296_set_selection()
795 if (rect.width != crop->width || rect.height != crop->height) { in imx296_set_selection()
805 *crop = rect; in imx296_set_selection()