Lines Matching refs:graph
279 static void stack_push(struct media_graph *graph,
282 if (graph->top == MEDIA_ENTITY_ENUM_MAX_DEPTH - 1) {
286 graph->top++;
287 graph->stack[graph->top].link = entity->links.next;
288 graph->stack[graph->top].entity = entity;
291 static struct media_entity *stack_pop(struct media_graph *graph)
295 entity = graph->stack[graph->top].entity;
296 graph->top--;
305 * media_graph_walk_init - Allocate resources for graph walk
306 * @graph: Media graph structure that will be used to walk the graph
309 * Reserve resources for graph walk in media device's current
316 struct media_graph *graph, struct media_device *mdev)
318 return media_entity_enum_init(&graph->ent_enum, mdev);
323 * media_graph_walk_cleanup - Release resources related to graph walking
324 * @graph: Media graph structure that was used to walk the graph
326 void media_graph_walk_cleanup(struct media_graph *graph)
328 media_entity_enum_cleanup(&graph->ent_enum);
332 void media_graph_walk_start(struct media_graph *graph,
335 media_entity_enum_zero(&graph->ent_enum);
336 media_entity_enum_set(&graph->ent_enum, entity);
338 graph->top = 0;
339 graph->stack[graph->top].entity = NULL;
340 stack_push(graph, entity);
342 "begin graph walk at '%s'\n", entity->name);
346 static void media_graph_walk_iter(struct media_graph *graph)
348 struct media_entity *entity = stack_top(graph);
352 link = list_entry(link_top(graph), typeof(*link), list);
356 link_top(graph) = link_top(graph)->next;
362 link_top(graph) = link_top(graph)->next;
374 if (media_entity_enum_test_and_set(&graph->ent_enum, next)) {
375 link_top(graph) = link_top(graph)->next;
383 link_top(graph) = link_top(graph)->next;
384 stack_push(graph, next);
390 struct media_entity *media_graph_walk_next(struct media_graph *graph)
394 if (stack_top(graph) == NULL)
402 while (link_top(graph) != &stack_top(graph)->links)
403 media_graph_walk_iter(graph);
405 entity = stack_pop(graph);
418 * The pipeline traversal stack stores pads that are reached during graph
424 * internal pad dependencies in the entity, and then links in the graph. It
707 * Populate the media pipeline by walking the media graph, starting
780 * with media_pipeline_pad instances for each pad found during graph
881 * Link validation on graph failed. We revert what we did and
1141 /* Initialize graph object embedded at the new link */
1145 /* Create the backlink. Backlinks are used to help graph traversal and
1159 /* Initialize graph object embedded at the new link */
1567 /* Initialize graph object embedded at the new link */
1635 /* Initialize graph object embedded in the new link */