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
237 struct media_entity *entity; member
250 * struct media_entity_operations - Media entity operations
254 * @link_setup: Notify the entity of link changes. The operation can
257 * @link_validate: Return whether a link is valid from the entity point of
260 * @has_pad_interdep: Return whether two pads of the entity are
277 int (*get_fwnode_pad)(struct media_entity *entity,
279 int (*link_setup)(struct media_entity *entity,
283 bool (*has_pad_interdep)(struct media_entity *entity, unsigned int pad0,
288 * enum media_entity_type - Media entity type
291 * The entity isn't embedded in another subsystem structure.
293 * The entity is embedded in a struct video_device instance.
295 * The entity is embedded in a struct v4l2_subdev instance.
297 * Media entity objects are often not instantiated directly, but the media
298 * entity structure is inherited by (through embedding) other subsystem-specific
299 * structures. The media entity type identifies the type of the subclass
300 * structure that implements a media entity instance.
303 * the correct object type. For instance, a media entity structure instance
315 * struct media_entity - A media entity graph object.
318 * @name: Entity name.
320 * @function: Entity main function, as defined in
323 * @flags: Entity flags, as defined in
329 * @internal_idx: An unique internal entity specific number. The numbers are
333 * @ops: Entity operations.
334 * @use_count: Use count for the entity.
379 * media_entity_for_each_pad - Iterate on all pads in an entity
380 * @entity: The entity the pads belong to
383 * Iterate on all pads in a media entity.
385 #define media_entity_for_each_pad(entity, iter) \ argument
386 for (iter = (entity)->pads; \
387 iter < &(entity)->pads[(entity)->num_pads]; \
429 * media_entity_id() - return the media entity graph object id
431 * @entity: pointer to &media_entity
433 static inline u32 media_entity_id(struct media_entity *entity) in media_entity_id() argument
435 return entity->graph_obj.id; in media_entity_id()
475 * is_media_entity_v4l2_video_device() - Check if the entity is a video_device
476 * @entity: pointer to entity
478 * Return: %true if the entity is an instance of a video_device object and can
482 static inline bool is_media_entity_v4l2_video_device(struct media_entity *entity) in is_media_entity_v4l2_video_device() argument
484 return entity && entity->obj_type == MEDIA_ENTITY_TYPE_VIDEO_DEVICE; in is_media_entity_v4l2_video_device()
488 * is_media_entity_v4l2_subdev() - Check if the entity is a v4l2_subdev
489 * @entity: pointer to entity
491 * Return: %true if the entity is an instance of a &v4l2_subdev object and can
495 static inline bool is_media_entity_v4l2_subdev(struct media_entity *entity) in is_media_entity_v4l2_subdev() argument
497 return entity && entity->obj_type == MEDIA_ENTITY_TYPE_V4L2_SUBDEV; in is_media_entity_v4l2_subdev()
501 * media_entity_enum_init - Initialise an entity enumeration
503 * @ent_enum: Entity enumeration to be initialised
512 * media_entity_enum_cleanup - Release resources of an entity enumeration
514 * @ent_enum: Entity enumeration to be released
521 * @ent_enum: Entity enumeration to be cleared
529 * media_entity_enum_set - Mark a single entity in the enum
531 * @ent_enum: Entity enumeration
532 * @entity: Entity to be marked
535 struct media_entity *entity) in media_entity_enum_set() argument
537 if (WARN_ON(entity->internal_idx >= ent_enum->idx_max)) in media_entity_enum_set()
540 __set_bit(entity->internal_idx, ent_enum->bmap); in media_entity_enum_set()
544 * media_entity_enum_clear - Unmark a single entity in the enum
546 * @ent_enum: Entity enumeration
547 * @entity: Entity to be unmarked
550 struct media_entity *entity) in media_entity_enum_clear() argument
552 if (WARN_ON(entity->internal_idx >= ent_enum->idx_max)) in media_entity_enum_clear()
555 __clear_bit(entity->internal_idx, ent_enum->bmap); in media_entity_enum_clear()
559 * media_entity_enum_test - Test whether the entity is marked
561 * @ent_enum: Entity enumeration
562 * @entity: Entity to be tested
564 * Returns %true if the entity was marked.
567 struct media_entity *entity) in media_entity_enum_test() argument
569 if (WARN_ON(entity->internal_idx >= ent_enum->idx_max)) in media_entity_enum_test()
572 return test_bit(entity->internal_idx, ent_enum->bmap); in media_entity_enum_test()
576 * media_entity_enum_test_and_set - Test whether the entity is marked,
579 * @ent_enum: Entity enumeration
580 * @entity: Entity to be tested
582 * Returns %true if the entity was marked, and mark it before doing so.
586 struct media_entity *entity) in media_entity_enum_test_and_set() argument
588 if (WARN_ON(entity->internal_idx >= ent_enum->idx_max)) in media_entity_enum_test_and_set()
591 return __test_and_set_bit(entity->internal_idx, ent_enum->bmap); in media_entity_enum_test_and_set()
597 * @ent_enum: Entity enumeration
599 * Return: %true if the entity was empty.
609 * @ent_enum1: First entity enumeration
610 * @ent_enum2: Second entity enumeration
612 * Return: %true if entity enumerations @ent_enum1 and @ent_enum2 intersect,
679 * function calls are used. However, if the object (entity, link, pad,
698 * media_entity_pads_init() - Initialize the entity pads
700 * @entity: entity where the pads belong
704 * The pads array is managed by the entity driver and passed to
713 * dynamically but is managed by the entity driver. Most drivers will embed the
719 int media_entity_pads_init(struct media_entity *entity, u16 num_pads,
723 * media_entity_cleanup() - free resources associated with an entity
725 * @entity: entity where the pads belong
728 * the entity (currently, it does nothing).
735 static inline void media_entity_cleanup(struct media_entity *entity) {} in media_entity_cleanup() argument
737 #define media_entity_cleanup(entity) do { } while (false) argument
741 * media_get_pad_index() - retrieves a pad index from an entity
743 * @entity: entity where the pads belong
747 * This helper function finds the first pad index inside an entity that
753 * entity is a NULL pointer, return -EINVAL.
755 int media_get_pad_index(struct media_entity *entity, u32 pad_type,
843 void __media_entity_remove_links(struct media_entity *entity);
846 * media_entity_remove_links() - remove all links associated with an entity
848 * @entity: pointer to &media_entity
852 * This is called automatically when an entity is unregistered via
855 void media_entity_remove_links(struct media_entity *entity);
886 * link_setup call is made on the first entity to restore the original link
894 * Entity drivers must implement the link_setup operation if any of their links
907 * on media_create_intf_link(), for interface to entity links.
953 * media_entity_remote_pad_unique - Find a remote pad connected to an entity
954 * @entity: The entity
957 * Search for and return a remote pad of @type connected to @entity through an
971 media_entity_remote_pad_unique(const struct media_entity *entity,
976 * an entity
977 * @entity: The entity
979 * Search for and return a remote source pad connected to @entity through an
993 media_entity_remote_source_pad_unique(const struct media_entity *entity) in media_entity_remote_source_pad_unique() argument
995 return media_entity_remote_pad_unique(entity, MEDIA_PAD_FL_SOURCE); in media_entity_remote_source_pad_unique()
1011 * media_entity_is_streaming - Test if an entity is part of a streaming pipeline
1012 * @entity: The entity
1014 * Return: True if the entity is part of a pipeline started with the
1017 static inline bool media_entity_is_streaming(const struct media_entity *entity) in media_entity_is_streaming() argument
1021 media_entity_for_each_pad(entity, pad) { in media_entity_is_streaming()
1030 * media_entity_pipeline - Get the media pipeline an entity is part of
1031 * @entity: The entity
1035 * This function returns the media pipeline that an entity has been associated
1044 * Return: The media_pipeline the entity is part of, or NULL if the entity is
1047 struct media_pipeline *media_entity_pipeline(struct media_entity *entity);
1065 * @entity: The entity
1075 * If the entity does not implement the get_fwnode_pad() operation
1076 * then this function searches the entity for the first pad that
1081 int media_entity_get_fwnode_pad(struct media_entity *entity,
1112 * given entity
1115 * @entity: Starting entity
1122 * entities graph starting at the given entity. The traversal
1128 struct media_entity *entity);
1131 * media_graph_walk_next - Get the next entity in the graph
1141 * Return: returns the next entity in the graph or %NULL if the whole graph
1217 * media_pipeline_entity_iter_init - Initialize a pipeline entity iterator
1235 * media_pipeline_entity_iter_cleanup - Destroy a pipeline entity iterator
1246 struct media_entity *entity);
1252 * @entity: The iterator entity
1261 #define media_pipeline_for_each_entity(pipe, iter, entity) \ argument
1262 for (entity = __media_pipeline_entity_iter_next((pipe), iter, NULL); \
1263 entity != NULL; \
1264 entity = __media_pipeline_entity_iter_next((pipe), iter, entity))
1314 * media_create_intf_link() - creates a link between an entity and an interface
1316 * @entity: pointer to %media_entity
1326 * Indicates that the interface is connected to the entity hardware.
1343 __must_check media_create_intf_link(struct media_entity *entity,
1380 * #) This is called automatically when an entity is unregistered via
1389 * an entity
1391 * @entity: entity where the @operation will be called
1396 * it will issue a call to @operation\(@entity, @args\).
1399 #define media_entity_call(entity, operation, args...) \ argument
1400 (((entity)->ops && (entity)->ops->operation) ? \
1401 (entity)->ops->operation((entity) , ##args) : -ENOIOCTLCMD)
1425 * @entity: pointer to the &media_entity
1429 * Return the next link against an entity matching a specific link type. This
1430 * allows iteration through an entity's links whilst guaranteeing all of the
1433 struct media_link *__media_entity_next_link(struct media_entity *entity,
1438 * for_each_media_entity_data_link() - Iterate through an entity's data links
1440 * @entity: pointer to the &media_entity
1445 #define for_each_media_entity_data_link(entity, link) \ argument
1446 for (link = __media_entity_next_link(entity, NULL, \
1449 link = __media_entity_next_link(entity, link, \