Lines Matching +full:part +full:- +full:number
1 /* SPDX-License-Identifier: GPL-2.0-only */
26 * enum media_gobj_type - type of a graph object
42 #define MEDIA_BITS_PER_ID (32 - MEDIA_BITS_PER_TYPE)
43 #define MEDIA_ID_MASK GENMASK_ULL(MEDIA_BITS_PER_ID - 1, 0)
48 * struct media_gobj - Define a graph object.
51 * @id: Non-zero object ID identifier. The ID should be unique
55 * @list: List entry stored in one of the per-type mdev object lists
68 * struct media_entity_enum - An enumeration of media entities.
71 * media_entity->internal_idx.
72 * @idx_max: Number of bits in bmap
80 * struct media_graph - Media graph traversal state
101 * struct media_pipeline - Media pipeline related information
104 * @mdev: The media device the pipeline is part of
106 * @start_count: Media pipeline start - stop count
116 * struct media_pipeline_pad - A pad part of a media pipeline
119 * @pipe: The media_pipeline that the pad is part of
134 * struct media_pipeline_pad_iter - Iterator for media_pipeline_for_each_pad
143 * struct media_pipeline_entity_iter - Iterator for media_pipeline_for_each_entity
154 * struct media_link - A link object part of a media graph.
159 * @gobj0: Part of a union. Used to get the pointer for the first
161 * @source: Part of a union. Used only if the first object (gobj0) is
163 * @intf: Part of a union. Used only if the first object (gobj0) is
165 * @gobj1: Part of a union. Used to get the pointer for the second
167 * @sink: Part of a union. Used only if the second object (gobj1) is
169 * @entity: Part of a union. Used only if the second object (gobj1) is
195 * enum media_pad_signal_type - type of the signal inside a media pad
199 * uniquely identified by the pad number.
202 * Intermediate Frequency, a baseband signal or sub-carriers.
203 * Tuner inputs, IF-PLL demodulators, composite and s-video signals
211 * sub-carrier or an audio bitstream. IF signals are provided by tuners
223 * struct media_pad - A media pad graph object.
250 * struct media_entity_operations - Media entity operations
251 * @get_fwnode_pad: Return the pad number based on a fwnode endpoint or
253 * to map a fwnode to a media pad number. Optional.
262 * part of the same pipeline and enabling one of the pads
288 * enum media_entity_type - Media entity type
298 * entity structure is inherited by (through embedding) other subsystem-specific
315 * struct media_entity - A media entity graph object.
326 * @num_pads: Number of sink and source pads.
327 * @num_links: Total number of links, forward and back, enabled and disabled.
328 * @num_backlinks: Number of backlinks
329 * @internal_idx: An unique internal entity specific number. The numbers are
330 * re-used if entities are unregistered or registered again.
340 * @major: Devnode major number (zero if not applicable). Kept just
342 * @minor: Devnode minor number (zero if not applicable). Kept just
379 * media_entity_for_each_pad - Iterate on all pads in an entity
386 for (iter = (entity)->pads; \
387 iter < &(entity)->pads[(entity)->num_pads]; \
391 * struct media_interface - A media interface graph object.
414 * struct media_intf_devnode - A media interface via a device node.
417 * @major: Major number of a device node
418 * @minor: Minor number of a device node
429 * media_entity_id() - return the media entity graph object id
435 return entity->graph_obj.id; in media_entity_id()
439 * media_type() - return the media object type
445 return gobj->id >> MEDIA_BITS_PER_ID; in media_type()
449 * media_id() - return the media object ID
455 return gobj->id & MEDIA_ID_MASK; in media_id()
459 * media_gobj_gen_id() - encapsulates type and ID on at the object ID
475 * is_media_entity_v4l2_video_device() - Check if the entity is a video_device
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
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
512 * media_entity_enum_cleanup - Release resources of an entity enumeration
519 * media_entity_enum_zero - Clear the entire enum
525 bitmap_zero(ent_enum->bmap, ent_enum->idx_max); in media_entity_enum_zero()
529 * media_entity_enum_set - Mark a single entity in the enum
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
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
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,
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()
595 * media_entity_enum_empty - Test whether the entire enum is empty
603 return bitmap_empty(ent_enum->bmap, ent_enum->idx_max); in media_entity_enum_empty()
607 * media_entity_enum_intersects - Test whether two enums intersect
619 WARN_ON(ent_enum1->idx_max != ent_enum2->idx_max); in media_entity_enum_intersects()
621 return bitmap_intersects(ent_enum1->bmap, ent_enum2->bmap, in media_entity_enum_intersects()
622 min(ent_enum1->idx_max, ent_enum2->idx_max)); in media_entity_enum_intersects()
626 * gobj_to_entity - returns the struct &media_entity pointer from the
635 * gobj_to_pad - returns the struct &media_pad pointer from the
644 * gobj_to_link - returns the struct &media_link pointer from the
653 * gobj_to_intf - returns the struct &media_interface pointer from the
662 * intf_to_devnode - returns the struct media_intf_devnode pointer from the
671 * media_gobj_create - Initialize a graph object
688 * media_gobj_destroy - Stop using a graph object on a media device
698 * media_entity_pads_init() - Initialize the entity pads
701 * @num_pads: total number of sink and source pads
709 * &media_entity->num_pads with 0 and &media_entity->pads with %NULL or call
712 * As the number of pads is known in advance, the pads array is not allocated
714 * pads array in a driver-specific structure, avoiding dynamic allocation.
723 * media_entity_cleanup() - free resources associated with an entity
732 * valid and is a no-op.
741 * media_get_pad_index() - retrieves a pad index from an entity
752 * On success, return the pad number. If the pad was not found or the media
753 * entity is a NULL pointer, return -EINVAL.
759 * media_create_pad_link() - creates a link between two entities.
762 * @source_pad: number of the source pad in the pads array
764 * @sink_pad: number of the sink pad in the pads array.
791 * media_create_pad_links() - creates a link between two entities.
798 * @source_pad: number of the source pad in the pads array
802 * @sink_pad: number of the sink pad in the pads array.
825 * cross-bar (n:n) links.
846 * media_entity_remove_links() - remove all links associated with an entity
858 * __media_entity_setup_link - Configure a media link without locking
868 * The user is expected to hold link->source->parent->mutex. If not,
874 * media_entity_setup_link() - changes the link flags properties in runtime
895 * is non-immutable. The operation must either configure the hardware or store
900 * being enabled, the link_setup operation must return %-EBUSY and can't
912 * media_entity_find_link - Find a link between two pads
923 * media_pad_remote_pad_first - Find the first pad at the remote end of a link
935 * media_pad_remote_pad_unique - Find a remote pad connected to a pad
947 * * -ENOTUNIQ - Multiple links are enabled
948 * * -ENOLINK - No connected pad found
953 * media_entity_remote_pad_unique - Find a remote pad connected to an entity
967 * * -ENOTUNIQ - Multiple links are enabled
968 * * -ENOLINK - No connected pad found
975 * media_entity_remote_source_pad_unique - Find a remote source pad connected to
989 * * -ENOTUNIQ - Multiple links are enabled
990 * * -ENOLINK - No connected pad found
999 * media_pad_is_streaming - Test if a pad is part of a streaming pipeline
1002 * Return: True if the pad is part of a pipeline started with the
1007 return pad->pipe; in media_pad_is_streaming()
1011 * media_entity_is_streaming - Test if an entity is part of a streaming pipeline
1014 * Return: True if the entity is part of a pipeline started with the
1030 * media_entity_pipeline - Get the media pipeline an entity is part of
1039 * In general, entities can be part of multiple pipelines, when carrying
1044 * Return: The media_pipeline the entity is part of, or NULL if the entity is
1045 * not part of any pipeline.
1050 * media_pad_pipeline - Get the media pipeline a pad is part of
1057 * Return: The media_pipeline the pad is part of, or NULL if the pad is
1058 * not part of any pipeline.
1063 * media_entity_get_fwnode_pad - Get pad number from fwnode
1071 * This function can be used to resolve the media pad number from
1079 * Return: returns the pad number on success or a negative error code.
1086 * media_graph_walk_init - Allocate resources used by graph walk.
1102 * media_graph_walk_cleanup - Release resources used by graph walk.
1111 * media_graph_walk_start - Start walking the media graph at a
1131 * media_graph_walk_next - Get the next entity in the graph
1136 * Perform a depth-first traversal of the given media entities graph.
1147 * media_pipeline_start - Mark a pipeline as streaming
1155 * Calls to this function can be nested, in which case the same number of
1163 * __media_pipeline_start - Mark a pipeline as streaming
1168 * ..note:: This is the non-locking version of media_pipeline_start()
1174 * media_pipeline_stop - Mark a pipeline as not streaming
1182 * number of calls to this function are required to mark the pipeline as not
1188 * __media_pipeline_stop - Mark a pipeline as not streaming
1192 * .. note:: This is the non-locking version of media_pipeline_stop()
1202 * media_pipeline_for_each_pad - Iterate on all pads in a media pipeline
1217 * media_pipeline_entity_iter_init - Initialize a pipeline entity iterator
1235 * media_pipeline_entity_iter_cleanup - Destroy a pipeline entity iterator
1249 * media_pipeline_for_each_entity - Iterate on all entities in a media pipeline
1267 * media_pipeline_alloc_start - Mark a pipeline as streaming
1272 * the pad is already part of a pipeline, or allocate a new pipeline.
1280 * media_devnode_create() - creates and initializes a device node interface
1289 * @major: Device node major number.
1290 * @minor: Device node minor number.
1304 * media_devnode_remove() - removes a device node interface
1314 * media_create_intf_link() - creates a link between an entity and an interface
1340 * interface that will be part of the link.
1347 * __media_remove_intf_link() - remove a single interface link
1356 * media_remove_intf_link() - remove a single interface link
1365 * __media_remove_intf_links() - remove all links associated with an interface
1374 * media_remove_intf_links() - remove all links associated with an interface
1388 * media_entity_call - Calls a struct media_entity_operations operation on
1400 (((entity)->ops && (entity)->ops->operation) ? \
1401 (entity)->ops->operation((entity) , ##args) : -ENOIOCTLCMD)
1404 * media_create_ancillary_link() - create an ancillary link between two
1423 * __media_entity_next_link() - Iterate through a &media_entity's links
1438 * for_each_media_entity_data_link() - Iterate through an entity's data links