Lines Matching refs:graph

103 static void stack_push(struct media_entity_graph *graph,  in stack_push()  argument
106 if (graph->top == MEDIA_ENTITY_ENUM_MAX_DEPTH - 1) { in stack_push()
110 graph->top++; in stack_push()
111 graph->stack[graph->top].link = 0; in stack_push()
112 graph->stack[graph->top].entity = entity; in stack_push()
115 static struct media_entity *stack_pop(struct media_entity_graph *graph) in stack_pop() argument
119 entity = graph->stack[graph->top].entity; in stack_pop()
120 graph->top--; in stack_pop()
138 void media_entity_graph_walk_start(struct media_entity_graph *graph, in media_entity_graph_walk_start() argument
141 graph->top = 0; in media_entity_graph_walk_start()
142 graph->stack[graph->top].entity = NULL; in media_entity_graph_walk_start()
143 bitmap_zero(graph->entities, MEDIA_ENTITY_ENUM_MAX_ID); in media_entity_graph_walk_start()
148 __set_bit(entity->id, graph->entities); in media_entity_graph_walk_start()
149 stack_push(graph, entity); in media_entity_graph_walk_start()
166 media_entity_graph_walk_next(struct media_entity_graph *graph) in media_entity_graph_walk_next() argument
168 if (stack_top(graph) == NULL) in media_entity_graph_walk_next()
176 while (link_top(graph) < stack_top(graph)->num_links) { in media_entity_graph_walk_next()
177 struct media_entity *entity = stack_top(graph); in media_entity_graph_walk_next()
178 struct media_link *link = &entity->links[link_top(graph)]; in media_entity_graph_walk_next()
183 link_top(graph)++; in media_entity_graph_walk_next()
193 if (__test_and_set_bit(next->id, graph->entities)) { in media_entity_graph_walk_next()
194 link_top(graph)++; in media_entity_graph_walk_next()
199 link_top(graph)++; in media_entity_graph_walk_next()
200 stack_push(graph, next); in media_entity_graph_walk_next()
203 return stack_pop(graph); in media_entity_graph_walk_next()
229 struct media_entity_graph graph; in media_entity_pipeline_start() local
235 media_entity_graph_walk_start(&graph, entity); in media_entity_pipeline_start()
237 while ((entity = media_entity_graph_walk_next(&graph))) { in media_entity_pipeline_start()
315 media_entity_graph_walk_start(&graph, entity_err); in media_entity_pipeline_start()
317 while ((entity_err = media_entity_graph_walk_next(&graph))) { in media_entity_pipeline_start()
351 struct media_entity_graph graph; in media_entity_pipeline_stop() local
355 media_entity_graph_walk_start(&graph, entity); in media_entity_pipeline_stop()
357 while ((entity = media_entity_graph_walk_next(&graph))) { in media_entity_pipeline_stop()