linux-stable/drivers/media
Laurent Pinchart 5680fe45d6 media: mc-entity: Add a new helper function to get a remote pad
The media_entity_remote_pad_first() helper function returns the first
remote pad it finds connected to a given pad. Beside being possibly
non-deterministic (as it stops at the first enabled link), the fact that
it returns the first match makes it unsuitable for drivers that need to
guarantee that a single link is enabled, for instance when an entity can
process data from one of multiple sources at a time.

For those use cases, add a new helper function,
media_entity_remote_pad_unique(), that operates on an entity and returns
a remote pad, with a guarantee that only one link is enabled. To ease
its use in drivers, also add an inline wrapper that locates source pads
specifically. A wrapper that locates sink pads can easily be added when
needed.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-07-17 11:23:10 +01:00
..
cec media: platform: cros-ec: Add kinox to the match table 2022-06-27 08:54:29 +01:00
common media: videobuf2: Introduce vb2_find_buffer() 2022-07-17 11:10:11 +01:00
dvb-core media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
dvb-frontends media: media/*/Kconfig: sort entries 2022-03-18 05:58:35 +01:00
firewire media: Makefiles: remove extra spaces 2022-03-12 16:59:52 +01:00
i2c media: mc-entity: Rename media_entity_remote_pad() to media_pad_remote_pad_first() 2022-07-17 11:21:35 +01:00
mc media: mc-entity: Add a new helper function to get a remote pad 2022-07-17 11:23:10 +01:00
mmc media: media/*/Kconfig: sort entries 2022-03-18 05:58:35 +01:00
pci media: mc-entity: Rename media_entity_remote_pad() to media_pad_remote_pad_first() 2022-07-17 11:21:35 +01:00
platform media: mc-entity: Rename media_entity_remote_pad() to media_pad_remote_pad_first() 2022-07-17 11:21:35 +01:00
radio media: make RADIO_ADAPTERS tristate 2022-05-13 11:02:19 +02:00
rc media: lirc: ensure lirc device receives repeats 2022-07-15 14:55:23 +01:00
spi media updates for v5.18-rc1 2022-03-23 14:51:35 -07:00
test-drivers media: mc-entity: Rename media_entity_remote_pad() to media_pad_remote_pad_first() 2022-07-17 11:21:35 +01:00
tuners media: si2157: unknown chip version Si2147-A30 ROM 0x50 2022-04-09 17:45:49 +02:00
usb media: uvcvideo: Remove unneeded goto 2022-07-16 08:53:22 +01:00
v4l2-core media: v4l2-async: Add notifier operation to destroy asd instances 2022-07-17 11:20:08 +01:00
Kconfig media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
Makefile media: Makefiles: remove extra spaces 2022-03-12 16:59:52 +01:00