diff options
| author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2024-01-15 00:30:02 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-04-03 15:19:25 +0200 |
| commit | cff51913c5cc42b45ea010e91eb0c1e349d4292f (patch) | |
| tree | 5ed39672d5032fe7d8539e0d298576ede98bbf62 /include/media | |
| parent | f29793c33984f4d41448ba55da7432b153dabd89 (diff) | |
| download | linux-cff51913c5cc42b45ea010e91eb0c1e349d4292f.tar.gz linux-cff51913c5cc42b45ea010e91eb0c1e349d4292f.tar.bz2 linux-cff51913c5cc42b45ea010e91eb0c1e349d4292f.zip | |
media: mc: Add num_links flag to media_pad
[ Upstream commit baeddf94aa61879b118f2faa37ed126d772670cc ]
Maintain a counter of the links connected to a pad in the media_pad
structure. This helps checking if a pad is connected to anything, which
will be used in the pipeline building code.
Cc: stable@vger.kernel.org # 6.1
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/media')
| -rw-r--r-- | include/media/media-entity.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/media/media-entity.h b/include/media/media-entity.h index 28c9de8a1f34..03bb0963942b 100644 --- a/include/media/media-entity.h +++ b/include/media/media-entity.h @@ -205,6 +205,7 @@ enum media_pad_signal_type { * @graph_obj: Embedded structure containing the media object common data * @entity: Entity this pad belongs to * @index: Pad index in the entity pads array, numbered from 0 to n + * @num_links: Number of links connected to this pad * @sig_type: Type of the signal inside a media pad * @flags: Pad flags, as defined in * :ref:`include/uapi/linux/media.h <media_header>` @@ -216,6 +217,7 @@ struct media_pad { struct media_gobj graph_obj; /* must be first field in struct */ struct media_entity *entity; u16 index; + u16 num_links; enum media_pad_signal_type sig_type; unsigned long flags; |
