aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/platform/vimc/vimc-common.h
diff options
context:
space:
mode:
authorHelen Fornazier <helen.koike@collabora.com>2017-06-19 14:00:14 -0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-06-23 09:05:38 -0300
commit288a22d45c631f5be5e1c8b83977a78841083d3c (patch)
tree976410940d5a414d438afbcc53eedb386c9dacd4 /drivers/media/platform/vimc/vimc-common.h
parentbf5fb95c261de259e912e49973c66347a0a5b3d3 (diff)
[media] vimc: common: Add vimc_link_validate
All links will be checked in the same way. Adding a helper function for that Signed-off-by: Helen Koike <helen.koike@collabora.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform/vimc/vimc-common.h')
-rw-r--r--drivers/media/platform/vimc/vimc-common.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/media/platform/vimc/vimc-common.h b/drivers/media/platform/vimc/vimc-common.h
index 73e7e9479956..60ebde28f56b 100644
--- a/drivers/media/platform/vimc/vimc-common.h
+++ b/drivers/media/platform/vimc/vimc-common.h
@@ -45,6 +45,9 @@ struct vimc_pix_map {
* @pads: the list of pads of the node
* @destroy: callback to destroy the node
* @process_frame: callback send a frame to that node
+ * @vdev_get_format: callback that returns the current format a pad, used
+ * only when is_media_entity_v4l2_video_device(ent) returns
+ * true
*
* Each node of the topology must create a vimc_ent_device struct. Depending on
* the node it will be of an instance of v4l2_subdev or video_device struct
@@ -60,6 +63,8 @@ struct vimc_ent_device {
void (*destroy)(struct vimc_ent_device *);
void (*process_frame)(struct vimc_ent_device *ved,
struct media_pad *sink, const void *frame);
+ void (*vdev_get_format)(struct vimc_ent_device *ved,
+ struct v4l2_pix_format *fmt);
};
/**
@@ -160,4 +165,13 @@ int vimc_ent_sd_register(struct vimc_ent_device *ved,
void vimc_ent_sd_unregister(struct vimc_ent_device *ved,
struct v4l2_subdev *sd);
+/**
+ * vimc_link_validate - validates a media link
+ *
+ * @link: pointer to &struct media_link
+ *
+ * This function calls validates if a media link is valid for streaming.
+ */
+int vimc_link_validate(struct media_link *link);
+
#endif