media: v4l2-dev: Add videodev wrappers for media pipelines
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Wed, 31 Aug 2022 14:13:32 +0000 (16:13 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Sat, 24 Sep 2022 07:13:23 +0000 (09:13 +0200)
commit340eba477f0e51bed997e94bd3c2b728a0c6e1ac
treec8b981ccedb4ab479d55ad74edf2bf3bdff0e47d
parent72b603357ae461c0f19ca05d6624b4afd5c74b47
media: v4l2-dev: Add videodev wrappers for media pipelines

With the upcoming stream related improvements to the pipelines, the
pipelines are moved from media entities to media pads. As the drivers
currently use the pipelines with the entity based model, moving the
pipelines to pads will cause changes to the drivers.

However, most of the uses of media pipelines are related to a video
device (a DMA engine) with a single pad, and thus there's never a need
to support multiple pads in these use cases. We can avoid pushing the
complexities of the pad based model to the drivers by adding video
device wrappers for the pipeline related functions.

This patch adds a number of wrappers to media_pipeline functions, all of
which take a video_device as a parameter (instead of a media_entity),
and verify that there's just one pad.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/v4l2-core/v4l2-dev.c
include/media/v4l2-dev.h