media: v4l: async: Allow multiple connections between entities
authorSakari Ailus <sakari.ailus@linux.intel.com>
Fri, 19 May 2023 11:44:03 +0000 (13:44 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 28 Jul 2023 08:48:49 +0000 (10:48 +0200)
commit28a1295795d85a25f2e7dd391c43969e95fcb341
tree4b38e6a9c1c10029d80b579e1bdfd42bfe80427b
parentc91fd7b7a8ae17ab8be0b6e765e4a38783749330
media: v4l: async: Allow multiple connections between entities

When the v4l2-async framework was introduced, the use case for it was to
connect a camera sensor with a parallel receiver. Both tended to be rather
simple devices with a single connection between them.

The framework has been since improved in multiple ways but there are
limitations that have remained, for instance the assumption an async
sub-device is connected towards a single notifier and via a single link
only.

This patch enables connecting a sub-device to one or more notifiers
simultaneously, with one or more connections per notifier. The notifier
information is moved from the sub-device to the connection and the
connections in sub-device are no longer a pointer but a linked list.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Tested-by: Philipp Zabel <p.zabel@pengutronix.de> # imx6qp
Tested-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> # rcar + adv746x
Tested-by: Aishwarya Kothari <aishwarya.kothari@toradex.com> # Apalis i.MX6Q with TC358743
Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> # Renesas RZ/G2L SMARC
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/v4l2-core/v4l2-async.c
include/media/v4l2-async.h
include/media/v4l2-subdev.h