Lines Matching refs:rect

233 	struct v4l2_rect rect;	/* cropping rectangle */  member
383 struct mt9m111_context *ctx, struct v4l2_rect *rect, in mt9m111_setup_rect_ctx() argument
387 int ret = mt9m111_reg_write(client, ctx->reducer_xzoom, rect->width); in mt9m111_setup_rect_ctx()
389 ret = mt9m111_reg_write(client, ctx->reducer_yzoom, rect->height); in mt9m111_setup_rect_ctx()
397 static int mt9m111_setup_geometry(struct mt9m111 *mt9m111, struct v4l2_rect *rect, in mt9m111_setup_geometry() argument
403 ret = reg_write(COLUMN_START, rect->left); in mt9m111_setup_geometry()
405 ret = reg_write(ROW_START, rect->top); in mt9m111_setup_geometry()
408 ret = reg_write(WINDOW_WIDTH, rect->width); in mt9m111_setup_geometry()
410 ret = reg_write(WINDOW_HEIGHT, rect->height); in mt9m111_setup_geometry()
416 rect, width, height); in mt9m111_setup_geometry()
419 rect, width, height); in mt9m111_setup_geometry()
423 __func__, code, rect->width, rect->height, rect->left, rect->top, in mt9m111_setup_geometry()
456 struct v4l2_rect rect = sel->r; in mt9m111_set_selection() local
472 v4l_bound_align_image(&rect.width, 2, MT9M111_MAX_WIDTH, align, in mt9m111_set_selection()
473 &rect.height, 2, MT9M111_MAX_HEIGHT, align, 0); in mt9m111_set_selection()
474 rect.left = clamp(rect.left, MT9M111_MIN_DARK_COLS, in mt9m111_set_selection()
476 (__s32)rect.width); in mt9m111_set_selection()
477 rect.top = clamp(rect.top, MT9M111_MIN_DARK_ROWS, in mt9m111_set_selection()
479 (__s32)rect.height); in mt9m111_set_selection()
481 width = min(mt9m111->width, rect.width); in mt9m111_set_selection()
482 height = min(mt9m111->height, rect.height); in mt9m111_set_selection()
484 ret = mt9m111_setup_geometry(mt9m111, &rect, width, height, mt9m111->fmt->code); in mt9m111_set_selection()
486 mt9m111->rect = rect; in mt9m111_set_selection()
512 sel->r = mt9m111->rect; in mt9m111_get_selection()
633 struct v4l2_rect *rect = &mt9m111->rect; in mt9m111_set_fmt() local
653 rect->width = ALIGN(rect->width, 2); in mt9m111_set_fmt()
654 rect->height = ALIGN(rect->height, 2); in mt9m111_set_fmt()
659 mf->width = rect->width; in mt9m111_set_fmt()
660 mf->height = rect->height; in mt9m111_set_fmt()
663 if (mf->width > rect->width) in mt9m111_set_fmt()
664 mf->width = rect->width; in mt9m111_set_fmt()
665 if (mf->height > rect->height) in mt9m111_set_fmt()
666 mf->height = rect->height; in mt9m111_set_fmt()
684 ret = mt9m111_setup_geometry(mt9m111, rect, mf->width, mf->height, mf->code); in mt9m111_set_fmt()
701 struct v4l2_rect *sensor_rect = &mt9m111->rect; in mt9m111_find_mode()
940 mt9m111_setup_geometry(mt9m111, &mt9m111->rect, in mt9m111_restore_state()
1331 mt9m111->rect.left = MT9M111_MIN_DARK_COLS; in mt9m111_probe()
1332 mt9m111->rect.top = MT9M111_MIN_DARK_ROWS; in mt9m111_probe()
1333 mt9m111->rect.width = MT9M111_MAX_WIDTH; in mt9m111_probe()
1334 mt9m111->rect.height = MT9M111_MAX_HEIGHT; in mt9m111_probe()
1335 mt9m111->width = mt9m111->rect.width; in mt9m111_probe()
1336 mt9m111->height = mt9m111->rect.height; in mt9m111_probe()