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()
232 * and enabling one of the pads means that the other pad will become "locked"
407 * When a new pad is reached, an entry is pushed on the top of the stack and
408 * points to the incoming pad and the first link of the entity.
411 * internal pad dependencies in the entity, and then links in the graph. It
413 * links that originate from a pad that is internally connected to the incoming
414 * pad, as reported by the media_entity_has_pad_interdep() function.
420 * @pad: The media pad being visited
424 struct media_pad *pad; member
487 struct media_pad *pad) in media_pipeline_walk_push() argument
500 entry->pad = pad; in media_pipeline_walk_push()
501 entry->links = pad->entity->links.next; in media_pipeline_walk_push()
505 walk->stack.top, pad->entity->name, pad->index); in media_pipeline_walk_push()
523 if (entry->links->next == &entry->pad->entity->links) { in media_pipeline_walk_pop()
545 /* Add a pad to the pipeline and push it to the stack. */
548 struct media_pad *pad) in media_pipeline_add_pad() argument
553 if (ppad->pad == pad) { in media_pipeline_add_pad()
554 dev_dbg(pad->graph_obj.mdev->dev, in media_pipeline_add_pad()
555 "media pipeline: already contains pad '%s':%u\n", in media_pipeline_add_pad()
556 pad->entity->name, pad->index); in media_pipeline_add_pad()
566 ppad->pad = pad; in media_pipeline_add_pad()
570 dev_dbg(pad->graph_obj.mdev->dev, in media_pipeline_add_pad()
571 "media pipeline: added pad '%s':%u\n", in media_pipeline_add_pad()
572 pad->entity->name, pad->index); in media_pipeline_add_pad()
574 return media_pipeline_walk_push(walk, pad); in media_pipeline_add_pad()
582 struct media_pad *pad; in media_pipeline_explore_next_link() local
588 pad = entry->pad; in media_pipeline_explore_next_link()
604 /* Get the local pad and remote pad. */ in media_pipeline_explore_next_link()
605 if (link->source->entity == pad->entity) { in media_pipeline_explore_next_link()
614 * Skip links that originate from a different pad than the incoming pad in media_pipeline_explore_next_link()
615 * that is not connected internally in the entity to the incoming pad. in media_pipeline_explore_next_link()
617 if (pad != local && in media_pipeline_explore_next_link()
618 !media_entity_has_pad_interdep(pad->entity, pad->index, local->index)) { in media_pipeline_explore_next_link()
651 struct media_pad *pad) in media_pipeline_populate() argument
659 * from @pad. in media_pipeline_populate()
662 pipe->mdev = pad->graph_obj.mdev; in media_pipeline_populate()
666 ret = media_pipeline_add_pad(pipe, &walk, pad); in media_pipeline_populate()
683 dev_dbg(pad->graph_obj.mdev->dev, in media_pipeline_populate()
687 dev_dbg(pad->graph_obj.mdev->dev, "- '%s':%u\n", in media_pipeline_populate()
688 ppad->pad->entity->name, ppad->pad->index); in media_pipeline_populate()
703 __must_check int __media_pipeline_start(struct media_pad *pad, in __media_pipeline_start() argument
706 struct media_device *mdev = pad->entity->graph_obj.mdev; in __media_pipeline_start()
717 if (WARN_ON(pad->pipe && pad->pipe != pipe)) in __media_pipeline_start()
731 * with media_pipeline_pad instances for each pad found during graph in __media_pipeline_start()
734 ret = media_pipeline_populate(pipe, pad); in __media_pipeline_start()
744 struct media_pad *pad = ppad->pad; in __media_pipeline_start() local
745 struct media_entity *entity = pad->entity; in __media_pipeline_start()
750 dev_dbg(mdev->dev, "Validating pad '%s':%u\n", pad->entity->name, in __media_pipeline_start()
751 pad->index); in __media_pipeline_start()
754 * 1. Ensure that the pad doesn't already belong to a different in __media_pipeline_start()
757 if (pad->pipe) { in __media_pipeline_start()
758 dev_dbg(mdev->dev, "Failed to start pipeline: pad '%s':%u busy\n", in __media_pipeline_start()
759 pad->entity->name, pad->index); in __media_pipeline_start()
765 * 2. Validate all active links whose sink is the current pad. in __media_pipeline_start()
767 * the connected sink pad to avoid duplicating checks. in __media_pipeline_start()
770 /* Skip links unrelated to the current pad. */ in __media_pipeline_start()
771 if (link->sink != pad && link->source != pad) in __media_pipeline_start()
774 /* Record if the pad has links and enabled links. */ in __media_pipeline_start()
781 * current pad as its sink. in __media_pipeline_start()
786 if (link->sink != pad) in __media_pipeline_start()
812 * 3. If the pad has the MEDIA_PAD_FL_MUST_CONNECT flag set, in __media_pipeline_start()
815 if ((pad->flags & MEDIA_PAD_FL_MUST_CONNECT) && has_link && in __media_pipeline_start()
818 "Pad '%s':%u must be connected by an enabled link\n", in __media_pipeline_start()
819 pad->entity->name, pad->index); in __media_pipeline_start()
824 /* Validation passed, store the pipe pointer in the pad. */ in __media_pipeline_start()
825 pad->pipe = pipe; in __media_pipeline_start()
842 err_ppad->pad->pipe = NULL; in __media_pipeline_start()
851 __must_check int media_pipeline_start(struct media_pad *pad, in media_pipeline_start() argument
854 struct media_device *mdev = pad->entity->graph_obj.mdev; in media_pipeline_start()
858 ret = __media_pipeline_start(pad, pipe); in media_pipeline_start()
864 void __media_pipeline_stop(struct media_pad *pad) in __media_pipeline_stop() argument
866 struct media_pipeline *pipe = pad->pipe; in __media_pipeline_stop()
880 ppad->pad->pipe = NULL; in __media_pipeline_stop()
889 void media_pipeline_stop(struct media_pad *pad) in media_pipeline_stop() argument
891 struct media_device *mdev = pad->entity->graph_obj.mdev; in media_pipeline_stop()
894 __media_pipeline_stop(pad); in media_pipeline_stop()
899 __must_check int media_pipeline_alloc_start(struct media_pad *pad) in media_pipeline_alloc_start() argument
901 struct media_device *mdev = pad->entity->graph_obj.mdev; in media_pipeline_alloc_start()
912 pipe = media_pad_pipeline(pad); in media_pipeline_alloc_start()
924 ret = __media_pipeline_start(pad, pipe); in media_pipeline_alloc_start()
1260 struct media_pad *media_pad_remote_pad_first(const struct media_pad *pad) in media_pad_remote_pad_first() argument
1264 for_each_media_entity_data_link(pad->entity, link) { in media_pad_remote_pad_first()
1268 if (link->source == pad) in media_pad_remote_pad_first()
1271 if (link->sink == pad) in media_pad_remote_pad_first()
1284 struct media_pad *pad = NULL; in media_entity_remote_pad_unique() local
1305 if (pad) in media_entity_remote_pad_unique()
1308 pad = remote_pad; in media_entity_remote_pad_unique()
1312 if (!pad) in media_entity_remote_pad_unique()
1315 return pad; in media_entity_remote_pad_unique()
1319 struct media_pad *media_pad_remote_pad_unique(const struct media_pad *pad) in media_pad_remote_pad_unique() argument
1324 list_for_each_entry(link, &pad->entity->links, list) { in media_pad_remote_pad_unique()
1330 if (link->sink == pad) in media_pad_remote_pad_unique()
1332 else if (link->source == pad) in media_pad_remote_pad_unique()
1387 struct media_pad *pad; in media_entity_pipeline() local
1389 media_entity_for_each_pad(entity, pad) { in media_entity_pipeline()
1390 if (pad->pipe) in media_entity_pipeline()
1391 return pad->pipe; in media_entity_pipeline()
1398 struct media_pipeline *media_pad_pipeline(struct media_pad *pad) in media_pad_pipeline() argument
1400 return pad->pipe; in media_pad_pipeline()