Lines Matching full:pad

116 		struct media_pad *pad = gobj_to_pad(gobj);  in dev_dbg_obj()  local
121 pad->flags & MEDIA_PAD_FL_SINK ? "sink " : "", in dev_dbg_obj()
122 pad->flags & MEDIA_PAD_FL_SOURCE ? "source " : "", in dev_dbg_obj()
123 pad->entity->name, pad->index); in dev_dbg_obj()
246 * @pad0: The first pad index
247 * @pad1: The second pad index
251 * and enabling one of the pads means that the other pad will become "locked"
259 * One of @pad0 and @pad1 must be a sink pad and the other one a source pad.
433 * When a new pad is reached, an entry is pushed on the top of the stack and
434 * points to the incoming pad and the first link of the entity.
437 * internal pad dependencies in the entity, and then links in the graph. It
439 * links that originate from a pad that is internally connected to the incoming
440 * pad, as reported by the media_entity_has_pad_interdep() function.
446 * @pad: The media pad being visited
450 struct media_pad *pad; member
513 struct media_pad *pad) in media_pipeline_walk_push() argument
526 entry->pad = pad; in media_pipeline_walk_push()
527 entry->links = pad->entity->links.next; in media_pipeline_walk_push()
531 walk->stack.top, pad->entity->name, pad->index); in media_pipeline_walk_push()
550 if (entry->links->next == &entry->pad->entity->links) { in media_pipeline_walk_pop()
574 /* Add a pad to the pipeline and push it to the stack. */
577 struct media_pad *pad) in media_pipeline_add_pad() argument
582 if (ppad->pad == pad) { in media_pipeline_add_pad()
583 dev_dbg(pad->graph_obj.mdev->dev, in media_pipeline_add_pad()
584 "media pipeline: already contains pad '%s':%u\n", in media_pipeline_add_pad()
585 pad->entity->name, pad->index); in media_pipeline_add_pad()
595 ppad->pad = pad; in media_pipeline_add_pad()
599 dev_dbg(pad->graph_obj.mdev->dev, in media_pipeline_add_pad()
600 "media pipeline: added pad '%s':%u\n", in media_pipeline_add_pad()
601 pad->entity->name, pad->index); in media_pipeline_add_pad()
603 return media_pipeline_walk_push(walk, pad); in media_pipeline_add_pad()
618 origin = entry->pad; in media_pipeline_explore_next_link()
633 /* Get the local pad and remote pad. */ in media_pipeline_explore_next_link()
643 * Skip links that originate from a different pad than the incoming pad in media_pipeline_explore_next_link()
644 * that is not connected internally in the entity to the incoming pad. in media_pipeline_explore_next_link()
655 * Add the local pad of the link to the pipeline and push it to the in media_pipeline_explore_next_link()
662 /* Similarly, add the remote pad, but only if the link is enabled. */ in media_pipeline_explore_next_link()
690 * Skip the origin pad (already handled), pad that have links in media_pipeline_explore_next_link()
719 struct media_pad *pad) in media_pipeline_populate() argument
727 * from @pad. in media_pipeline_populate()
730 pipe->mdev = pad->graph_obj.mdev; in media_pipeline_populate()
734 ret = media_pipeline_add_pad(pipe, &walk, pad); in media_pipeline_populate()
751 dev_dbg(pad->graph_obj.mdev->dev, in media_pipeline_populate()
755 dev_dbg(pad->graph_obj.mdev->dev, "- '%s':%u\n", in media_pipeline_populate()
756 ppad->pad->entity->name, ppad->pad->index); in media_pipeline_populate()
771 __must_check int __media_pipeline_start(struct media_pad *pad, in __media_pipeline_start() argument
774 struct media_device *mdev = pad->graph_obj.mdev; in __media_pipeline_start()
782 * If the pad is already part of a pipeline, that pipeline must be the in __media_pipeline_start()
785 if (WARN_ON(pad->pipe && pad->pipe != pipe)) in __media_pipeline_start()
799 * with media_pipeline_pad instances for each pad found during graph in __media_pipeline_start()
802 ret = media_pipeline_populate(pipe, pad); in __media_pipeline_start()
812 struct media_pad *pad = ppad->pad; in __media_pipeline_start() local
813 struct media_entity *entity = pad->entity; in __media_pipeline_start()
817 dev_dbg(mdev->dev, "Validating pad '%s':%u\n", pad->entity->name, in __media_pipeline_start()
818 pad->index); in __media_pipeline_start()
821 * 1. Ensure that the pad doesn't already belong to a different in __media_pipeline_start()
824 if (pad->pipe) { in __media_pipeline_start()
825 dev_dbg(mdev->dev, "Failed to start pipeline: pad '%s':%u busy\n", in __media_pipeline_start()
826 pad->entity->name, pad->index); in __media_pipeline_start()
832 * 2. Validate all active links whose sink is the current pad. in __media_pipeline_start()
834 * the connected sink pad to avoid duplicating checks. in __media_pipeline_start()
837 /* Skip links unrelated to the current pad. */ in __media_pipeline_start()
838 if (link->sink != pad && link->source != pad) in __media_pipeline_start()
841 /* Record if the pad has links and enabled links. */ in __media_pipeline_start()
847 * current pad as its sink. in __media_pipeline_start()
852 if (link->sink != pad) in __media_pipeline_start()
878 * 3. If the pad has the MEDIA_PAD_FL_MUST_CONNECT flag set, in __media_pipeline_start()
881 if ((pad->flags & MEDIA_PAD_FL_MUST_CONNECT) && in __media_pipeline_start()
884 "Pad '%s':%u must be connected by an enabled link\n", in __media_pipeline_start()
885 pad->entity->name, pad->index); in __media_pipeline_start()
890 /* Validation passed, store the pipe pointer in the pad. */ in __media_pipeline_start()
891 pad->pipe = pipe; in __media_pipeline_start()
908 err_ppad->pad->pipe = NULL; in __media_pipeline_start()
917 __must_check int media_pipeline_start(struct media_pad *pad, in media_pipeline_start() argument
920 struct media_device *mdev = pad->graph_obj.mdev; in media_pipeline_start()
924 ret = __media_pipeline_start(pad, pipe); in media_pipeline_start()
930 void __media_pipeline_stop(struct media_pad *pad) in __media_pipeline_stop() argument
932 struct media_pipeline *pipe = pad->pipe; in __media_pipeline_stop()
946 ppad->pad->pipe = NULL; in __media_pipeline_stop()
955 void media_pipeline_stop(struct media_pad *pad) in media_pipeline_stop() argument
957 struct media_device *mdev = pad->graph_obj.mdev; in media_pipeline_stop()
960 __media_pipeline_stop(pad); in media_pipeline_stop()
965 __must_check int media_pipeline_alloc_start(struct media_pad *pad) in media_pipeline_alloc_start() argument
967 struct media_device *mdev = pad->graph_obj.mdev; in media_pipeline_alloc_start()
975 * Is the pad already part of a pipeline? If not, we need to allocate in media_pipeline_alloc_start()
978 pipe = media_pad_pipeline(pad); in media_pipeline_alloc_start()
990 ret = __media_pipeline_start(pad, pipe); in media_pipeline_alloc_start()
1004 struct media_pad *pad) in __media_pipeline_pad_iter_next() argument
1006 if (!pad) in __media_pipeline_pad_iter_next()
1012 pad = list_entry(iter->cursor, struct media_pipeline_pad, list)->pad; in __media_pipeline_pad_iter_next()
1015 return pad; in __media_pipeline_pad_iter_next()
1045 entity = ppad->pad->entity; in __media_pipeline_entity_iter_next()
1386 struct media_pad *media_pad_remote_pad_first(const struct media_pad *pad) in media_pad_remote_pad_first() argument
1390 for_each_media_entity_data_link(pad->entity, link) { in media_pad_remote_pad_first()
1394 if (link->source == pad) in media_pad_remote_pad_first()
1397 if (link->sink == pad) in media_pad_remote_pad_first()
1410 struct media_pad *pad = NULL; in media_entity_remote_pad_unique() local
1431 if (pad) in media_entity_remote_pad_unique()
1434 pad = remote_pad; in media_entity_remote_pad_unique()
1438 if (!pad) in media_entity_remote_pad_unique()
1441 return pad; in media_entity_remote_pad_unique()
1445 struct media_pad *media_pad_remote_pad_unique(const struct media_pad *pad) in media_pad_remote_pad_unique() argument
1450 list_for_each_entry(link, &pad->entity->links, list) { in media_pad_remote_pad_unique()
1456 if (link->sink == pad) in media_pad_remote_pad_unique()
1458 else if (link->source == pad) in media_pad_remote_pad_unique()
1513 struct media_pad *pad; in media_entity_pipeline() local
1515 media_entity_for_each_pad(entity, pad) { in media_entity_pipeline()
1516 if (pad->pipe) in media_entity_pipeline()
1517 return pad->pipe; in media_entity_pipeline()
1524 struct media_pipeline *media_pad_pipeline(struct media_pad *pad) in media_pad_pipeline() argument
1526 return pad->pipe; in media_pad_pipeline()