Lines Matching full:entity

3  * Media entity
26 * @MEDIA_GRAPH_ENTITY: Identify a media entity
68 * @bmap: Bit map in which each bit represents one entity at struct
83 * @stack.entity: pointer to &struct media_entity at the graph.
90 struct media_entity *entity; member
113 * @list: Linked list associated with an entity or an interface that
125 * @entity: Part of a union. Used only if the second object (gobj1) is
126 * an entity.
143 struct media_entity *entity; member
182 * @entity: Entity this pad belongs to
183 * @index: Pad index in the entity pads array, numbered from 0 to n
191 struct media_entity *entity; member
198 * struct media_entity_operations - Media entity operations
202 * @link_setup: Notify the entity of link changes. The operation can
205 * @link_validate: Return whether a link is valid from the entity point of
215 int (*get_fwnode_pad)(struct media_entity *entity,
217 int (*link_setup)(struct media_entity *entity,
224 * enum media_entity_type - Media entity type
227 * The entity isn't embedded in another subsystem structure.
229 * The entity is embedded in a struct video_device instance.
231 * The entity is embedded in a struct v4l2_subdev instance.
233 * Media entity objects are often not instantiated directly, but the media
234 * entity structure is inherited by (through embedding) other subsystem-specific
235 * structures. The media entity type identifies the type of the subclass
236 * structure that implements a media entity instance.
239 * the correct object type. For instance, a media entity structure instance
251 * struct media_entity - A media entity graph object.
254 * @name: Entity name.
256 * @function: Entity main function, as defined in
259 * @flags: Entity flags, as defined in
265 * @internal_idx: An unique internal entity specific number. The numbers are
269 * @ops: Entity operations.
270 * @stream_count: Stream count for the entity.
271 * @use_count: Use count for the entity.
272 * @pipe: Pipeline this entity belongs to.
359 * media_entity_id() - return the media entity graph object id
361 * @entity: pointer to &media_entity
363 static inline u32 media_entity_id(struct media_entity *entity) in media_entity_id() argument
365 return entity->graph_obj.id; in media_entity_id()
405 * is_media_entity_v4l2_video_device() - Check if the entity is a video_device
406 * @entity: pointer to entity
408 * Return: %true if the entity is an instance of a video_device object and can
412 static inline bool is_media_entity_v4l2_video_device(struct media_entity *entity) in is_media_entity_v4l2_video_device() argument
414 return entity && entity->obj_type == MEDIA_ENTITY_TYPE_VIDEO_DEVICE; in is_media_entity_v4l2_video_device()
418 * is_media_entity_v4l2_subdev() - Check if the entity is a v4l2_subdev
419 * @entity: pointer to entity
421 * Return: %true if the entity is an instance of a &v4l2_subdev object and can
425 static inline bool is_media_entity_v4l2_subdev(struct media_entity *entity) in is_media_entity_v4l2_subdev() argument
427 return entity && entity->obj_type == MEDIA_ENTITY_TYPE_V4L2_SUBDEV; in is_media_entity_v4l2_subdev()
431 * __media_entity_enum_init - Initialise an entity enumeration
433 * @ent_enum: Entity enumeration to be initialised
442 * media_entity_enum_cleanup - Release resources of an entity enumeration
444 * @ent_enum: Entity enumeration to be released
451 * @ent_enum: Entity enumeration to be cleared
459 * media_entity_enum_set - Mark a single entity in the enum
461 * @ent_enum: Entity enumeration
462 * @entity: Entity to be marked
465 struct media_entity *entity) in media_entity_enum_set() argument
467 if (WARN_ON(entity->internal_idx >= ent_enum->idx_max)) in media_entity_enum_set()
470 __set_bit(entity->internal_idx, ent_enum->bmap); in media_entity_enum_set()
474 * media_entity_enum_clear - Unmark a single entity in the enum
476 * @ent_enum: Entity enumeration
477 * @entity: Entity to be unmarked
480 struct media_entity *entity) in media_entity_enum_clear() argument
482 if (WARN_ON(entity->internal_idx >= ent_enum->idx_max)) in media_entity_enum_clear()
485 __clear_bit(entity->internal_idx, ent_enum->bmap); in media_entity_enum_clear()
489 * media_entity_enum_test - Test whether the entity is marked
491 * @ent_enum: Entity enumeration
492 * @entity: Entity to be tested
494 * Returns %true if the entity was marked.
497 struct media_entity *entity) in media_entity_enum_test() argument
499 if (WARN_ON(entity->internal_idx >= ent_enum->idx_max)) in media_entity_enum_test()
502 return test_bit(entity->internal_idx, ent_enum->bmap); in media_entity_enum_test()
506 * media_entity_enum_test_and_set - Test whether the entity is marked,
509 * @ent_enum: Entity enumeration
510 * @entity: Entity to be tested
512 * Returns %true if the entity was marked, and mark it before doing so.
516 struct media_entity *entity) in media_entity_enum_test_and_set() argument
518 if (WARN_ON(entity->internal_idx >= ent_enum->idx_max)) in media_entity_enum_test_and_set()
521 return __test_and_set_bit(entity->internal_idx, ent_enum->bmap); in media_entity_enum_test_and_set()
527 * @ent_enum: Entity enumeration
529 * Return: %true if the entity was empty.
539 * @ent_enum1: First entity enumeration
540 * @ent_enum2: Second entity enumeration
542 * Return: %true if entity enumerations @ent_enum1 and @ent_enum2 intersect,
609 * function calls are used. However, if the object (entity, link, pad,
628 * media_entity_pads_init() - Initialize the entity pads
630 * @entity: entity where the pads belong
634 * The pads array is managed by the entity driver and passed to
643 * dynamically but is managed by the entity driver. Most drivers will embed the
649 int media_entity_pads_init(struct media_entity *entity, u16 num_pads,
653 * media_entity_cleanup() - free resources associated with an entity
655 * @entity: entity where the pads belong
658 * the entity (currently, it does nothing).
661 static inline void media_entity_cleanup(struct media_entity *entity) {} in media_entity_cleanup() argument
663 #define media_entity_cleanup(entity) do { } while (false) argument
667 * media_get_pad_index() - retrieves a pad index from an entity
669 * @entity: entity where the pads belong
673 * This helper function finds the first pad index inside an entity that
679 * entity is a NULL pointer, return -EINVAL.
681 int media_get_pad_index(struct media_entity *entity, bool is_sink,
769 void __media_entity_remove_links(struct media_entity *entity);
772 * media_entity_remove_links() - remove all links associated with an entity
774 * @entity: pointer to &media_entity
778 * This is called automatically when an entity is unregistered via
781 void media_entity_remove_links(struct media_entity *entity);
812 * link_setup call is made on the first entity to restore the original link
820 * Entity drivers must implement the link_setup operation if any of their links
833 * on media_create_intf_link(), for interface to entity links.
863 * @entity: The entity
873 * If the entity does not implement the get_fwnode_pad() operation
874 * then this function searches the entity for the first pad that
879 int media_entity_get_fwnode_pad(struct media_entity *entity,
901 * given entity
904 * @entity: Starting entity
909 * entities graph starting at the given entity. The traversal
915 struct media_entity *entity);
918 * media_graph_walk_next - Get the next entity in the graph
926 * Return: returns the next entity in the graph or %NULL if the whole graph
933 * @entity: Starting entity
936 * Mark all entities connected to a given entity through enabled links, either
938 * to every entity in the pipeline and stored in the media_entity pipe field.
945 __must_check int media_pipeline_start(struct media_entity *entity,
950 * @entity: Starting entity
955 __must_check int __media_pipeline_start(struct media_entity *entity,
960 * @entity: Starting entity
962 * Mark all entities connected to a given entity through enabled links, either
970 void media_pipeline_stop(struct media_entity *entity);
975 * @entity: Starting entity
979 void __media_pipeline_stop(struct media_entity *entity);
1017 * media_create_intf_link() - creates a link between an entity and an interface
1019 * @entity: pointer to %media_entity
1029 * Indicates that the interface is connected to the entity hardware.
1045 __must_check media_create_intf_link(struct media_entity *entity,
1082 * #) This is called automatically when an entity is unregistered via
1091 * an entity
1093 * @entity: entity where the @operation will be called
1098 * it will issue a call to @operation\(@entity, @args\).
1101 #define media_entity_call(entity, operation, args...) \ argument
1102 (((entity)->ops && (entity)->ops->operation) ? \
1103 (entity)->ops->operation((entity) , ##args) : -ENOIOCTLCMD)