Lines Matching defs:fmt
244 const struct tc358746_format *fmt = &tc358746_formats[i];
246 if ((pad == TC358746_SOURCE && fmt->csi_format) ||
249 return fmt;
263 const struct tc358746_format *fmt = &tc358746_formats[i];
265 if (pad == TC358746_SINK && fmt->code == code)
266 return fmt;
268 if (pad == TC358746_SOURCE && !fmt->csi_format)
271 if (fmt->code == code)
272 return fmt;
423 const struct tc358746_format *fmt;
431 fmt = tc358746_get_format_by_code(TC358746_SINK, mbusfmt->code);
434 val = PDFMT(fmt->pdformat);
440 val = PDATAF(fmt->pdataf);
441 dev_dbg(dev, "CONFCTL[PDATAF]: 0x%x\n", fmt->pdataf);
453 val = mbusfmt->width * fmt->bpp / 8;
746 struct v4l2_mbus_framefmt *fmt;
748 fmt = v4l2_subdev_get_pad_format(sd, state, TC358746_SINK);
749 *fmt = tc358746_def_fmt;
751 fmt = v4l2_subdev_get_pad_format(sd, state, TC358746_SOURCE);
752 *fmt = tc358746_def_fmt;
753 fmt->code = tc358746_src_mbus_code(tc358746_def_fmt.code);
762 const struct tc358746_format *fmt;
764 fmt = tc358746_get_format_by_idx(code->pad, code->index);
765 if (IS_ERR(fmt))
766 return PTR_ERR(fmt);
768 code->code = fmt->code;
778 const struct tc358746_format *fmt;
786 fmt = tc358746_get_format_by_code(format->pad, format->format.code);
787 if (IS_ERR(fmt))
788 fmt = tc358746_get_format_by_code(format->pad, tc358746_def_fmt.code);
790 format->format.code = fmt->code;
893 const struct tc358746_format *fmt;
907 fmt = tc358746_get_format_by_code(TC358746_SINK, mbusfmt->code);
918 source_bitrate = source_link_freq * fmt->bus_width;
960 fifo_sz *= fmt->bpp;