Lines Matching defs:fmt
126 struct v4l2_mbus_framefmt fmt;
163 switch (sensor->fmt.code) {
204 u16 x = clamp((AR0521_WIDTH_MAX - sensor->fmt.width) / 2,
206 u16 y = clamp(((AR0521_HEIGHT_MAX - sensor->fmt.height) / 2) & ~1,
212 be(sensor->fmt.height + sensor->ctrls.vblank->val),
213 be(sensor->fmt.width + sensor->ctrls.hblank->val),
216 be(x + sensor->fmt.width - 1),
217 be(y + sensor->fmt.height - 1),
218 be(sensor->fmt.width),
219 be(sensor->fmt.height)
427 static void ar0521_adj_fmt(struct v4l2_mbus_framefmt *fmt)
429 fmt->width = clamp(ALIGN(fmt->width, 4), AR0521_WIDTH_MIN,
431 fmt->height = clamp(ALIGN(fmt->height, 4), AR0521_HEIGHT_MIN,
433 fmt->code = MEDIA_BUS_FMT_SGRBG8_1X8;
434 fmt->field = V4L2_FIELD_NONE;
435 fmt->colorspace = V4L2_COLORSPACE_SRGB;
436 fmt->ycbcr_enc = V4L2_YCBCR_ENC_DEFAULT;
437 fmt->quantization = V4L2_QUANTIZATION_FULL_RANGE;
438 fmt->xfer_func = V4L2_XFER_FUNC_DEFAULT;
446 struct v4l2_mbus_framefmt *fmt;
451 fmt = v4l2_subdev_get_try_format(&sensor->sd, sd_state, 0
454 fmt = &sensor->fmt;
456 format->format = *fmt;
475 struct v4l2_mbus_framefmt *fmt;
477 fmt = v4l2_subdev_get_try_format(sd, sd_state, 0 /* pad */);
478 *fmt = format->format;
485 sensor->fmt = format->format;
492 max_hblank = AR0521_TOTAL_WIDTH_MAX - sensor->fmt.width;
505 max_vblank = AR0521_TOTAL_HEIGHT_MAX - sensor->fmt.height;
518 exposure_max = sensor->fmt.height + AR0521_HEIGHT_BLANKING_MIN - 4;
541 exp_max = sensor->fmt.height + ctrl->val - 4;
927 code->code = sensor->fmt.code;
1064 sensor->fmt.width = AR0521_WIDTH_MAX;
1065 sensor->fmt.height = AR0521_HEIGHT_MAX;
1144 ar0521_adj_fmt(&sensor->fmt);