diff options
author | Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> | 2021-07-15 16:39:19 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2023-01-22 11:34:51 +0300 |
commit | 33c0ddbe56905c98b43d7141f2fe67ae69afba3c (patch) | |
tree | 3f923af797d660f4551ca9e7b132270f56b52324 /include/media/v4l2-subdev.h | |
parent | 8a54644571fed484d55b3807f25f64cba8a9ca77 (diff) | |
download | linux-33c0ddbe56905c98b43d7141f2fe67ae69afba3c.tar.xz |
media: subdev: add v4l2_subdev_has_pad_interdep()
Add a v4l2_subdev_has_pad_interdep() helper function which can be used
for media_entity_operations.has_pad_interdep op.
It considers two pads interdependent if there is an active route between
pad0 and pad1.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'include/media/v4l2-subdev.h')
-rw-r--r-- | include/media/v4l2-subdev.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index 67e55758f037..0bd674a8f84d 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h @@ -1247,6 +1247,24 @@ int v4l2_subdev_link_validate_default(struct v4l2_subdev *sd, int v4l2_subdev_link_validate(struct media_link *link); /** + * v4l2_subdev_has_pad_interdep - MC has_pad_interdep implementation for subdevs + * + * @entity: pointer to &struct media_entity + * @pad0: pad number for the first pad + * @pad1: pad number for the second pad + * + * This function is an implementation of the + * media_entity_operations.has_pad_interdep operation for subdevs that + * implement the multiplexed streams API (as indicated by the + * V4L2_SUBDEV_FL_STREAMS subdev flag). + * + * It considers two pads interdependent if there is an active route between pad0 + * and pad1. + */ +bool v4l2_subdev_has_pad_interdep(struct media_entity *entity, + unsigned int pad0, unsigned int pad1); + +/** * __v4l2_subdev_state_alloc - allocate v4l2_subdev_state * * @sd: pointer to &struct v4l2_subdev for which the state is being allocated. |