Lines Matching full:sel
409 struct v4l2_subdev_selection *sel) in ipu6_isys_csi2_set_sel() argument
417 if (sel->pad == CSI2_PAD_SINK || sel->target != V4L2_SEL_TGT_CROP) in ipu6_isys_csi2_set_sel()
421 sel->pad, in ipu6_isys_csi2_set_sel()
422 sel->stream); in ipu6_isys_csi2_set_sel()
426 src_ffmt = v4l2_subdev_state_get_format(state, sel->pad, sel->stream); in ipu6_isys_csi2_set_sel()
430 crop = v4l2_subdev_state_get_crop(state, sel->pad, sel->stream); in ipu6_isys_csi2_set_sel()
435 sel->r.left = 0; in ipu6_isys_csi2_set_sel()
436 sel->r.width = sink_ffmt->width; in ipu6_isys_csi2_set_sel()
439 sel->r.top &= ~1; in ipu6_isys_csi2_set_sel()
440 sel->r.height = clamp(sel->r.height & ~1, IPU6_ISYS_MIN_HEIGHT, in ipu6_isys_csi2_set_sel()
441 sink_ffmt->height - sel->r.top); in ipu6_isys_csi2_set_sel()
442 *crop = sel->r; in ipu6_isys_csi2_set_sel()
445 src_ffmt->width = sel->r.width; in ipu6_isys_csi2_set_sel()
446 src_ffmt->height = sel->r.height; in ipu6_isys_csi2_set_sel()
449 sel->r.left, in ipu6_isys_csi2_set_sel()
450 sel->r.top); in ipu6_isys_csi2_set_sel()
451 dev_dbg(dev, "set crop for %s sel: %d,%d,%d,%d code: 0x%x\n", in ipu6_isys_csi2_set_sel()
452 sd->name, sel->r.left, sel->r.top, sel->r.width, sel->r.height, in ipu6_isys_csi2_set_sel()
460 struct v4l2_subdev_selection *sel) in ipu6_isys_csi2_get_sel() argument
466 if (sd->entity.pads[sel->pad].flags & MEDIA_PAD_FL_SINK) in ipu6_isys_csi2_get_sel()
470 sel->pad, in ipu6_isys_csi2_get_sel()
471 sel->stream); in ipu6_isys_csi2_get_sel()
475 crop = v4l2_subdev_state_get_crop(state, sel->pad, sel->stream); in ipu6_isys_csi2_get_sel()
479 switch (sel->target) { in ipu6_isys_csi2_get_sel()
482 sel->r.left = 0; in ipu6_isys_csi2_get_sel()
483 sel->r.top = 0; in ipu6_isys_csi2_get_sel()
484 sel->r.width = sink_ffmt->width; in ipu6_isys_csi2_get_sel()
485 sel->r.height = sink_ffmt->height; in ipu6_isys_csi2_get_sel()
488 sel->r = *crop; in ipu6_isys_csi2_get_sel()