Lines Matching full:entity
3 * Media entity
27 * @MEDIA_GRAPH_ENTITY: Identify a media entity
69 * @bmap: Bit map in which each bit represents one entity at struct
84 * @stack.entity: pointer to &struct media_entity at the graph.
91 struct media_entity *entity; member
114 * @list: Linked list associated with an entity or an interface that
126 * @entity: Part of a union. Used only if the second object (gobj1) is
127 * an entity.
144 struct media_entity *entity; member
184 * @entity: Entity this pad belongs to
185 * @index: Pad index in the entity pads array, numbered from 0 to n
193 struct media_entity *entity; member
200 * struct media_entity_operations - Media entity operations
204 * @link_setup: Notify the entity of link changes. The operation can
207 * @link_validate: Return whether a link is valid from the entity point of
217 int (*get_fwnode_pad)(struct media_entity *entity,
219 int (*link_setup)(struct media_entity *entity,
226 * enum media_entity_type - Media entity type
229 * The entity isn't embedded in another subsystem structure.
231 * The entity is embedded in a struct video_device instance.
233 * The entity is embedded in a struct v4l2_subdev instance.
235 * Media entity objects are often not instantiated directly, but the media
236 * entity structure is inherited by (through embedding) other subsystem-specific
237 * structures. The media entity type identifies the type of the subclass
238 * structure that implements a media entity instance.
241 * the correct object type. For instance, a media entity structure instance
253 * struct media_entity - A media entity graph object.
256 * @name: Entity name.
258 * @function: Entity main function, as defined in
261 * @flags: Entity flags, as defined in
267 * @internal_idx: An unique internal entity specific number. The numbers are
271 * @ops: Entity operations.
272 * @stream_count: Stream count for the entity.
273 * @use_count: Use count for the entity.
274 * @pipe: Pipeline this entity belongs to.
361 * media_entity_id() - return the media entity graph object id
363 * @entity: pointer to &media_entity
365 static inline u32 media_entity_id(struct media_entity *entity) in media_entity_id() argument
367 return entity->graph_obj.id; in media_entity_id()
407 * is_media_entity_v4l2_video_device() - Check if the entity is a video_device
408 * @entity: pointer to entity
410 * Return: %true if the entity is an instance of a video_device object and can
414 static inline bool is_media_entity_v4l2_video_device(struct media_entity *entity) in is_media_entity_v4l2_video_device() argument
416 return entity && entity->obj_type == MEDIA_ENTITY_TYPE_VIDEO_DEVICE; in is_media_entity_v4l2_video_device()
420 * is_media_entity_v4l2_subdev() - Check if the entity is a v4l2_subdev
421 * @entity: pointer to entity
423 * Return: %true if the entity is an instance of a &v4l2_subdev object and can
427 static inline bool is_media_entity_v4l2_subdev(struct media_entity *entity) in is_media_entity_v4l2_subdev() argument
429 return entity && entity->obj_type == MEDIA_ENTITY_TYPE_V4L2_SUBDEV; in is_media_entity_v4l2_subdev()
433 * __media_entity_enum_init - Initialise an entity enumeration
435 * @ent_enum: Entity enumeration to be initialised
444 * media_entity_enum_cleanup - Release resources of an entity enumeration
446 * @ent_enum: Entity enumeration to be released
453 * @ent_enum: Entity enumeration to be cleared
461 * media_entity_enum_set - Mark a single entity in the enum
463 * @ent_enum: Entity enumeration
464 * @entity: Entity to be marked
467 struct media_entity *entity) in media_entity_enum_set() argument
469 if (WARN_ON(entity->internal_idx >= ent_enum->idx_max)) in media_entity_enum_set()
472 __set_bit(entity->internal_idx, ent_enum->bmap); in media_entity_enum_set()
476 * media_entity_enum_clear - Unmark a single entity in the enum
478 * @ent_enum: Entity enumeration
479 * @entity: Entity to be unmarked
482 struct media_entity *entity) in media_entity_enum_clear() argument
484 if (WARN_ON(entity->internal_idx >= ent_enum->idx_max)) in media_entity_enum_clear()
487 __clear_bit(entity->internal_idx, ent_enum->bmap); in media_entity_enum_clear()
491 * media_entity_enum_test - Test whether the entity is marked
493 * @ent_enum: Entity enumeration
494 * @entity: Entity to be tested
496 * Returns %true if the entity was marked.
499 struct media_entity *entity) in media_entity_enum_test() argument
501 if (WARN_ON(entity->internal_idx >= ent_enum->idx_max)) in media_entity_enum_test()
504 return test_bit(entity->internal_idx, ent_enum->bmap); in media_entity_enum_test()
508 * media_entity_enum_test_and_set - Test whether the entity is marked,
511 * @ent_enum: Entity enumeration
512 * @entity: Entity to be tested
514 * Returns %true if the entity was marked, and mark it before doing so.
518 struct media_entity *entity) in media_entity_enum_test_and_set() argument
520 if (WARN_ON(entity->internal_idx >= ent_enum->idx_max)) in media_entity_enum_test_and_set()
523 return __test_and_set_bit(entity->internal_idx, ent_enum->bmap); in media_entity_enum_test_and_set()
529 * @ent_enum: Entity enumeration
531 * Return: %true if the entity was empty.
541 * @ent_enum1: First entity enumeration
542 * @ent_enum2: Second entity enumeration
544 * Return: %true if entity enumerations @ent_enum1 and @ent_enum2 intersect,
611 * function calls are used. However, if the object (entity, link, pad,
630 * media_entity_pads_init() - Initialize the entity pads
632 * @entity: entity where the pads belong
636 * The pads array is managed by the entity driver and passed to
645 * dynamically but is managed by the entity driver. Most drivers will embed the
651 int media_entity_pads_init(struct media_entity *entity, u16 num_pads,
655 * media_entity_cleanup() - free resources associated with an entity
657 * @entity: entity where the pads belong
660 * the entity (currently, it does nothing).
663 static inline void media_entity_cleanup(struct media_entity *entity) {} in media_entity_cleanup() argument
665 #define media_entity_cleanup(entity) do { } while (false) argument
669 * media_get_pad_index() - retrieves a pad index from an entity
671 * @entity: entity where the pads belong
675 * This helper function finds the first pad index inside an entity that
681 * entity is a NULL pointer, return -EINVAL.
683 int media_get_pad_index(struct media_entity *entity, bool is_sink,
771 void __media_entity_remove_links(struct media_entity *entity);
774 * media_entity_remove_links() - remove all links associated with an entity
776 * @entity: pointer to &media_entity
780 * This is called automatically when an entity is unregistered via
783 void media_entity_remove_links(struct media_entity *entity);
814 * link_setup call is made on the first entity to restore the original link
822 * Entity drivers must implement the link_setup operation if any of their links
835 * on media_create_intf_link(), for interface to entity links.
865 * @entity: The entity
875 * If the entity does not implement the get_fwnode_pad() operation
876 * then this function searches the entity for the first pad that
881 int media_entity_get_fwnode_pad(struct media_entity *entity,
903 * given entity
906 * @entity: Starting entity
911 * entities graph starting at the given entity. The traversal
917 struct media_entity *entity);
920 * media_graph_walk_next - Get the next entity in the graph
928 * Return: returns the next entity in the graph or %NULL if the whole graph
935 * @entity: Starting entity
938 * Mark all entities connected to a given entity through enabled links, either
940 * to every entity in the pipeline and stored in the media_entity pipe field.
947 __must_check int media_pipeline_start(struct media_entity *entity,
952 * @entity: Starting entity
957 __must_check int __media_pipeline_start(struct media_entity *entity,
962 * @entity: Starting entity
964 * Mark all entities connected to a given entity through enabled links, either
972 void media_pipeline_stop(struct media_entity *entity);
977 * @entity: Starting entity
981 void __media_pipeline_stop(struct media_entity *entity);
1019 * media_create_intf_link() - creates a link between an entity and an interface
1021 * @entity: pointer to %media_entity
1031 * Indicates that the interface is connected to the entity hardware.
1047 __must_check media_create_intf_link(struct media_entity *entity,
1084 * #) This is called automatically when an entity is unregistered via
1093 * an entity
1095 * @entity: entity where the @operation will be called
1100 * it will issue a call to @operation\(@entity, @args\).
1103 #define media_entity_call(entity, operation, args...) \ argument
1104 (((entity)->ops && (entity)->ops->operation) ? \
1105 (entity)->ops->operation((entity) , ##args) : -ENOIOCTLCMD)