Lines Matching full:entity

3  * Media entity
28 * @MEDIA_GRAPH_ENTITY: Identify a media entity
70 * @bmap: Bit map in which each bit represents one entity at struct
85 * @stack.entity: pointer to &struct media_entity at the graph.
92 struct media_entity *entity; member
145 * @ent_enum: The entity enumeration tracker
157 * @list: Linked list associated with an entity or an interface that
169 * @entity: Part of a union. Used only if the second object (gobj1) is
170 * an entity.
187 struct media_entity *entity; member
226 * @entity: Entity this pad belongs to
227 * @index: Pad index in the entity pads array, numbered from 0 to n
238 struct media_entity *entity; member
252 * struct media_entity_operations - Media entity operations
256 * @link_setup: Notify the entity of link changes. The operation can
259 * @link_validate: Return whether a link is valid from the entity point of
262 * @has_pad_interdep: Return whether two pads of the entity are
279 int (*get_fwnode_pad)(struct media_entity *entity,
281 int (*link_setup)(struct media_entity *entity,
285 bool (*has_pad_interdep)(struct media_entity *entity, unsigned int pad0,
290 * enum media_entity_type - Media entity type
293 * The entity isn't embedded in another subsystem structure.
295 * The entity is embedded in a struct video_device instance.
297 * The entity is embedded in a struct v4l2_subdev instance.
299 * Media entity objects are often not instantiated directly, but the media
300 * entity structure is inherited by (through embedding) other subsystem-specific
301 * structures. The media entity type identifies the type of the subclass
302 * structure that implements a media entity instance.
305 * the correct object type. For instance, a media entity structure instance
317 * struct media_entity - A media entity graph object.
320 * @name: Entity name.
322 * @function: Entity main function, as defined in
325 * @flags: Entity flags, as defined in
331 * @internal_idx: An unique internal entity specific number. The numbers are
335 * @ops: Entity operations.
336 * @use_count: Use count for the entity.
381 * media_entity_for_each_pad - Iterate on all pads in an entity
382 * @entity: The entity the pads belong to
385 * Iterate on all pads in a media entity.
387 #define media_entity_for_each_pad(entity, iter) \ argument
388 for (iter = (entity)->pads; \
389 iter < &(entity)->pads[(entity)->num_pads]; \
431 * media_entity_id() - return the media entity graph object id
433 * @entity: pointer to &media_entity
435 static inline u32 media_entity_id(struct media_entity *entity) in media_entity_id() argument
437 return entity->graph_obj.id; in media_entity_id()
477 * is_media_entity_v4l2_video_device() - Check if the entity is a video_device
478 * @entity: pointer to entity
480 * Return: %true if the entity is an instance of a video_device object and can
484 static inline bool is_media_entity_v4l2_video_device(struct media_entity *entity) in is_media_entity_v4l2_video_device() argument
486 return entity && entity->obj_type == MEDIA_ENTITY_TYPE_VIDEO_DEVICE; in is_media_entity_v4l2_video_device()
490 * is_media_entity_v4l2_subdev() - Check if the entity is a v4l2_subdev
491 * @entity: pointer to entity
493 * Return: %true if the entity is an instance of a &v4l2_subdev object and can
497 static inline bool is_media_entity_v4l2_subdev(struct media_entity *entity) in is_media_entity_v4l2_subdev() argument
499 return entity && entity->obj_type == MEDIA_ENTITY_TYPE_V4L2_SUBDEV; in is_media_entity_v4l2_subdev()
503 * media_entity_enum_init - Initialise an entity enumeration
505 * @ent_enum: Entity enumeration to be initialised
514 * media_entity_enum_cleanup - Release resources of an entity enumeration
516 * @ent_enum: Entity enumeration to be released
523 * @ent_enum: Entity enumeration to be cleared
531 * media_entity_enum_set - Mark a single entity in the enum
533 * @ent_enum: Entity enumeration
534 * @entity: Entity to be marked
537 struct media_entity *entity) in media_entity_enum_set() argument
539 if (WARN_ON(entity->internal_idx >= ent_enum->idx_max)) in media_entity_enum_set()
542 __set_bit(entity->internal_idx, ent_enum->bmap); in media_entity_enum_set()
546 * media_entity_enum_clear - Unmark a single entity in the enum
548 * @ent_enum: Entity enumeration
549 * @entity: Entity to be unmarked
552 struct media_entity *entity) in media_entity_enum_clear() argument
554 if (WARN_ON(entity->internal_idx >= ent_enum->idx_max)) in media_entity_enum_clear()
557 __clear_bit(entity->internal_idx, ent_enum->bmap); in media_entity_enum_clear()
561 * media_entity_enum_test - Test whether the entity is marked
563 * @ent_enum: Entity enumeration
564 * @entity: Entity to be tested
566 * Returns %true if the entity was marked.
569 struct media_entity *entity) in media_entity_enum_test() argument
571 if (WARN_ON(entity->internal_idx >= ent_enum->idx_max)) in media_entity_enum_test()
574 return test_bit(entity->internal_idx, ent_enum->bmap); in media_entity_enum_test()
578 * media_entity_enum_test_and_set - Test whether the entity is marked,
581 * @ent_enum: Entity enumeration
582 * @entity: Entity to be tested
584 * Returns %true if the entity was marked, and mark it before doing so.
588 struct media_entity *entity) in media_entity_enum_test_and_set() argument
590 if (WARN_ON(entity->internal_idx >= ent_enum->idx_max)) in media_entity_enum_test_and_set()
593 return __test_and_set_bit(entity->internal_idx, ent_enum->bmap); in media_entity_enum_test_and_set()
599 * @ent_enum: Entity enumeration
601 * Return: %true if the entity was empty.
611 * @ent_enum1: First entity enumeration
612 * @ent_enum2: Second entity enumeration
614 * Return: %true if entity enumerations @ent_enum1 and @ent_enum2 intersect,
681 * function calls are used. However, if the object (entity, link, pad,
700 * media_entity_pads_init() - Initialize the entity pads
702 * @entity: entity where the pads belong
706 * The pads array is managed by the entity driver and passed to
715 * dynamically but is managed by the entity driver. Most drivers will embed the
721 int media_entity_pads_init(struct media_entity *entity, u16 num_pads,
725 * media_entity_cleanup() - free resources associated with an entity
727 * @entity: entity where the pads belong
730 * the entity (currently, it does nothing).
737 static inline void media_entity_cleanup(struct media_entity *entity) {} in media_entity_cleanup() argument
739 #define media_entity_cleanup(entity) do { } while (false) argument
743 * media_get_pad_index() - retrieves a pad index from an entity
745 * @entity: entity where the pads belong
749 * This helper function finds the first pad index inside an entity that
755 * entity is a NULL pointer, return -EINVAL.
757 int media_get_pad_index(struct media_entity *entity, u32 pad_type,
845 void __media_entity_remove_links(struct media_entity *entity);
848 * media_entity_remove_links() - remove all links associated with an entity
850 * @entity: pointer to &media_entity
854 * This is called automatically when an entity is unregistered via
857 void media_entity_remove_links(struct media_entity *entity);
888 * link_setup call is made on the first entity to restore the original link
896 * Entity drivers must implement the link_setup operation if any of their links
909 * on media_create_intf_link(), for interface to entity links.
955 * media_entity_remote_pad_unique - Find a remote pad connected to an entity
956 * @entity: The entity
959 * Search for and return a remote pad of @type connected to @entity through an
973 media_entity_remote_pad_unique(const struct media_entity *entity,
978 * an entity
979 * @entity: The entity
981 * Search for and return a remote source pad connected to @entity through an
995 media_entity_remote_source_pad_unique(const struct media_entity *entity) in media_entity_remote_source_pad_unique() argument
997 return media_entity_remote_pad_unique(entity, MEDIA_PAD_FL_SOURCE); in media_entity_remote_source_pad_unique()
1013 * media_entity_is_streaming - Test if an entity is part of a streaming pipeline
1014 * @entity: The entity
1016 * Return: True if the entity is part of a pipeline started with the
1019 static inline bool media_entity_is_streaming(const struct media_entity *entity) in media_entity_is_streaming() argument
1023 media_entity_for_each_pad(entity, pad) { in media_entity_is_streaming()
1032 * media_entity_pipeline - Get the media pipeline an entity is part of
1033 * @entity: The entity
1037 * This function returns the media pipeline that an entity has been associated
1046 * Return: The media_pipeline the entity is part of, or NULL if the entity is
1049 struct media_pipeline *media_entity_pipeline(struct media_entity *entity);
1067 * @entity: The entity
1077 * If the entity does not implement the get_fwnode_pad() operation
1078 * then this function searches the entity for the first pad that
1083 int media_entity_get_fwnode_pad(struct media_entity *entity,
1114 * given entity
1117 * @entity: Starting entity
1124 * entities graph starting at the given entity. The traversal
1130 struct media_entity *entity);
1133 * media_graph_walk_next - Get the next entity in the graph
1143 * Return: returns the next entity in the graph or %NULL if the whole graph
1219 * media_pipeline_entity_iter_init - Initialize a pipeline entity iterator
1237 * media_pipeline_entity_iter_cleanup - Destroy a pipeline entity iterator
1248 struct media_entity *entity);
1254 * @entity: The iterator entity
1263 #define media_pipeline_for_each_entity(pipe, iter, entity) \ argument
1264 for (entity = __media_pipeline_entity_iter_next((pipe), iter, NULL); \
1265 entity != NULL; \
1266 entity = __media_pipeline_entity_iter_next((pipe), iter, entity))
1316 * media_create_intf_link() - creates a link between an entity and an interface
1318 * @entity: pointer to %media_entity
1328 * Indicates that the interface is connected to the entity hardware.
1345 __must_check media_create_intf_link(struct media_entity *entity,
1382 * #) This is called automatically when an entity is unregistered via
1391 * an entity
1393 * @entity: entity where the @operation will be called
1398 * it will issue a call to @operation\(@entity, @args\).
1401 #define media_entity_call(entity, operation, args...) \ argument
1402 (((entity)->ops && (entity)->ops->operation) ? \
1403 (entity)->ops->operation((entity) , ##args) : -ENOIOCTLCMD)
1427 * @entity: pointer to the &media_entity
1431 * Return the next link against an entity matching a specific link type. This
1432 * allows iteration through an entity's links whilst guaranteeing all of the
1435 struct media_link *__media_entity_next_link(struct media_entity *entity,
1440 * for_each_media_entity_data_link() - Iterate through an entity's data links
1442 * @entity: pointer to the &media_entity
1447 #define for_each_media_entity_data_link(entity, link) \ argument
1448 for (link = __media_entity_next_link(entity, NULL, \
1451 link = __media_entity_next_link(entity, link, \