mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
[media] v4l: Implement v4l2_subdev_link_validate()
v4l2_subdev_link_validate() is the default op for validating a link. In V4L2 subdev context, it is used to call a pad op which performs the proper link check without much extra work. Signed-off-by: Sakari Ailus <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This commit is contained in:
parent
48398f932b
commit
8227c92b69
3 changed files with 88 additions and 0 deletions
|
|
@ -470,6 +470,11 @@ struct v4l2_subdev_pad_ops {
|
|||
struct v4l2_subdev_selection *sel);
|
||||
int (*set_selection)(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
|
||||
struct v4l2_subdev_selection *sel);
|
||||
#ifdef CONFIG_MEDIA_CONTROLLER
|
||||
int (*link_validate)(struct v4l2_subdev *sd, struct media_link *link,
|
||||
struct v4l2_subdev_format *source_fmt,
|
||||
struct v4l2_subdev_format *sink_fmt);
|
||||
#endif /* CONFIG_MEDIA_CONTROLLER */
|
||||
};
|
||||
|
||||
struct v4l2_subdev_ops {
|
||||
|
|
@ -602,6 +607,13 @@ static inline void *v4l2_get_subdev_hostdata(const struct v4l2_subdev *sd)
|
|||
return sd->host_priv;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MEDIA_CONTROLLER
|
||||
int v4l2_subdev_link_validate_default(struct v4l2_subdev *sd,
|
||||
struct media_link *link,
|
||||
struct v4l2_subdev_format *source_fmt,
|
||||
struct v4l2_subdev_format *sink_fmt);
|
||||
int v4l2_subdev_link_validate(struct media_link *link);
|
||||
#endif /* CONFIG_MEDIA_CONTROLLER */
|
||||
void v4l2_subdev_init(struct v4l2_subdev *sd,
|
||||
const struct v4l2_subdev_ops *ops);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue