Lines Matching refs:rect
234 struct v4l2_rect rect; /* cropping rectangle */ member
384 struct mt9m111_context *ctx, struct v4l2_rect *rect, in mt9m111_setup_rect_ctx() argument
388 int ret = mt9m111_reg_write(client, ctx->reducer_xzoom, rect->width); in mt9m111_setup_rect_ctx()
390 ret = mt9m111_reg_write(client, ctx->reducer_yzoom, rect->height); in mt9m111_setup_rect_ctx()
398 static int mt9m111_setup_geometry(struct mt9m111 *mt9m111, struct v4l2_rect *rect, in mt9m111_setup_geometry() argument
404 ret = reg_write(COLUMN_START, rect->left); in mt9m111_setup_geometry()
406 ret = reg_write(ROW_START, rect->top); in mt9m111_setup_geometry()
409 ret = reg_write(WINDOW_WIDTH, rect->width); in mt9m111_setup_geometry()
411 ret = reg_write(WINDOW_HEIGHT, rect->height); in mt9m111_setup_geometry()
417 rect, width, height); in mt9m111_setup_geometry()
420 rect, width, height); in mt9m111_setup_geometry()
424 __func__, code, rect->width, rect->height, rect->left, rect->top, in mt9m111_setup_geometry()
457 struct v4l2_rect rect = sel->r; in mt9m111_set_selection() local
473 v4l_bound_align_image(&rect.width, 2, MT9M111_MAX_WIDTH, align, in mt9m111_set_selection()
474 &rect.height, 2, MT9M111_MAX_HEIGHT, align, 0); in mt9m111_set_selection()
475 rect.left = clamp(rect.left, MT9M111_MIN_DARK_COLS, in mt9m111_set_selection()
477 (__s32)rect.width); in mt9m111_set_selection()
478 rect.top = clamp(rect.top, MT9M111_MIN_DARK_ROWS, in mt9m111_set_selection()
480 (__s32)rect.height); in mt9m111_set_selection()
482 width = min(mt9m111->width, rect.width); in mt9m111_set_selection()
483 height = min(mt9m111->height, rect.height); in mt9m111_set_selection()
485 ret = mt9m111_setup_geometry(mt9m111, &rect, width, height, mt9m111->fmt->code); in mt9m111_set_selection()
487 mt9m111->rect = rect; in mt9m111_set_selection()
513 sel->r = mt9m111->rect; in mt9m111_get_selection()
634 struct v4l2_rect *rect = &mt9m111->rect; in mt9m111_set_fmt() local
654 rect->width = ALIGN(rect->width, 2); in mt9m111_set_fmt()
655 rect->height = ALIGN(rect->height, 2); in mt9m111_set_fmt()
660 mf->width = rect->width; in mt9m111_set_fmt()
661 mf->height = rect->height; in mt9m111_set_fmt()
664 if (mf->width > rect->width) in mt9m111_set_fmt()
665 mf->width = rect->width; in mt9m111_set_fmt()
666 if (mf->height > rect->height) in mt9m111_set_fmt()
667 mf->height = rect->height; in mt9m111_set_fmt()
685 ret = mt9m111_setup_geometry(mt9m111, rect, mf->width, mf->height, mf->code); in mt9m111_set_fmt()
702 struct v4l2_rect *sensor_rect = &mt9m111->rect; in mt9m111_find_mode()
941 mt9m111_setup_geometry(mt9m111, &mt9m111->rect, in mt9m111_restore_state()
1329 mt9m111->rect.left = MT9M111_MIN_DARK_COLS; in mt9m111_probe()
1330 mt9m111->rect.top = MT9M111_MIN_DARK_ROWS; in mt9m111_probe()
1331 mt9m111->rect.width = MT9M111_MAX_WIDTH; in mt9m111_probe()
1332 mt9m111->rect.height = MT9M111_MAX_HEIGHT; in mt9m111_probe()
1333 mt9m111->width = mt9m111->rect.width; in mt9m111_probe()
1334 mt9m111->height = mt9m111->rect.height; in mt9m111_probe()