Commit 08613c54 authored by Sakari Ailus's avatar Sakari Ailus Committed by Mauro Carvalho Chehab

[media] v4l: xilinx: Use the new media graph walk interface

The media graph walk requires initialisation and cleanup soon. Update the
users to perform the soon necessary API calls.
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Cc: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent fd7e5309
...@@ -182,10 +182,17 @@ static int xvip_pipeline_validate(struct xvip_pipeline *pipe, ...@@ -182,10 +182,17 @@ static int xvip_pipeline_validate(struct xvip_pipeline *pipe,
struct media_device *mdev = entity->graph_obj.mdev; struct media_device *mdev = entity->graph_obj.mdev;
unsigned int num_inputs = 0; unsigned int num_inputs = 0;
unsigned int num_outputs = 0; unsigned int num_outputs = 0;
int ret;
mutex_lock(&mdev->graph_mutex); mutex_lock(&mdev->graph_mutex);
/* Walk the graph to locate the video nodes. */ /* Walk the graph to locate the video nodes. */
ret = media_entity_graph_walk_init(&graph, entity->graph_obj.mdev);
if (ret) {
mutex_unlock(&mdev->graph_mutex);
return ret;
}
media_entity_graph_walk_start(&graph, entity); media_entity_graph_walk_start(&graph, entity);
while ((entity = media_entity_graph_walk_next(&graph))) { while ((entity = media_entity_graph_walk_next(&graph))) {
...@@ -206,6 +213,8 @@ static int xvip_pipeline_validate(struct xvip_pipeline *pipe, ...@@ -206,6 +213,8 @@ static int xvip_pipeline_validate(struct xvip_pipeline *pipe,
mutex_unlock(&mdev->graph_mutex); mutex_unlock(&mdev->graph_mutex);
media_entity_graph_walk_cleanup(&graph);
/* We need exactly one output and zero or one input. */ /* We need exactly one output and zero or one input. */
if (num_outputs != 1 || num_inputs > 1) if (num_outputs != 1 || num_inputs > 1)
return -EPIPE; return -EPIPE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment