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
137 * @list: Linked list associated with an entity or an interface that
149 * @entity: Part of a union. Used only if the second object (gobj1) is
150 * an entity.
167 struct media_entity *entity; member
206 * @entity: Entity this pad belongs to
207 * @index: Pad index in the entity pads array, numbered from 0 to n
217 struct media_entity *entity; member
230 * struct media_entity_operations - Media entity operations
234 * @link_setup: Notify the entity of link changes. The operation can
237 * @link_validate: Return whether a link is valid from the entity point of
240 * @has_pad_interdep: Return whether a two pads inside the entity are
255 int (*get_fwnode_pad)(struct media_entity *entity,
257 int (*link_setup)(struct media_entity *entity,
261 bool (*has_pad_interdep)(struct media_entity *entity, unsigned int pad0,
266 * enum media_entity_type - Media entity type
269 * The entity isn't embedded in another subsystem structure.
271 * The entity is embedded in a struct video_device instance.
273 * The entity is embedded in a struct v4l2_subdev instance.
275 * Media entity objects are often not instantiated directly, but the media
276 * entity structure is inherited by (through embedding) other subsystem-specific
277 * structures. The media entity type identifies the type of the subclass
278 * structure that implements a media entity instance.
281 * the correct object type. For instance, a media entity structure instance
293 * struct media_entity - A media entity graph object.
296 * @name: Entity name.
298 * @function: Entity main function, as defined in
301 * @flags: Entity flags, as defined in
307 * @internal_idx: An unique internal entity specific number. The numbers are
311 * @ops: Entity operations.
312 * @use_count: Use count for the entity.
357 * media_entity_for_each_pad - Iterate on all pads in an entity
358 * @entity: The entity the pads belong to
361 * Iterate on all pads in a media entity.
363 #define media_entity_for_each_pad(entity, iter) \ argument
364 for (iter = (entity)->pads; \
365 iter < &(entity)->pads[(entity)->num_pads]; \
407 * media_entity_id() - return the media entity graph object id
409 * @entity: pointer to &media_entity
411 static inline u32 media_entity_id(struct media_entity *entity) in media_entity_id() argument
413 return entity->graph_obj.id; in media_entity_id()
453 * is_media_entity_v4l2_video_device() - Check if the entity is a video_device
454 * @entity: pointer to entity
456 * Return: %true if the entity is an instance of a video_device object and can
460 static inline bool is_media_entity_v4l2_video_device(struct media_entity *entity) in is_media_entity_v4l2_video_device() argument
462 return entity && entity->obj_type == MEDIA_ENTITY_TYPE_VIDEO_DEVICE; in is_media_entity_v4l2_video_device()
466 * is_media_entity_v4l2_subdev() - Check if the entity is a v4l2_subdev
467 * @entity: pointer to entity
469 * Return: %true if the entity is an instance of a &v4l2_subdev object and can
473 static inline bool is_media_entity_v4l2_subdev(struct media_entity *entity) in is_media_entity_v4l2_subdev() argument
475 return entity && entity->obj_type == MEDIA_ENTITY_TYPE_V4L2_SUBDEV; in is_media_entity_v4l2_subdev()
479 * media_entity_enum_init - Initialise an entity enumeration
481 * @ent_enum: Entity enumeration to be initialised
490 * media_entity_enum_cleanup - Release resources of an entity enumeration
492 * @ent_enum: Entity enumeration to be released
499 * @ent_enum: Entity enumeration to be cleared
507 * media_entity_enum_set - Mark a single entity in the enum
509 * @ent_enum: Entity enumeration
510 * @entity: Entity to be marked
513 struct media_entity *entity) in media_entity_enum_set() argument
515 if (WARN_ON(entity->internal_idx >= ent_enum->idx_max)) in media_entity_enum_set()
518 __set_bit(entity->internal_idx, ent_enum->bmap); in media_entity_enum_set()
522 * media_entity_enum_clear - Unmark a single entity in the enum
524 * @ent_enum: Entity enumeration
525 * @entity: Entity to be unmarked
528 struct media_entity *entity) in media_entity_enum_clear() argument
530 if (WARN_ON(entity->internal_idx >= ent_enum->idx_max)) in media_entity_enum_clear()
533 __clear_bit(entity->internal_idx, ent_enum->bmap); in media_entity_enum_clear()
537 * media_entity_enum_test - Test whether the entity is marked
539 * @ent_enum: Entity enumeration
540 * @entity: Entity to be tested
542 * Returns %true if the entity was marked.
545 struct media_entity *entity) in media_entity_enum_test() argument
547 if (WARN_ON(entity->internal_idx >= ent_enum->idx_max)) in media_entity_enum_test()
550 return test_bit(entity->internal_idx, ent_enum->bmap); in media_entity_enum_test()
554 * media_entity_enum_test_and_set - Test whether the entity is marked,
557 * @ent_enum: Entity enumeration
558 * @entity: Entity to be tested
560 * Returns %true if the entity was marked, and mark it before doing so.
564 struct media_entity *entity) in media_entity_enum_test_and_set() argument
566 if (WARN_ON(entity->internal_idx >= ent_enum->idx_max)) in media_entity_enum_test_and_set()
569 return __test_and_set_bit(entity->internal_idx, ent_enum->bmap); in media_entity_enum_test_and_set()
575 * @ent_enum: Entity enumeration
577 * Return: %true if the entity was empty.
587 * @ent_enum1: First entity enumeration
588 * @ent_enum2: Second entity enumeration
590 * Return: %true if entity enumerations @ent_enum1 and @ent_enum2 intersect,
657 * function calls are used. However, if the object (entity, link, pad,
676 * media_entity_pads_init() - Initialize the entity pads
678 * @entity: entity where the pads belong
682 * The pads array is managed by the entity driver and passed to
691 * dynamically but is managed by the entity driver. Most drivers will embed the
697 int media_entity_pads_init(struct media_entity *entity, u16 num_pads,
701 * media_entity_cleanup() - free resources associated with an entity
703 * @entity: entity where the pads belong
706 * the entity (currently, it does nothing).
713 static inline void media_entity_cleanup(struct media_entity *entity) {} in media_entity_cleanup() argument
715 #define media_entity_cleanup(entity) do { } while (false) argument
719 * media_get_pad_index() - retrieves a pad index from an entity
721 * @entity: entity where the pads belong
725 * This helper function finds the first pad index inside an entity that
731 * entity is a NULL pointer, return -EINVAL.
733 int media_get_pad_index(struct media_entity *entity, bool is_sink,
821 void __media_entity_remove_links(struct media_entity *entity);
824 * media_entity_remove_links() - remove all links associated with an entity
826 * @entity: pointer to &media_entity
830 * This is called automatically when an entity is unregistered via
833 void media_entity_remove_links(struct media_entity *entity);
864 * link_setup call is made on the first entity to restore the original link
872 * Entity drivers must implement the link_setup operation if any of their links
885 * on media_create_intf_link(), for interface to entity links.
931 * media_entity_remote_pad_unique - Find a remote pad connected to an entity
932 * @entity: The entity
935 * Search for and return a remote pad of @type connected to @entity through an
949 media_entity_remote_pad_unique(const struct media_entity *entity,
954 * an entity
955 * @entity: The entity
957 * Search for and return a remote source pad connected to @entity through an
971 media_entity_remote_source_pad_unique(const struct media_entity *entity) in media_entity_remote_source_pad_unique() argument
973 return media_entity_remote_pad_unique(entity, MEDIA_PAD_FL_SOURCE); in media_entity_remote_source_pad_unique()
989 * media_entity_is_streaming - Test if an entity is part of a streaming pipeline
990 * @entity: The entity
992 * Return: True if the entity is part of a pipeline started with the
995 static inline bool media_entity_is_streaming(const struct media_entity *entity) in media_entity_is_streaming() argument
999 media_entity_for_each_pad(entity, pad) { in media_entity_is_streaming()
1008 * media_entity_pipeline - Get the media pipeline an entity is part of
1009 * @entity: The entity
1013 * This function returns the media pipeline that an entity has been associated
1022 * Return: The media_pipeline the entity is part of, or NULL if the entity is
1025 struct media_pipeline *media_entity_pipeline(struct media_entity *entity);
1043 * @entity: The entity
1053 * If the entity does not implement the get_fwnode_pad() operation
1054 * then this function searches the entity for the first pad that
1059 int media_entity_get_fwnode_pad(struct media_entity *entity,
1086 * given entity
1089 * @entity: Starting entity
1094 * entities graph starting at the given entity. The traversal
1100 struct media_entity *entity);
1103 * media_graph_walk_next - Get the next entity in the graph
1111 * Return: returns the next entity in the graph or %NULL if the whole graph
1214 * media_create_intf_link() - creates a link between an entity and an interface
1216 * @entity: pointer to %media_entity
1226 * Indicates that the interface is connected to the entity hardware.
1243 __must_check media_create_intf_link(struct media_entity *entity,
1280 * #) This is called automatically when an entity is unregistered via
1289 * an entity
1291 * @entity: entity where the @operation will be called
1296 * it will issue a call to @operation\(@entity, @args\).
1299 #define media_entity_call(entity, operation, args...) \ argument
1300 (((entity)->ops && (entity)->ops->operation) ? \
1301 (entity)->ops->operation((entity) , ##args) : -ENOIOCTLCMD)
1325 * @entity: pointer to the &media_entity
1329 * Return the next link against an entity matching a specific link type. This
1330 * allows iteration through an entity's links whilst guaranteeing all of the
1333 struct media_link *__media_entity_next_link(struct media_entity *entity,
1338 * for_each_media_entity_data_link() - Iterate through an entity's data links
1340 * @entity: pointer to the &media_entity
1345 #define for_each_media_entity_data_link(entity, link) \ argument
1346 for (link = __media_entity_next_link(entity, NULL, \
1349 link = __media_entity_next_link(entity, link, \