diff options
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/media-device.h | 4 | ||||
-rw-r--r-- | include/media/media-entity.h | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/include/media/media-device.h b/include/media/media-device.h index e01bbc427fcd..2ab4e6803842 100644 --- a/include/media/media-device.h +++ b/include/media/media-device.h @@ -261,6 +261,7 @@ * in the end provide a way to use driver-specific callbacks. */ +struct ida; struct device; /** @@ -278,6 +279,7 @@ struct device; * @pad_id: Unique ID used on the last pad registered * @link_id: Unique ID used on the last link registered * @intf_devnode_id: Unique ID used on the last interface devnode registered + * @entity_internal_idx: Allocated internal entity indices * @entities: List of registered entities * @interfaces: List of registered interfaces * @pads: List of registered pads @@ -313,6 +315,8 @@ struct media_device { u32 pad_id; u32 link_id; u32 intf_devnode_id; + struct ida entity_internal_idx; + int entity_internal_idx_max; struct list_head entities; struct list_head interfaces; diff --git a/include/media/media-entity.h b/include/media/media-entity.h index 81aca1f5a09a..30e8f9fd3efa 100644 --- a/include/media/media-entity.h +++ b/include/media/media-entity.h @@ -157,6 +157,8 @@ struct media_entity_operations { * @num_pads: Number of sink and source pads. * @num_links: Total number of links, forward and back, enabled and disabled. * @num_backlinks: Number of backlinks + * @internal_idx: An unique internal entity specific number. The numbers are + * re-used if entities are unregistered or registered again. * @pads: Pads array with the size defined by @num_pads. * @links: List of data links. * @ops: Entity operations. @@ -183,6 +185,7 @@ struct media_entity { u16 num_pads; u16 num_links; u16 num_backlinks; + int internal_idx; struct media_pad *pads; struct list_head links; |