Lines Matching full:format
48 * xvip_get_format_by_code - Retrieve format information for a media bus code
49 * @code: the format media bus code
51 * Return: a pointer to the format information structure corresponding to the
52 * given V4L2 media bus format @code, or ERR_PTR if no corresponding format can
60 const struct xvip_video_format *format = &xvip_video_formats[i]; in xvip_get_format_by_code() local
62 if (format->code == code) in xvip_get_format_by_code()
63 return format; in xvip_get_format_by_code()
71 * xvip_get_format_by_fourcc - Retrieve format information for a 4CC
72 * @fourcc: the format 4CC
74 * Return: a pointer to the format information structure corresponding to the
75 * given V4L2 format @fourcc. If not found, return a pointer to the first
76 * available format (V4L2_PIX_FMT_YUYV).
83 const struct xvip_video_format *format = &xvip_video_formats[i]; in xvip_get_format_by_fourcc() local
85 if (format->fourcc == fourcc) in xvip_get_format_by_fourcc()
86 return format; in xvip_get_format_by_fourcc()
94 * xvip_of_get_format - Parse a device tree node and return format information
97 * Read the xlnx,video-format, xlnx,video-width and xlnx,cfa-pattern properties
99 * format information.
101 * Return: a pointer to the format information structure corresponding to the
102 * format name and width, or ERR_PTR if no corresponding format can be found.
112 ret = of_property_read_u32(node, "xlnx,video-format", &vf_code); in xvip_of_get_format()
124 const struct xvip_video_format *format = &xvip_video_formats[i]; in xvip_of_get_format() local
126 if (format->vf_code != vf_code || format->width != width) in xvip_of_get_format()
130 strcmp(pattern, format->pattern)) in xvip_of_get_format()
133 return format; in xvip_of_get_format()
141 * xvip_set_format_size - Set the media bus frame format size
142 * @format: V4L2 frame format on media bus
143 * @fmt: media bus format
145 * Set the media bus frame format size. The width / height from the subdevice
146 * format are set to the given media bus format. The new format size is stored
147 * in @format. The width and height are clamped using default min / max values.
149 void xvip_set_format_size(struct v4l2_mbus_framefmt *format, in xvip_set_format_size() argument
152 format->width = clamp_t(unsigned int, fmt->format.width, in xvip_set_format_size()
154 format->height = clamp_t(unsigned int, fmt->format.height, in xvip_set_format_size()
235 * xvip_enum_mbus_code - Enumerate the media format code
241 * pad format code. This function only works for subdevices with fixed format
242 * on all pads. Subdevices with multiple format should have their own
245 * Return: 0 if the media bus code is found, or -EINVAL if the format index
252 struct v4l2_mbus_framefmt *format; in xvip_enum_mbus_code() local
263 format = v4l2_subdev_get_try_format(subdev, sd_state, code->pad); in xvip_enum_mbus_code()
265 code->code = format->code; in xvip_enum_mbus_code()
279 * pad, and that the format on the source pad is always identical to the
280 * format on the sink pad. Entities with different requirements need to
290 struct v4l2_mbus_framefmt *format; in xvip_enum_frame_size() local
298 format = v4l2_subdev_get_try_format(subdev, sd_state, fse->pad); in xvip_enum_frame_size()
300 if (fse->index || fse->code != format->code) in xvip_enum_frame_size()
312 fse->min_width = format->width; in xvip_enum_frame_size()
313 fse->max_width = format->width; in xvip_enum_frame_size()
314 fse->min_height = format->height; in xvip_enum_frame_size()
315 fse->max_height = format->height; in xvip_enum_frame_size()