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()
703 struct v4l2_rect *crop; in imx296_set_format() local
705 crop = v4l2_subdev_get_pad_crop(sd, state, fmt->pad); in imx296_set_format()
712 if (crop->width == IMX296_PIXEL_ARRAY_WIDTH && in imx296_set_format()
713 crop->height == IMX296_PIXEL_ARRAY_HEIGHT) { in imx296_set_format()
721 crop->width / 2, crop->width); in imx296_set_format()
723 crop->height / 2, crop->height); in imx296_set_format()
725 hratio = DIV_ROUND_CLOSEST(crop->width, width); in imx296_set_format()
726 vratio = DIV_ROUND_CLOSEST(crop->height, height); in imx296_set_format()
728 format->width = crop->width / hratio; in imx296_set_format()
729 format->height = crop->height / vratio; in imx296_set_format()
731 format->width = crop->width; in imx296_set_format()
732 format->height = crop->height; in imx296_set_format()
778 struct v4l2_rect *crop; in imx296_set_selection() local
802 crop = v4l2_subdev_get_pad_crop(sd, state, sel->pad); in imx296_set_selection()
804 if (rect.width != crop->width || rect.height != crop->height) { in imx296_set_selection()
814 *crop = rect; in imx296_set_selection()