Lines Matching refs:_fmt
94 const struct sun4i_csi_format *_fmt; in _sun4i_csi_try_fmt() local
98 _fmt = sun4i_csi_find_format(&pix->pixelformat, NULL); in _sun4i_csi_try_fmt()
99 if (!_fmt) in _sun4i_csi_try_fmt()
100 _fmt = &sun4i_csi_formats[0]; in _sun4i_csi_try_fmt()
109 pix->num_planes = _fmt->num_planes; in _sun4i_csi_try_fmt()
110 pix->pixelformat = _fmt->fourcc; in _sun4i_csi_try_fmt()
113 width = ALIGN(pix->width, _fmt->hsub); in _sun4i_csi_try_fmt()
114 height = ALIGN(pix->height, _fmt->vsub); in _sun4i_csi_try_fmt()
117 pix->width = clamp(width, _fmt->hsub, CSI_MAX_WIDTH); in _sun4i_csi_try_fmt()
118 pix->height = clamp(height, _fmt->vsub, CSI_MAX_HEIGHT); in _sun4i_csi_try_fmt()
120 for (i = 0; i < _fmt->num_planes; i++) { in _sun4i_csi_try_fmt()
121 unsigned int hsub = i > 0 ? _fmt->hsub : 1; in _sun4i_csi_try_fmt()
122 unsigned int vsub = i > 0 ? _fmt->vsub : 1; in _sun4i_csi_try_fmt()
125 bpl = pix->width / hsub * _fmt->bpp[i] / 8; in _sun4i_csi_try_fmt()