Searched refs:entity (Results 1 - 200 of 254) sorted by relevance

12

/linux-4.1.27/drivers/media/usb/uvc/
H A Duvc_entity.c27 struct uvc_entity *entity) uvc_mc_register_entity()
34 sink = (UVC_ENTITY_TYPE(entity) == UVC_TT_STREAMING) uvc_mc_register_entity()
35 ? (entity->vdev ? &entity->vdev->entity : NULL) uvc_mc_register_entity()
36 : &entity->subdev.entity; uvc_mc_register_entity()
40 for (i = 0; i < entity->num_pads; ++i) { uvc_mc_register_entity()
45 if (!(entity->pads[i].flags & MEDIA_PAD_FL_SINK)) uvc_mc_register_entity()
48 remote = uvc_entity_by_id(chain->dev, entity->baSourceID[i]); uvc_mc_register_entity()
53 ? (remote->vdev ? &remote->vdev->entity : NULL) uvc_mc_register_entity()
54 : &remote->subdev.entity; uvc_mc_register_entity()
65 if (UVC_ENTITY_TYPE(entity) == UVC_TT_STREAMING) uvc_mc_register_entity()
68 return v4l2_device_register_subdev(&chain->dev->vdev, &entity->subdev); uvc_mc_register_entity()
74 void uvc_mc_cleanup_entity(struct uvc_entity *entity) uvc_mc_cleanup_entity() argument
76 if (UVC_ENTITY_TYPE(entity) != UVC_TT_STREAMING) uvc_mc_cleanup_entity()
77 media_entity_cleanup(&entity->subdev.entity); uvc_mc_cleanup_entity()
78 else if (entity->vdev != NULL) uvc_mc_cleanup_entity()
79 media_entity_cleanup(&entity->vdev->entity); uvc_mc_cleanup_entity()
82 static int uvc_mc_init_entity(struct uvc_entity *entity) uvc_mc_init_entity() argument
86 if (UVC_ENTITY_TYPE(entity) != UVC_TT_STREAMING) { uvc_mc_init_entity()
87 v4l2_subdev_init(&entity->subdev, &uvc_subdev_ops); uvc_mc_init_entity()
88 strlcpy(entity->subdev.name, entity->name, uvc_mc_init_entity()
89 sizeof(entity->subdev.name)); uvc_mc_init_entity()
91 ret = media_entity_init(&entity->subdev.entity, uvc_mc_init_entity()
92 entity->num_pads, entity->pads, 0); uvc_mc_init_entity()
93 } else if (entity->vdev != NULL) { uvc_mc_init_entity()
94 ret = media_entity_init(&entity->vdev->entity, uvc_mc_init_entity()
95 entity->num_pads, entity->pads, 0); uvc_mc_init_entity()
96 if (entity->flags & UVC_ENTITY_FLAG_DEFAULT) uvc_mc_init_entity()
97 entity->vdev->entity.flags |= MEDIA_ENT_FL_DEFAULT; uvc_mc_init_entity()
106 struct uvc_entity *entity; uvc_mc_register_entities() local
109 list_for_each_entry(entity, &chain->entities, chain) { uvc_mc_register_entities()
110 ret = uvc_mc_init_entity(entity); uvc_mc_register_entities()
112 uvc_printk(KERN_INFO, "Failed to initialize entity for " uvc_mc_register_entities()
113 "entity %u\n", entity->id); uvc_mc_register_entities()
118 list_for_each_entry(entity, &chain->entities, chain) { uvc_mc_register_entities()
119 ret = uvc_mc_register_entity(chain, entity); uvc_mc_register_entities()
121 uvc_printk(KERN_INFO, "Failed to register entity for " uvc_mc_register_entities()
122 "entity %u\n", entity->id); uvc_mc_register_entities()
26 uvc_mc_register_entity(struct uvc_video_chain *chain, struct uvc_entity *entity) uvc_mc_register_entity() argument
H A Duvc_ctrl.c42 .entity = UVC_GUID_UVC_PROCESSING,
51 .entity = UVC_GUID_UVC_PROCESSING,
60 .entity = UVC_GUID_UVC_PROCESSING,
70 .entity = UVC_GUID_UVC_PROCESSING,
79 .entity = UVC_GUID_UVC_PROCESSING,
88 .entity = UVC_GUID_UVC_PROCESSING,
97 .entity = UVC_GUID_UVC_PROCESSING,
107 .entity = UVC_GUID_UVC_PROCESSING,
117 .entity = UVC_GUID_UVC_PROCESSING,
126 .entity = UVC_GUID_UVC_PROCESSING,
135 .entity = UVC_GUID_UVC_PROCESSING,
143 .entity = UVC_GUID_UVC_PROCESSING,
151 .entity = UVC_GUID_UVC_PROCESSING,
159 .entity = UVC_GUID_UVC_PROCESSING,
167 .entity = UVC_GUID_UVC_PROCESSING,
176 .entity = UVC_GUID_UVC_PROCESSING,
185 .entity = UVC_GUID_UVC_PROCESSING,
192 .entity = UVC_GUID_UVC_PROCESSING,
199 .entity = UVC_GUID_UVC_CAMERA,
207 .entity = UVC_GUID_UVC_CAMERA,
216 .entity = UVC_GUID_UVC_CAMERA,
224 .entity = UVC_GUID_UVC_CAMERA,
233 .entity = UVC_GUID_UVC_CAMERA,
240 .entity = UVC_GUID_UVC_CAMERA,
250 .entity = UVC_GUID_UVC_CAMERA,
260 .entity = UVC_GUID_UVC_CAMERA,
270 .entity = UVC_GUID_UVC_CAMERA,
278 .entity = UVC_GUID_UVC_CAMERA,
288 .entity = UVC_GUID_UVC_CAMERA,
298 .entity = UVC_GUID_UVC_CAMERA,
308 .entity = UVC_GUID_UVC_CAMERA,
317 .entity = UVC_GUID_UVC_CAMERA,
327 .entity = UVC_GUID_UVC_CAMERA,
337 .entity = UVC_GUID_UVC_CAMERA,
345 .entity = UVC_GUID_UVC_CAMERA,
426 .entity = UVC_GUID_UVC_PROCESSING,
436 .entity = UVC_GUID_UVC_PROCESSING,
446 .entity = UVC_GUID_UVC_PROCESSING,
458 .entity = UVC_GUID_UVC_PROCESSING,
468 .entity = UVC_GUID_UVC_PROCESSING,
478 .entity = UVC_GUID_UVC_PROCESSING,
488 .entity = UVC_GUID_UVC_PROCESSING,
498 .entity = UVC_GUID_UVC_PROCESSING,
508 .entity = UVC_GUID_UVC_PROCESSING,
520 .entity = UVC_GUID_UVC_PROCESSING,
531 .entity = UVC_GUID_UVC_CAMERA,
544 .entity = UVC_GUID_UVC_CAMERA,
554 .entity = UVC_GUID_UVC_CAMERA,
566 .entity = UVC_GUID_UVC_PROCESSING,
577 .entity = UVC_GUID_UVC_PROCESSING,
589 .entity = UVC_GUID_UVC_PROCESSING,
601 .entity = UVC_GUID_UVC_PROCESSING,
613 .entity = UVC_GUID_UVC_PROCESSING,
625 .entity = UVC_GUID_UVC_CAMERA,
637 .entity = UVC_GUID_UVC_CAMERA,
648 .entity = UVC_GUID_UVC_CAMERA,
658 .entity = UVC_GUID_UVC_CAMERA,
668 .entity = UVC_GUID_UVC_CAMERA,
678 .entity = UVC_GUID_UVC_CAMERA,
690 .entity = UVC_GUID_UVC_CAMERA,
700 .entity = UVC_GUID_UVC_CAMERA,
710 .entity = UVC_GUID_UVC_CAMERA,
722 .entity = UVC_GUID_UVC_CAMERA,
734 .entity = UVC_GUID_UVC_CAMERA,
833 static int uvc_entity_match_guid(const struct uvc_entity *entity, uvc_entity_match_guid() argument
836 switch (UVC_ENTITY_TYPE(entity)) { uvc_entity_match_guid()
847 return memcmp(entity->extension.guidExtensionCode, uvc_entity_match_guid()
859 static void __uvc_find_control(struct uvc_entity *entity, __u32 v4l2_id, __uvc_find_control() argument
867 if (entity == NULL) __uvc_find_control()
870 for (i = 0; i < entity->ncontrols; ++i) { __uvc_find_control()
871 ctrl = &entity->controls[i]; __uvc_find_control()
895 struct uvc_entity *entity; uvc_find_control() local
904 list_for_each_entry(entity, &chain->entities, chain) { uvc_find_control()
905 __uvc_find_control(entity, v4l2_id, mapping, &ctrl, next); uvc_find_control()
923 ret = uvc_query_ctrl(chain->dev, UVC_GET_DEF, ctrl->entity->id, uvc_ctrl_populate_cache()
932 ret = uvc_query_ctrl(chain->dev, UVC_GET_MIN, ctrl->entity->id, uvc_ctrl_populate_cache()
940 ret = uvc_query_ctrl(chain->dev, UVC_GET_MAX, ctrl->entity->id, uvc_ctrl_populate_cache()
948 ret = uvc_query_ctrl(chain->dev, UVC_GET_RES, ctrl->entity->id, uvc_ctrl_populate_cache()
953 if (UVC_ENTITY_TYPE(ctrl->entity) != uvc_ctrl_populate_cache()
985 ret = uvc_query_ctrl(chain->dev, UVC_GET_CUR, ctrl->entity->id, __uvc_ctrl_get()
1033 __uvc_find_control(ctrl->entity, mapping->master_id, __uvc_query_v4l2_ctrl()
1257 __uvc_find_control(master->entity, slave_id, &mapping, &ctrl, 0); uvc_ctrl_send_slave_event()
1390 struct uvc_entity *entity, int rollback) uvc_ctrl_commit_entity()
1396 if (entity == NULL) uvc_ctrl_commit_entity()
1399 for (i = 0; i < entity->ncontrols; ++i) { uvc_ctrl_commit_entity()
1400 ctrl = &entity->controls[i]; uvc_ctrl_commit_entity()
1418 ret = uvc_query_ctrl(dev, UVC_SET_CUR, ctrl->entity->id, uvc_ctrl_commit_entity()
1444 struct uvc_entity *entity; __uvc_ctrl_commit() local
1448 list_for_each_entry(entity, &chain->entities, chain) { __uvc_ctrl_commit()
1449 ret = uvc_ctrl_commit_entity(chain->dev, entity, rollback); __uvc_ctrl_commit()
1562 ctrl->entity->id, chain->dev->intfnum, uvc_ctrl_set()
1597 u8 entity; uvc_ctrl_fixup_xu_info() member in struct:uvc_ctrl_fixup
1623 if (fixups[i].entity == ctrl->entity->id && uvc_ctrl_fixup_xu_info()
1644 memcpy(info->entity, ctrl->entity->extension.guidExtensionCode, uvc_ctrl_fill_xu_info()
1645 sizeof(info->entity)); uvc_ctrl_fill_xu_info()
1650 ret = uvc_query_ctrl(dev, UVC_GET_LEN, ctrl->entity->id, dev->intfnum, uvc_ctrl_fill_xu_info()
1655 info->entity, info->selector, ret); uvc_ctrl_fill_xu_info()
1662 ret = uvc_query_ctrl(dev, UVC_GET_INFO, ctrl->entity->id, dev->intfnum, uvc_ctrl_fill_xu_info()
1667 info->entity, info->selector, ret); uvc_ctrl_fill_xu_info()
1684 info->entity, info->selector, info->size, uvc_ctrl_fill_xu_info()
1713 "%pUl/%u on device %s entity %u\n", info.entity, uvc_ctrl_init_xu_ctrl()
1714 info.selector, dev->udev->devpath, ctrl->entity->id); uvc_ctrl_init_xu_ctrl()
1722 struct uvc_entity *entity; uvc_xu_ctrl_query() local
1731 list_for_each_entry(entity, &chain->entities, chain) { uvc_xu_ctrl_query()
1732 if (UVC_ENTITY_TYPE(entity) == UVC_VC_EXTENSION_UNIT && uvc_xu_ctrl_query()
1733 entity->id == xqry->unit) uvc_xu_ctrl_query()
1737 if (entity->id != xqry->unit) { uvc_xu_ctrl_query()
1744 for (i = 0; i < entity->ncontrols; ++i) { uvc_xu_ctrl_query()
1745 ctrl = &entity->controls[i]; uvc_xu_ctrl_query()
1754 entity->extension.guidExtensionCode, xqry->selector); uvc_xu_ctrl_query()
1853 struct uvc_entity *entity; uvc_ctrl_restore_values() local
1858 list_for_each_entry(entity, &dev->entities, list) { uvc_ctrl_restore_values()
1860 for (i = 0; i < entity->ncontrols; ++i) { uvc_ctrl_restore_values()
1861 ctrl = &entity->controls[i]; uvc_ctrl_restore_values()
1868 ctrl->info.entity, ctrl->info.index, uvc_ctrl_restore_values()
1873 ret = uvc_ctrl_commit_entity(dev, entity, 0); uvc_ctrl_restore_values()
1907 "entity %u\n", ctrl->info.entity, ctrl->info.selector, uvc_ctrl_add_info()
1908 dev->udev->devpath, ctrl->entity->id); uvc_ctrl_add_info()
1950 map->name, ctrl->info.entity, ctrl->info.selector); __uvc_ctrl_add_mapping()
1960 struct uvc_entity *entity; uvc_ctrl_add_mapping() local
1973 list_for_each_entry(entity, &chain->entities, chain) { uvc_ctrl_add_mapping()
1976 if (UVC_ENTITY_TYPE(entity) != UVC_VC_EXTENSION_UNIT || uvc_ctrl_add_mapping()
1977 !uvc_entity_match_guid(entity, mapping->entity)) uvc_ctrl_add_mapping()
1980 for (i = 0; i < entity->ncontrols; ++i) { uvc_ctrl_add_mapping()
1981 ctrl = &entity->controls[i]; uvc_ctrl_add_mapping()
2034 * Prune an entity of its bogus controls using a blacklist. Bogus controls
2039 struct uvc_entity *entity) uvc_ctrl_prune_entity()
2061 switch (UVC_ENTITY_TYPE(entity)) { uvc_ctrl_prune_entity()
2065 controls = entity->processing.bmControls; uvc_ctrl_prune_entity()
2066 size = entity->processing.bControlSize; uvc_ctrl_prune_entity()
2072 controls = entity->camera.bmControls; uvc_ctrl_prune_entity()
2073 size = entity->camera.bControlSize; uvc_ctrl_prune_entity()
2089 "removing it.\n", entity->id, blacklist[i].index); uvc_ctrl_prune_entity()
2112 if (UVC_ENTITY_TYPE(ctrl->entity) == UVC_VC_EXTENSION_UNIT) uvc_ctrl_init_ctrl()
2116 if (uvc_entity_match_guid(ctrl->entity, info->entity) && uvc_ctrl_init_ctrl()
2127 if (uvc_entity_match_guid(ctrl->entity, mapping->entity) && uvc_ctrl_init_ctrl()
2138 struct uvc_entity *entity; uvc_ctrl_init_device() local
2142 list_for_each_entry(entity, &dev->entities, list) { uvc_ctrl_init_device()
2147 if (UVC_ENTITY_TYPE(entity) == UVC_VC_EXTENSION_UNIT) { uvc_ctrl_init_device()
2148 bmControls = entity->extension.bmControls; uvc_ctrl_init_device()
2149 bControlSize = entity->extension.bControlSize; uvc_ctrl_init_device()
2150 } else if (UVC_ENTITY_TYPE(entity) == UVC_VC_PROCESSING_UNIT) { uvc_ctrl_init_device()
2151 bmControls = entity->processing.bmControls; uvc_ctrl_init_device()
2152 bControlSize = entity->processing.bControlSize; uvc_ctrl_init_device()
2153 } else if (UVC_ENTITY_TYPE(entity) == UVC_ITT_CAMERA) { uvc_ctrl_init_device()
2154 bmControls = entity->camera.bmControls; uvc_ctrl_init_device()
2155 bControlSize = entity->camera.bControlSize; uvc_ctrl_init_device()
2159 uvc_ctrl_prune_entity(dev, entity); uvc_ctrl_init_device()
2166 entity->controls = kcalloc(ncontrols, sizeof(*ctrl), uvc_ctrl_init_device()
2168 if (entity->controls == NULL) uvc_ctrl_init_device()
2170 entity->ncontrols = ncontrols; uvc_ctrl_init_device()
2173 ctrl = entity->controls; uvc_ctrl_init_device()
2178 ctrl->entity = entity; uvc_ctrl_init_device()
2206 struct uvc_entity *entity; uvc_ctrl_cleanup_device() local
2210 list_for_each_entry(entity, &dev->entities, list) { uvc_ctrl_cleanup_device()
2211 for (i = 0; i < entity->ncontrols; ++i) { uvc_ctrl_cleanup_device()
2212 struct uvc_control *ctrl = &entity->controls[i]; uvc_ctrl_cleanup_device()
2221 kfree(entity->controls); uvc_ctrl_cleanup_device()
1389 uvc_ctrl_commit_entity(struct uvc_device *dev, struct uvc_entity *entity, int rollback) uvc_ctrl_commit_entity() argument
2038 uvc_ctrl_prune_entity(struct uvc_device *dev, struct uvc_entity *entity) uvc_ctrl_prune_entity() argument
H A Duvc_driver.c287 struct uvc_entity *entity; uvc_entity_by_id() local
289 list_for_each_entry(entity, &dev->entities, list) { uvc_entity_by_id()
290 if (entity->id == id) uvc_entity_by_id()
291 return entity; uvc_entity_by_id()
298 int id, struct uvc_entity *entity) uvc_entity_by_reference()
302 if (entity == NULL) uvc_entity_by_reference()
303 entity = list_entry(&dev->entities, struct uvc_entity, list); uvc_entity_by_reference()
305 list_for_each_entry_continue(entity, &dev->entities, list) { uvc_entity_by_reference()
306 for (i = 0; i < entity->bNrInPins; ++i) uvc_entity_by_reference()
307 if (entity->baSourceID[i] == id) uvc_entity_by_reference()
308 return entity; uvc_entity_by_reference()
845 struct uvc_entity *entity; uvc_alloc_entity() local
850 extra_size = ALIGN(extra_size, sizeof(*entity->pads)); uvc_alloc_entity()
852 size = sizeof(*entity) + extra_size + sizeof(*entity->pads) * num_pads uvc_alloc_entity()
854 entity = kzalloc(size, GFP_KERNEL); uvc_alloc_entity()
855 if (entity == NULL) uvc_alloc_entity()
858 entity->id = id; uvc_alloc_entity()
859 entity->type = type; uvc_alloc_entity()
861 entity->num_links = 0; uvc_alloc_entity()
862 entity->num_pads = num_pads; uvc_alloc_entity()
863 entity->pads = ((void *)(entity + 1)) + extra_size; uvc_alloc_entity()
866 entity->pads[i].flags = MEDIA_PAD_FL_SINK; uvc_alloc_entity()
867 if (!UVC_ENTITY_IS_OTERM(entity)) uvc_alloc_entity()
868 entity->pads[num_pads-1].flags = MEDIA_PAD_FL_SOURCE; uvc_alloc_entity()
870 entity->bNrInPins = num_inputs; uvc_alloc_entity()
871 entity->baSourceID = (__u8 *)(&entity->pads[num_pads]); uvc_alloc_entity()
873 return entity; uvc_alloc_entity()
1286 struct uvc_entity *entity) uvc_scan_chain_entity()
1288 switch (UVC_ENTITY_TYPE(entity)) { uvc_scan_chain_entity()
1291 printk(" <- XU %d", entity->id); uvc_scan_chain_entity()
1293 if (entity->bNrInPins != 1) { uvc_scan_chain_entity()
1295 "than 1 input pin.\n", entity->id); uvc_scan_chain_entity()
1303 printk(" <- PU %d", entity->id); uvc_scan_chain_entity()
1311 chain->processing = entity; uvc_scan_chain_entity()
1316 printk(" <- SU %d", entity->id); uvc_scan_chain_entity()
1319 if (entity->bNrInPins == 1) uvc_scan_chain_entity()
1328 chain->selector = entity; uvc_scan_chain_entity()
1335 printk(" <- IT %d\n", entity->id); uvc_scan_chain_entity()
1343 printk(" OT %d", entity->id); uvc_scan_chain_entity()
1348 if (UVC_ENTITY_IS_ITERM(entity)) { uvc_scan_chain_entity()
1350 printk(" <- IT %d\n", entity->id); uvc_scan_chain_entity()
1353 printk(" OT %d", entity->id); uvc_scan_chain_entity()
1359 uvc_trace(UVC_TRACE_DESCR, "Unsupported entity type " uvc_scan_chain_entity()
1360 "0x%04x found in chain.\n", UVC_ENTITY_TYPE(entity)); uvc_scan_chain_entity()
1364 list_add_tail(&entity->chain, &chain->entities); uvc_scan_chain_entity()
1369 struct uvc_entity *entity, struct uvc_entity *prev) uvc_scan_chain_forward()
1379 forward = uvc_entity_by_reference(chain->dev, entity->id, uvc_scan_chain_forward()
1391 entity->id); uvc_scan_chain_forward()
1435 struct uvc_entity *entity = *_entity; uvc_scan_chain_backward() local
1439 switch (UVC_ENTITY_TYPE(entity)) { uvc_scan_chain_backward()
1442 id = entity->baSourceID[0]; uvc_scan_chain_backward()
1447 if (entity->bNrInPins == 1) { uvc_scan_chain_backward()
1448 id = entity->baSourceID[0]; uvc_scan_chain_backward()
1455 chain->selector = entity; uvc_scan_chain_backward()
1456 for (i = 0; i < entity->bNrInPins; ++i) { uvc_scan_chain_backward()
1457 id = entity->baSourceID[i]; uvc_scan_chain_backward()
1462 "input terminal\n", entity->id, i); uvc_scan_chain_backward()
1470 uvc_scan_chain_forward(chain, term, entity); uvc_scan_chain_backward()
1486 id = UVC_ENTITY_IS_OTERM(entity) ? entity->baSourceID[0] : 0; uvc_scan_chain_backward()
1495 entity = uvc_entity_by_id(chain->dev, id); uvc_scan_chain_backward()
1496 if (entity == NULL) { uvc_scan_chain_backward()
1498 "unknown entity %d.\n", id); uvc_scan_chain_backward()
1502 *_entity = entity; uvc_scan_chain_backward()
1509 struct uvc_entity *entity, *prev; uvc_scan_chain() local
1513 entity = term; uvc_scan_chain()
1516 while (entity != NULL) { uvc_scan_chain()
1518 if (entity->chain.next || entity->chain.prev) { uvc_scan_chain()
1520 "entity %d already in chain.\n", entity->id); uvc_scan_chain()
1524 /* Process entity */ uvc_scan_chain()
1525 if (uvc_scan_chain_entity(chain, entity) < 0) uvc_scan_chain()
1529 if (uvc_scan_chain_forward(chain, entity, prev) < 0) uvc_scan_chain()
1533 prev = entity; uvc_scan_chain()
1534 if (uvc_scan_chain_backward(chain, &entity) < 0) uvc_scan_chain()
1667 struct uvc_entity *entity; uvc_delete() local
1668 entity = list_entry(p, struct uvc_entity, list); uvc_delete()
1670 uvc_mc_cleanup_entity(entity); uvc_delete()
1672 kfree(entity); uvc_delete()
297 uvc_entity_by_reference(struct uvc_device *dev, int id, struct uvc_entity *entity) uvc_entity_by_reference() argument
1285 uvc_scan_chain_entity(struct uvc_video_chain *chain, struct uvc_entity *entity) uvc_scan_chain_entity() argument
1368 uvc_scan_chain_forward(struct uvc_video_chain *chain, struct uvc_entity *entity, struct uvc_entity *prev) uvc_scan_chain_forward() argument
H A Duvcvideo.h28 #define UVC_ENTITY_TYPE(entity) ((entity)->type & 0x7fff)
29 #define UVC_ENTITY_IS_UNIT(entity) (((entity)->type & 0xff00) == 0)
30 #define UVC_ENTITY_IS_TERM(entity) (((entity)->type & 0xff00) != 0)
31 #define UVC_ENTITY_IS_ITERM(entity) \
32 (UVC_ENTITY_IS_TERM(entity) && \
33 ((entity)->type & 0x8000) == UVC_TERM_INPUT)
34 #define UVC_ENTITY_IS_OTERM(entity) \
35 (UVC_ENTITY_IS_TERM(entity) && \
36 ((entity)->type & 0x8000) == UVC_TERM_OUTPUT)
172 __u8 entity[16]; member in struct:uvc_control_info
186 __u8 entity[16]; member in struct:uvc_control_mapping
208 struct uvc_entity *entity; member in struct:uvc_control
228 /* The term 'entity' refers to both UVC units and UVC terminals.
667 extern void uvc_mc_cleanup_entity(struct uvc_entity *entity);
H A Duvc_v4l2.c49 memcpy(map->entity, xmap->entity, sizeof map->entity); uvc_ioctl_ctrl_map()
1231 __u8 entity[16]; member in struct:uvc_xu_control_mapping32
/linux-4.1.27/drivers/media/platform/vsp1/
H A Dvsp1_entity.c17 #include <media/media-entity.h>
25 bool vsp1_entity_is_streaming(struct vsp1_entity *entity) vsp1_entity_is_streaming() argument
29 mutex_lock(&entity->lock); vsp1_entity_is_streaming()
30 streaming = entity->streaming; vsp1_entity_is_streaming()
31 mutex_unlock(&entity->lock); vsp1_entity_is_streaming()
36 int vsp1_entity_set_streaming(struct vsp1_entity *entity, bool streaming) vsp1_entity_set_streaming() argument
40 mutex_lock(&entity->lock); vsp1_entity_set_streaming()
41 entity->streaming = streaming; vsp1_entity_set_streaming()
42 mutex_unlock(&entity->lock); vsp1_entity_set_streaming()
47 if (!entity->subdev.ctrl_handler) vsp1_entity_set_streaming()
50 ret = v4l2_ctrl_handler_setup(entity->subdev.ctrl_handler); vsp1_entity_set_streaming()
52 mutex_lock(&entity->lock); vsp1_entity_set_streaming()
53 entity->streaming = false; vsp1_entity_set_streaming()
54 mutex_unlock(&entity->lock); vsp1_entity_set_streaming()
65 vsp1_entity_get_pad_format(struct vsp1_entity *entity, vsp1_entity_get_pad_format() argument
71 return v4l2_subdev_get_try_format(&entity->subdev, cfg, pad); vsp1_entity_get_pad_format()
73 return &entity->formats[pad]; vsp1_entity_get_pad_format()
94 for (pad = 0; pad < subdev->entity.num_pads - 1; ++pad) { vsp1_entity_init_formats()
121 static int vsp1_entity_link_setup(struct media_entity *entity, vsp1_entity_link_setup() argument
130 source = container_of(local->entity, struct vsp1_entity, subdev.entity); vsp1_entity_link_setup()
138 source->sink = remote->entity; vsp1_entity_link_setup()
180 int vsp1_entity_init(struct vsp1_device *vsp1, struct vsp1_entity *entity, vsp1_entity_init() argument
186 if (vsp1_routes[i].type == entity->type && vsp1_entity_init()
187 vsp1_routes[i].index == entity->index) { vsp1_entity_init()
188 entity->route = &vsp1_routes[i]; vsp1_entity_init()
196 mutex_init(&entity->lock); vsp1_entity_init()
198 entity->vsp1 = vsp1; vsp1_entity_init()
199 entity->source_pad = num_pads - 1; vsp1_entity_init()
202 entity->formats = devm_kzalloc(vsp1->dev, vsp1_entity_init()
203 num_pads * sizeof(*entity->formats), vsp1_entity_init()
205 if (entity->formats == NULL) vsp1_entity_init()
208 entity->pads = devm_kzalloc(vsp1->dev, num_pads * sizeof(*entity->pads), vsp1_entity_init()
210 if (entity->pads == NULL) vsp1_entity_init()
215 entity->pads[i].flags = MEDIA_PAD_FL_SINK; vsp1_entity_init()
217 entity->pads[num_pads - 1].flags = MEDIA_PAD_FL_SOURCE; vsp1_entity_init()
219 /* Initialize the media entity. */ vsp1_entity_init()
220 return media_entity_init(&entity->subdev.entity, num_pads, vsp1_entity_init()
221 entity->pads, 0); vsp1_entity_init()
224 void vsp1_entity_destroy(struct vsp1_entity *entity) vsp1_entity_destroy() argument
226 if (entity->video) vsp1_entity_destroy()
227 vsp1_video_cleanup(entity->video); vsp1_entity_destroy()
228 if (entity->subdev.ctrl_handler) vsp1_entity_destroy()
229 v4l2_ctrl_handler_free(entity->subdev.ctrl_handler); vsp1_entity_destroy()
230 media_entity_cleanup(&entity->subdev.entity); vsp1_entity_destroy()
232 mutex_destroy(&entity->lock); vsp1_entity_destroy()
H A Dvsp1_wpf.c31 return vsp1_read(wpf->entity.vsp1, vsp1_wpf_read()
32 reg + wpf->entity.index * VI6_WPF_OFFSET); vsp1_wpf_read()
37 vsp1_write(wpf->entity.vsp1, vsp1_wpf_write()
38 reg + wpf->entity.index * VI6_WPF_OFFSET, data); vsp1_wpf_write()
51 if (!vsp1_entity_is_streaming(&wpf->entity)) wpf_s_ctrl()
76 struct vsp1_pipeline *pipe = to_vsp1_pipeline(&subdev->entity); wpf_s_stream()
78 struct vsp1_device *vsp1 = wpf->entity.vsp1; wpf_s_stream()
85 ret = vsp1_entity_set_streaming(&wpf->entity, enable); wpf_s_stream()
90 vsp1_write(vsp1, VI6_WPF_IRQ_ENB(wpf->entity.index), 0); wpf_s_stream()
104 ? VI6_WPF_SRCRPF_RPF_ACT_MST(input->entity.index) wpf_s_stream()
105 : VI6_WPF_SRCRPF_RPF_ACT_SUB(input->entity.index); wpf_s_stream()
147 if (wpf->entity.formats[RWPF_PAD_SINK].code != wpf_s_stream()
148 wpf->entity.formats[RWPF_PAD_SOURCE].code) wpf_s_stream()
159 vsp1_write(vsp1, VI6_DPR_WPF_FPORCH(wpf->entity.index), wpf_s_stream()
165 vsp1_write(vsp1, VI6_WPF_IRQ_STA(wpf->entity.index), 0); wpf_s_stream()
166 vsp1_write(vsp1, VI6_WPF_IRQ_ENB(wpf->entity.index), wpf_s_stream()
233 wpf->entity.type = VSP1_ENTITY_WPF; vsp1_wpf_create()
234 wpf->entity.index = index; vsp1_wpf_create()
236 ret = vsp1_entity_init(vsp1, &wpf->entity, 2); vsp1_wpf_create()
241 subdev = &wpf->entity.subdev; vsp1_wpf_create()
244 subdev->entity.ops = &vsp1_media_ops; vsp1_wpf_create()
258 wpf->entity.subdev.ctrl_handler = &wpf->ctrls; vsp1_wpf_create()
274 ret = vsp1_video_init(video, &wpf->entity); vsp1_wpf_create()
278 wpf->entity.video = video; vsp1_wpf_create()
287 ret = media_entity_create_link(&wpf->entity.subdev.entity, vsp1_wpf_create()
289 &wpf->video.video.entity, 0, flags); vsp1_wpf_create()
293 wpf->entity.sink = &wpf->video.video.entity; vsp1_wpf_create()
298 vsp1_entity_destroy(&wpf->entity); vsp1_wpf_create()
H A Dvsp1_hsit.h16 #include <media/media-entity.h>
27 struct vsp1_entity entity; member in struct:vsp1_hsit
33 return container_of(subdev, struct vsp1_hsit, entity.subdev); to_hsit()
H A Dvsp1_lif.h16 #include <media/media-entity.h>
27 struct vsp1_entity entity; member in struct:vsp1_lif
32 return container_of(subdev, struct vsp1_lif, entity.subdev); to_lif()
H A Dvsp1_lut.h16 #include <media/media-entity.h>
27 struct vsp1_entity entity; member in struct:vsp1_lut
33 return container_of(subdev, struct vsp1_lut, entity.subdev); to_lut()
H A Dvsp1_sru.h16 #include <media/media-entity.h>
28 struct vsp1_entity entity; member in struct:vsp1_sru
35 return container_of(subdev, struct vsp1_sru, entity.subdev); to_sru()
H A Dvsp1_drv.c51 pipe = to_vsp1_pipeline(&wpf->entity.subdev.entity); vsp1_irq_handler()
76 * - from an entity to itself (no loops are allowed)
80 struct media_entity *entity = &sink->subdev.entity; vsp1_create_links() local
100 for (pad = 0; pad < entity->num_pads; ++pad) { vsp1_create_links()
101 if (!(entity->pads[pad].flags & MEDIA_PAD_FL_SINK)) vsp1_create_links()
104 ret = media_entity_create_link(&source->subdev.entity, vsp1_create_links()
106 entity, pad, flags); vsp1_create_links()
111 source->sink = entity; vsp1_create_links()
120 struct vsp1_entity *entity; vsp1_destroy_entities() local
123 list_for_each_entry_safe(entity, next, &vsp1->entities, list_dev) { vsp1_destroy_entities()
124 list_del(&entity->list_dev); vsp1_destroy_entities()
125 vsp1_entity_destroy(entity); vsp1_destroy_entities()
136 struct vsp1_entity *entity; vsp1_create_entities() local
166 list_add_tail(&vsp1->bru->entity.list_dev, &vsp1->entities); vsp1_create_entities()
174 list_add_tail(&vsp1->hsi->entity.list_dev, &vsp1->entities); vsp1_create_entities()
182 list_add_tail(&vsp1->hst->entity.list_dev, &vsp1->entities); vsp1_create_entities()
191 list_add_tail(&vsp1->lif->entity.list_dev, &vsp1->entities); vsp1_create_entities()
201 list_add_tail(&vsp1->lut->entity.list_dev, &vsp1->entities); vsp1_create_entities()
214 list_add_tail(&rpf->entity.list_dev, &vsp1->entities); vsp1_create_entities()
224 list_add_tail(&vsp1->sru->entity.list_dev, &vsp1->entities); vsp1_create_entities()
237 list_add_tail(&uds->entity.list_dev, &vsp1->entities); vsp1_create_entities()
250 list_add_tail(&wpf->entity.list_dev, &vsp1->entities); vsp1_create_entities()
254 list_for_each_entry(entity, &vsp1->entities, list_dev) { vsp1_create_entities()
255 if (entity->type == VSP1_ENTITY_LIF || vsp1_create_entities()
256 entity->type == VSP1_ENTITY_RPF) vsp1_create_entities()
259 ret = vsp1_create_links(vsp1, entity); vsp1_create_entities()
266 &vsp1->wpf[0]->entity.subdev.entity, RWPF_PAD_SOURCE, vsp1_create_entities()
267 &vsp1->lif->entity.subdev.entity, LIF_PAD_SINK, 0); vsp1_create_entities()
273 list_for_each_entry(entity, &vsp1->entities, list_dev) { vsp1_create_entities()
275 &entity->subdev); vsp1_create_entities()
H A Dvsp1_entity.h43 * Each $vsp1_route entry describes routing configuration for the entity
45 * holds output routing configuration for the entity, and the @inputs array
46 * store the target node value for each input of the entity.
85 int vsp1_entity_init(struct vsp1_device *vsp1, struct vsp1_entity *entity,
87 void vsp1_entity_destroy(struct vsp1_entity *entity);
93 vsp1_entity_get_pad_format(struct vsp1_entity *entity,
99 bool vsp1_entity_is_streaming(struct vsp1_entity *entity);
100 int vsp1_entity_set_streaming(struct vsp1_entity *entity, bool streaming);
H A Dvsp1_rpf.c31 return vsp1_read(rpf->entity.vsp1, vsp1_rpf_read()
32 reg + rpf->entity.index * VI6_RPF_OFFSET); vsp1_rpf_read()
37 vsp1_write(rpf->entity.vsp1, vsp1_rpf_write()
38 reg + rpf->entity.index * VI6_RPF_OFFSET, data); vsp1_rpf_write()
51 if (!vsp1_entity_is_streaming(&rpf->entity)) rpf_s_ctrl()
59 pipe = to_vsp1_pipeline(&rpf->entity.subdev.entity); rpf_s_ctrl()
60 vsp1_pipeline_propagate_alpha(pipe, &rpf->entity, ctrl->val); rpf_s_ctrl()
85 ret = vsp1_entity_set_streaming(&rpf->entity, enable); rpf_s_stream()
138 if (rpf->entity.formats[RWPF_PAD_SINK].code != rpf_s_stream()
139 rpf->entity.formats[RWPF_PAD_SOURCE].code) rpf_s_stream()
198 if (!vsp1_entity_is_streaming(&rpf->entity)) rpf_vdev_queue()
233 rpf->entity.type = VSP1_ENTITY_RPF; vsp1_rpf_create()
234 rpf->entity.index = index; vsp1_rpf_create()
236 ret = vsp1_entity_init(vsp1, &rpf->entity, 2); vsp1_rpf_create()
241 subdev = &rpf->entity.subdev; vsp1_rpf_create()
244 subdev->entity.ops = &vsp1_media_ops; vsp1_rpf_create()
258 rpf->entity.subdev.ctrl_handler = &rpf->ctrls; vsp1_rpf_create()
274 ret = vsp1_video_init(video, &rpf->entity); vsp1_rpf_create()
278 rpf->entity.video = video; vsp1_rpf_create()
281 ret = media_entity_create_link(&rpf->video.video.entity, 0, vsp1_rpf_create()
282 &rpf->entity.subdev.entity, vsp1_rpf_create()
292 vsp1_entity_destroy(&rpf->entity); vsp1_rpf_create()
H A Dvsp1_bru.h16 #include <media/media-entity.h>
29 struct vsp1_entity entity; member in struct:vsp1_bru
41 return container_of(subdev, struct vsp1_bru, entity.subdev); to_bru()
H A Dvsp1_lif.c31 return vsp1_read(lif->entity.vsp1, reg); vsp1_lif_read()
36 vsp1_write(lif->entity.vsp1, reg, data); vsp1_lif_write()
56 format = &lif->entity.formats[LIF_PAD_SOURCE]; lif_s_stream()
100 format = vsp1_entity_get_pad_format(&lif->entity, cfg, lif_enum_mbus_code()
115 format = vsp1_entity_get_pad_format(&lif->entity, cfg, LIF_PAD_SINK, lif_enum_frame_size()
141 fmt->format = *vsp1_entity_get_pad_format(&lif->entity, cfg, fmt->pad, lif_get_format()
158 format = vsp1_entity_get_pad_format(&lif->entity, cfg, fmt->pad, lif_set_format()
180 format = vsp1_entity_get_pad_format(&lif->entity, cfg, LIF_PAD_SOURCE, lif_set_format()
221 lif->entity.type = VSP1_ENTITY_LIF; vsp1_lif_create()
223 ret = vsp1_entity_init(vsp1, &lif->entity, 2); vsp1_lif_create()
228 subdev = &lif->entity.subdev; vsp1_lif_create()
231 subdev->entity.ops = &vsp1_media_ops; vsp1_lif_create()
H A Dvsp1_lut.c32 return vsp1_read(lut->entity.vsp1, reg); vsp1_lut_read()
37 vsp1_write(lut->entity.vsp1, reg, data); vsp1_lut_write()
46 memcpy_toio(lut->entity.vsp1->mmio + VI6_LUT_TABLE, config->lut, lut_configure()
108 format = vsp1_entity_get_pad_format(&lut->entity, cfg, lut_enum_mbus_code()
123 format = vsp1_entity_get_pad_format(&lut->entity, cfg, lut_enum_frame_size()
152 fmt->format = *vsp1_entity_get_pad_format(&lut->entity, cfg, fmt->pad, lut_get_format()
170 format = vsp1_entity_get_pad_format(&lut->entity, cfg, fmt->pad, lut_set_format()
189 format = vsp1_entity_get_pad_format(&lut->entity, cfg, LUT_PAD_SOURCE, lut_set_format()
235 lut->entity.type = VSP1_ENTITY_LUT; vsp1_lut_create()
237 ret = vsp1_entity_init(vsp1, &lut->entity, 2); vsp1_lut_create()
242 subdev = &lut->entity.subdev; vsp1_lut_create()
245 subdev->entity.ops = &vsp1_media_ops; vsp1_lut_create()
H A Dvsp1_uds.h16 #include <media/media-entity.h>
27 struct vsp1_entity entity; member in struct:vsp1_uds
33 return container_of(subdev, struct vsp1_uds, entity.subdev); to_uds()
H A Dvsp1_uds.c34 return vsp1_read(uds->entity.vsp1, vsp1_uds_read()
35 reg + uds->entity.index * VI6_UDS_OFFSET); vsp1_uds_read()
40 vsp1_write(uds->entity.vsp1, vsp1_uds_write()
41 reg + uds->entity.index * VI6_UDS_OFFSET, data); vsp1_uds_write()
129 input = &uds->entity.formats[UDS_PAD_SINK]; uds_s_stream()
130 output = &uds->entity.formats[UDS_PAD_SOURCE]; uds_s_stream()
135 dev_dbg(uds->entity.vsp1->dev, "hscale %u vscale %u\n", hscale, vscale); uds_s_stream()
195 format = vsp1_entity_get_pad_format(&uds->entity, cfg, uds_enum_mbus_code()
210 format = vsp1_entity_get_pad_format(&uds->entity, cfg, uds_enum_frame_size()
236 fmt->format = *vsp1_entity_get_pad_format(&uds->entity, cfg, fmt->pad, uds_get_format()
263 format = vsp1_entity_get_pad_format(&uds->entity, cfg, uds_try_format()
286 format = vsp1_entity_get_pad_format(&uds->entity, cfg, fmt->pad, uds_set_format()
292 format = vsp1_entity_get_pad_format(&uds->entity, cfg, uds_set_format()
336 uds->entity.type = VSP1_ENTITY_UDS; vsp1_uds_create()
337 uds->entity.index = index; vsp1_uds_create()
339 ret = vsp1_entity_init(vsp1, &uds->entity, 2); vsp1_uds_create()
344 subdev = &uds->entity.subdev; vsp1_uds_create()
347 subdev->entity.ops = &vsp1_media_ops; vsp1_uds_create()
H A Dvsp1_sru.c31 return vsp1_read(sru->entity.vsp1, reg); vsp1_sru_read()
36 vsp1_write(sru->entity.vsp1, reg, data); vsp1_sru_write()
132 ret = vsp1_entity_set_streaming(&sru->entity, enable); sru_s_stream()
139 input = &sru->entity.formats[SRU_PAD_SINK]; sru_s_stream()
140 output = &sru->entity.formats[SRU_PAD_SOURCE]; sru_s_stream()
191 format = vsp1_entity_get_pad_format(&sru->entity, cfg, sru_enum_mbus_code()
206 format = vsp1_entity_get_pad_format(&sru->entity, cfg, sru_enum_frame_size()
238 fmt->format = *vsp1_entity_get_pad_format(&sru->entity, cfg, fmt->pad, sru_get_format()
265 format = vsp1_entity_get_pad_format(&sru->entity, cfg, sru_try_format()
303 format = vsp1_entity_get_pad_format(&sru->entity, cfg, fmt->pad, sru_set_format()
309 format = vsp1_entity_get_pad_format(&sru->entity, cfg, sru_set_format()
353 sru->entity.type = VSP1_ENTITY_SRU; vsp1_sru_create()
355 ret = vsp1_entity_init(vsp1, &sru->entity, 2); vsp1_sru_create()
360 subdev = &sru->entity.subdev; vsp1_sru_create()
363 subdev->entity.ops = &vsp1_media_ops; vsp1_sru_create()
376 sru->entity.subdev.ctrl_handler = &sru->ctrls; vsp1_sru_create()
381 vsp1_entity_destroy(&sru->entity); vsp1_sru_create()
H A Dvsp1_video.c22 #include <media/media-entity.h>
164 media_entity_type(remote->entity) != MEDIA_ENT_T_V4L2_SUBDEV) vsp1_video_remote_subdev()
170 return media_entity_to_v4l2_subdev(remote->entity); vsp1_video_remote_subdev()
314 struct vsp1_entity *entity; vsp1_pipeline_validate_branch() local
322 pad = media_entity_remote_pad(&input->entity.pads[RWPF_PAD_SOURCE]); vsp1_pipeline_validate_branch()
329 if (media_entity_type(pad->entity) != MEDIA_ENT_T_V4L2_SUBDEV) vsp1_pipeline_validate_branch()
332 entity = to_vsp1_entity(media_entity_to_v4l2_subdev(pad->entity)); vsp1_pipeline_validate_branch()
337 if (entity->type == VSP1_ENTITY_BRU) { vsp1_pipeline_validate_branch()
338 struct vsp1_bru *bru = to_bru(&entity->subdev); vsp1_pipeline_validate_branch()
351 if (entity->type == VSP1_ENTITY_WPF) vsp1_pipeline_validate_branch()
355 if (entities & (1 << entity->subdev.entity.id)) vsp1_pipeline_validate_branch()
358 entities |= 1 << entity->subdev.entity.id; vsp1_pipeline_validate_branch()
361 if (entity->type == VSP1_ENTITY_UDS) { vsp1_pipeline_validate_branch()
365 pipe->uds = entity; vsp1_pipeline_validate_branch()
367 : &input->entity; vsp1_pipeline_validate_branch()
375 pad = &entity->pads[entity->source_pad]; vsp1_pipeline_validate_branch()
379 /* The last entity must be the output WPF. */ vsp1_pipeline_validate_branch()
380 if (entity != &output->entity) vsp1_pipeline_validate_branch()
411 struct media_entity *entity = &video->video.entity; vsp1_pipeline_validate() local
412 struct media_device *mdev = entity->parent; vsp1_pipeline_validate()
419 media_entity_graph_walk_start(&graph, entity); vsp1_pipeline_validate()
421 while ((entity = media_entity_graph_walk_next(&graph))) { vsp1_pipeline_validate()
426 if (media_entity_type(entity) != MEDIA_ENT_T_V4L2_SUBDEV) { vsp1_pipeline_validate()
431 subdev = media_entity_to_v4l2_subdev(entity); vsp1_pipeline_validate()
510 struct vsp1_device *vsp1 = pipe->output->entity.vsp1; vsp1_pipeline_run()
512 vsp1_write(vsp1, VI6_CMD(pipe->output->entity.index), VI6_CMD_STRCMD); vsp1_pipeline_run()
519 struct vsp1_entity *entity; vsp1_pipeline_stop() local
532 list_for_each_entry(entity, &pipe->entities, list_pipe) { vsp1_pipeline_stop()
533 if (entity->route && entity->route->reg) vsp1_pipeline_stop()
534 vsp1_write(entity->vsp1, entity->route->reg, vsp1_pipeline_stop()
537 v4l2_subdev_call(&entity->subdev, video, s_stream, 0); vsp1_pipeline_stop()
571 struct vsp1_pipeline *pipe = to_vsp1_pipeline(&video->video.entity); vsp1_video_complete_buffer()
677 struct vsp1_entity *entity; vsp1_pipeline_propagate_alpha() local
683 if (media_entity_type(pad->entity) != MEDIA_ENT_T_V4L2_SUBDEV) vsp1_pipeline_propagate_alpha()
686 entity = to_vsp1_entity(media_entity_to_v4l2_subdev(pad->entity)); vsp1_pipeline_propagate_alpha()
691 if (entity->type == VSP1_ENTITY_BRU) vsp1_pipeline_propagate_alpha()
694 if (entity->type == VSP1_ENTITY_UDS) { vsp1_pipeline_propagate_alpha()
695 struct vsp1_uds *uds = to_uds(&entity->subdev); vsp1_pipeline_propagate_alpha()
701 pad = &entity->pads[entity->source_pad]; vsp1_pipeline_propagate_alpha()
766 struct vsp1_pipeline *pipe = to_vsp1_pipeline(&video->video.entity); vsp1_video_buffer_queue()
798 sink = container_of(source->sink, struct vsp1_entity, subdev.entity); vsp1_entity_route_setup()
806 struct vsp1_pipeline *pipe = to_vsp1_pipeline(&video->video.entity); vsp1_video_start_streaming()
807 struct vsp1_entity *entity; vsp1_video_start_streaming() local
832 list_for_each_entry(entity, &pipe->entities, list_pipe) { vsp1_video_start_streaming()
833 vsp1_entity_route_setup(entity); vsp1_video_start_streaming()
835 ret = v4l2_subdev_call(&entity->subdev, video, vsp1_video_start_streaming()
858 struct vsp1_pipeline *pipe = to_vsp1_pipeline(&video->video.entity); vsp1_video_stop_streaming()
873 media_entity_pipeline_stop(&video->video.entity); vsp1_video_stop_streaming()
993 /* Start streaming on the pipeline. No link touching an entity in the vsp1_video_streamon()
999 pipe = video->video.entity.pipe vsp1_video_streamon()
1000 ? to_vsp1_pipeline(&video->video.entity) : &video->pipe; vsp1_video_streamon()
1002 ret = media_entity_pipeline_start(&video->video.entity, &pipe->pipe); vsp1_video_streamon()
1027 media_entity_pipeline_stop(&video->video.entity); vsp1_video_streamon()
1144 /* Initialize the media entity... */ vsp1_video_init()
1145 ret = media_entity_init(&video->video.entity, 1, &video->pad, 0); vsp1_video_init()
1216 media_entity_cleanup(&video->video.entity); vsp1_video_cleanup()
H A Dvsp1_hsit.c31 vsp1_write(hsit->entity.vsp1, reg, data); vsp1_hsit_write()
82 format = vsp1_entity_get_pad_format(&hsit->entity, cfg, fse->pad, hsit_enum_frame_size()
112 fmt->format = *vsp1_entity_get_pad_format(&hsit->entity, cfg, fmt->pad, hsit_get_format()
125 format = vsp1_entity_get_pad_format(&hsit->entity, cfg, fmt->pad, hsit_set_format()
148 format = vsp1_entity_get_pad_format(&hsit->entity, cfg, HSIT_PAD_SOURCE, hsit_set_format()
194 hsit->entity.type = VSP1_ENTITY_HSI; vsp1_hsit_create()
196 hsit->entity.type = VSP1_ENTITY_HST; vsp1_hsit_create()
198 ret = vsp1_entity_init(vsp1, &hsit->entity, 2); vsp1_hsit_create()
203 subdev = &hsit->entity.subdev; vsp1_hsit_create()
206 subdev->entity.ops = &vsp1_media_ops; vsp1_hsit_create()
H A Dvsp1_bru.c32 return vsp1_read(bru->entity.vsp1, reg); vsp1_bru_read()
37 vsp1_write(bru->entity.vsp1, reg, data); vsp1_bru_write()
49 if (!vsp1_entity_is_streaming(&bru->entity)) bru_s_ctrl()
72 struct vsp1_pipeline *pipe = to_vsp1_pipeline(&subdev->entity); bru_s_stream()
79 ret = vsp1_entity_set_streaming(&bru->entity, enable); bru_s_stream()
86 format = &bru->entity.formats[BRU_PAD_SOURCE]; bru_s_stream()
205 format = vsp1_entity_get_pad_format(&bru->entity, cfg, bru_enum_mbus_code()
238 return v4l2_subdev_get_try_crop(&bru->entity.subdev, cfg, pad); bru_get_compose()
251 fmt->format = *vsp1_entity_get_pad_format(&bru->entity, cfg, fmt->pad, bru_get_format()
273 format = vsp1_entity_get_pad_format(&bru->entity, cfg, bru_try_format()
293 format = vsp1_entity_get_pad_format(&bru->entity, cfg, fmt->pad, bru_set_format()
313 format = vsp1_entity_get_pad_format(&bru->entity, cfg, bru_set_format()
365 format = vsp1_entity_get_pad_format(&bru->entity, cfg, BRU_PAD_SOURCE, bru_set_selection()
373 format = vsp1_entity_get_pad_format(&bru->entity, cfg, sel->pad, bru_set_selection()
420 bru->entity.type = VSP1_ENTITY_BRU; vsp1_bru_create()
422 ret = vsp1_entity_init(vsp1, &bru->entity, 5); vsp1_bru_create()
427 subdev = &bru->entity.subdev; vsp1_bru_create()
430 subdev->entity.ops = &vsp1_media_ops; vsp1_bru_create()
444 bru->entity.subdev.ctrl_handler = &bru->ctrls; vsp1_bru_create()
449 vsp1_entity_destroy(&bru->entity); vsp1_bru_create()
H A Dvsp1_rwpf.c51 format = vsp1_entity_get_pad_format(&rwpf->entity, cfg, fse->pad, vsp1_rwpf_enum_frame_size()
80 return v4l2_subdev_get_try_crop(&rwpf->entity.subdev, cfg, RWPF_PAD_SINK); vsp1_rwpf_get_crop()
93 fmt->format = *vsp1_entity_get_pad_format(&rwpf->entity, cfg, fmt->pad, vsp1_rwpf_get_format()
111 format = vsp1_entity_get_pad_format(&rwpf->entity, cfg, fmt->pad, vsp1_rwpf_set_format()
141 format = vsp1_entity_get_pad_format(&rwpf->entity, cfg, RWPF_PAD_SOURCE, vsp1_rwpf_set_format()
165 format = vsp1_entity_get_pad_format(&rwpf->entity, cfg, vsp1_rwpf_get_selection()
198 format = vsp1_entity_get_pad_format(&rwpf->entity, cfg, RWPF_PAD_SINK, vsp1_rwpf_set_selection()
202 if (rwpf->entity.type == VSP1_ENTITY_WPF) { vsp1_rwpf_set_selection()
215 format = vsp1_entity_get_pad_format(&rwpf->entity, cfg, RWPF_PAD_SOURCE, vsp1_rwpf_set_selection()
H A Dvsp1_rwpf.h16 #include <media/media-entity.h>
28 struct vsp1_entity entity; member in struct:vsp1_rwpf
47 return container_of(subdev, struct vsp1_rwpf, entity.subdev); to_rwpf()
H A Dvsp1_video.h20 #include <media/media-entity.h>
/linux-4.1.27/drivers/media/
H A Dmedia-entity.c2 * Media entity
26 #include <media/media-entity.h>
30 * media_entity_init - Initialize a media entity
37 * entity driver, while the total number of links depends on hardware design
38 * and is an extrinsic property unknown to the entity driver. However, in most
39 * use cases the entity driver can guess the number of links which can safely
42 * For those reasons the links array can be preallocated based on the entity
50 * The pads array is managed by the entity driver and passed to
51 * media_entity_init() where its pointer will be stored in the entity structure.
54 media_entity_init(struct media_entity *entity, u16 num_pads, media_entity_init() argument
65 entity->group_id = 0; media_entity_init()
66 entity->max_links = max_links; media_entity_init()
67 entity->num_links = 0; media_entity_init()
68 entity->num_backlinks = 0; media_entity_init()
69 entity->num_pads = num_pads; media_entity_init()
70 entity->pads = pads; media_entity_init()
71 entity->links = links; media_entity_init()
74 pads[i].entity = entity; media_entity_init()
83 media_entity_cleanup(struct media_entity *entity) media_entity_cleanup() argument
85 kfree(entity->links); media_entity_cleanup()
94 media_entity_other(struct media_entity *entity, struct media_link *link) media_entity_other() argument
96 if (link->source->entity == entity) media_entity_other()
97 return link->sink->entity; media_entity_other()
99 return link->source->entity; media_entity_other()
102 /* push an entity to traversal stack */ stack_push()
104 struct media_entity *entity) stack_push()
112 graph->stack[graph->top].entity = entity; stack_push()
117 struct media_entity *entity; stack_pop() local
119 entity = graph->stack[graph->top].entity; stack_pop()
122 return entity; stack_pop()
126 #define stack_top(en) ((en)->stack[(en)->top].entity)
129 * media_entity_graph_walk_start - Start walking the media graph at a given entity
131 * @entity: Starting entity
134 * graph starting at the given entity. The traversal structure must not be
139 struct media_entity *entity) media_entity_graph_walk_start()
142 graph->stack[graph->top].entity = NULL; media_entity_graph_walk_start()
145 if (WARN_ON(entity->id >= MEDIA_ENTITY_ENUM_MAX_ID)) media_entity_graph_walk_start()
148 __set_bit(entity->id, graph->entities); media_entity_graph_walk_start()
149 stack_push(graph, entity); media_entity_graph_walk_start()
154 * media_entity_graph_walk_next - Get the next entity in the graph
162 * Return the next entity in the graph or NULL if the whole graph have been
172 * Depth first search. Push entity to stack and continue from media_entity_graph_walk_next()
177 struct media_entity *entity = stack_top(graph); media_entity_graph_walk_next() local
178 struct media_link *link = &entity->links[link_top(graph)]; media_entity_graph_walk_next()
187 /* Get the entity in the other end of the link . */ media_entity_graph_walk_next()
188 next = media_entity_other(entity, link); media_entity_graph_walk_next()
192 /* Has the entity already been visited? */ media_entity_graph_walk_next()
198 /* Push the new entity to stack and start over. */ media_entity_graph_walk_next()
213 * @entity: Starting entity
216 * Mark all entities connected to a given entity through enabled links, either
218 * every entity in the pipeline and stored in the media_entity pipe field.
225 __must_check int media_entity_pipeline_start(struct media_entity *entity, media_entity_pipeline_start() argument
228 struct media_device *mdev = entity->parent; media_entity_pipeline_start()
230 struct media_entity *entity_err = entity; media_entity_pipeline_start()
235 media_entity_graph_walk_start(&graph, entity); media_entity_pipeline_start()
237 while ((entity = media_entity_graph_walk_next(&graph))) { media_entity_pipeline_start()
238 DECLARE_BITMAP(active, entity->num_pads); media_entity_pipeline_start()
239 DECLARE_BITMAP(has_no_links, entity->num_pads); media_entity_pipeline_start()
242 entity->stream_count++; media_entity_pipeline_start()
243 WARN_ON(entity->pipe && entity->pipe != pipe); media_entity_pipeline_start()
244 entity->pipe = pipe; media_entity_pipeline_start()
247 if (entity->stream_count > 1) media_entity_pipeline_start()
250 if (!entity->ops || !entity->ops->link_validate) media_entity_pipeline_start()
253 bitmap_zero(active, entity->num_pads); media_entity_pipeline_start()
254 bitmap_fill(has_no_links, entity->num_pads); media_entity_pipeline_start()
256 for (i = 0; i < entity->num_links; i++) { media_entity_pipeline_start()
257 struct media_link *link = &entity->links[i]; media_entity_pipeline_start()
258 struct media_pad *pad = link->sink->entity == entity media_entity_pipeline_start()
281 ret = entity->ops->link_validate(link); media_entity_pipeline_start()
283 dev_dbg(entity->parent->dev, media_entity_pipeline_start()
285 entity->name, link->source->index, media_entity_pipeline_start()
286 link->sink->entity->name, media_entity_pipeline_start()
293 bitmap_or(active, active, has_no_links, entity->num_pads); media_entity_pipeline_start()
295 if (!bitmap_full(active, entity->num_pads)) { media_entity_pipeline_start()
297 dev_dbg(entity->parent->dev, media_entity_pipeline_start()
299 entity->name, media_entity_pipeline_start()
301 active, entity->num_pads)); media_entity_pipeline_start()
326 if (entity_err == entity) media_entity_pipeline_start()
338 * @entity: Starting entity
340 * Mark all entities connected to a given entity through enabled links, either
348 void media_entity_pipeline_stop(struct media_entity *entity) media_entity_pipeline_stop() argument
350 struct media_device *mdev = entity->parent; media_entity_pipeline_stop()
355 media_entity_graph_walk_start(&graph, entity); media_entity_pipeline_stop()
357 while ((entity = media_entity_graph_walk_next(&graph))) { media_entity_pipeline_stop()
358 entity->stream_count--; media_entity_pipeline_stop()
359 if (entity->stream_count == 0) media_entity_pipeline_stop()
360 entity->pipe = NULL; media_entity_pipeline_stop()
373 * @entity: The entity
377 * The function will return immediately if @entity is NULL.
379 * Return a pointer to the entity on success or NULL on failure.
381 struct media_entity *media_entity_get(struct media_entity *entity) media_entity_get() argument
383 if (entity == NULL) media_entity_get()
386 if (entity->parent->dev && media_entity_get()
387 !try_module_get(entity->parent->dev->driver->owner)) media_entity_get()
390 return entity; media_entity_get()
396 * @entity: The entity
400 * The function will return immediately if @entity is NULL.
402 void media_entity_put(struct media_entity *entity) media_entity_put() argument
404 if (entity == NULL) media_entity_put()
407 if (entity->parent->dev) media_entity_put()
408 module_put(entity->parent->dev->driver->owner); media_entity_put()
416 static struct media_link *media_entity_add_link(struct media_entity *entity) media_entity_add_link() argument
418 if (entity->num_links >= entity->max_links) { media_entity_add_link()
419 struct media_link *links = entity->links; media_entity_add_link()
420 unsigned int max_links = entity->max_links + 2; media_entity_add_link()
427 for (i = 0; i < entity->num_links; i++) media_entity_add_link()
430 entity->max_links = max_links; media_entity_add_link()
431 entity->links = links; media_entity_add_link()
434 return &entity->links[entity->num_links++]; media_entity_add_link()
478 void __media_entity_remove_links(struct media_entity *entity) __media_entity_remove_links() argument
482 for (i = 0; i < entity->num_links; i++) { __media_entity_remove_links()
483 struct media_link *link = &entity->links[i]; __media_entity_remove_links()
487 if (link->source->entity == entity) __media_entity_remove_links()
488 remote = link->sink->entity; __media_entity_remove_links()
490 remote = link->source->entity; __media_entity_remove_links()
500 if (link->source->entity == entity) __media_entity_remove_links()
511 entity->num_links = 0; __media_entity_remove_links()
512 entity->num_backlinks = 0; __media_entity_remove_links()
516 void media_entity_remove_links(struct media_entity *entity) media_entity_remove_links() argument
518 /* Do nothing if the entity is not registered. */ media_entity_remove_links()
519 if (entity->parent == NULL) media_entity_remove_links()
522 mutex_lock(&entity->parent->graph_mutex); media_entity_remove_links()
523 __media_entity_remove_links(entity); media_entity_remove_links()
524 mutex_unlock(&entity->parent->graph_mutex); media_entity_remove_links()
533 ret = media_entity_call(link->source->entity, link_setup, __media_entity_setup_link_notify()
538 ret = media_entity_call(link->sink->entity, link_setup, __media_entity_setup_link_notify()
541 media_entity_call(link->source->entity, link_setup, __media_entity_setup_link_notify()
586 source = link->source->entity; __media_entity_setup_link()
587 sink = link->sink->entity; __media_entity_setup_link()
614 mutex_lock(&link->source->entity->parent->graph_mutex); media_entity_setup_link()
616 mutex_unlock(&link->source->entity->parent->graph_mutex); media_entity_setup_link()
636 for (i = 0; i < source->entity->num_links; ++i) { media_entity_find_link()
637 link = &source->entity->links[i]; media_entity_find_link()
639 if (link->source->entity == source->entity && media_entity_find_link()
641 link->sink->entity == sink->entity && media_entity_find_link()
664 for (i = 0; i < pad->entity->num_links; i++) { media_entity_remote_pad()
665 struct media_link *link = &pad->entity->links[i]; media_entity_remote_pad()
103 stack_push(struct media_entity_graph *graph, struct media_entity *entity) stack_push() argument
138 media_entity_graph_walk_start(struct media_entity_graph *graph, struct media_entity *entity) media_entity_graph_walk_start() argument
H A Dmedia-device.c31 #include <media/media-entity.h>
70 struct media_entity *entity; find_entity() local
77 media_device_for_each_entity(entity, mdev) { media_device_for_each_entity()
78 if ((entity->id == id && !next) || media_device_for_each_entity()
79 (entity->id > id && next)) { media_device_for_each_entity()
81 return entity; media_device_for_each_entity()
123 upad->entity = kpad->entity->id; media_device_kpad_to_upad()
131 struct media_entity *entity; __media_device_enum_links() local
133 entity = find_entity(mdev, links->entity); __media_device_enum_links()
134 if (entity == NULL) __media_device_enum_links()
140 for (p = 0; p < entity->num_pads; p++) { __media_device_enum_links()
144 media_device_kpad_to_upad(&entity->pads[p], &pad); __media_device_enum_links()
154 for (l = 0, ulink = links->links; l < entity->num_links; l++) { __media_device_enum_links()
158 if (entity->links[l].source->entity != entity) __media_device_enum_links()
162 media_device_kpad_to_upad(entity->links[l].source, __media_device_enum_links()
164 media_device_kpad_to_upad(entity->links[l].sink, __media_device_enum_links()
166 link.flags = entity->links[l].flags; __media_device_enum_links()
209 source = find_entity(mdev, ulink.source.entity); media_device_setup_link()
210 sink = find_entity(mdev, ulink.sink.entity); media_device_setup_link()
275 __u32 entity; member in struct:media_links_enum32
289 if (get_user(links.entity, &ulinks->entity) media_device_enum_links32()
410 struct media_entity *entity; media_device_unregister() local
413 list_for_each_entry_safe(entity, next, &mdev->entities, list) media_device_unregister()
414 media_device_unregister_entity(entity); media_device_unregister()
422 * media_device_register_entity - Register an entity with a media device
424 * @entity: The entity
427 struct media_entity *entity) media_device_register_entity()
429 /* Warn if we apparently re-register an entity */ media_device_register_entity()
430 WARN_ON(entity->parent != NULL); media_device_register_entity()
431 entity->parent = mdev; media_device_register_entity()
434 if (entity->id == 0) media_device_register_entity()
435 entity->id = mdev->entity_id++; media_device_register_entity()
437 mdev->entity_id = max(entity->id + 1, mdev->entity_id); media_device_register_entity()
438 list_add_tail(&entity->list, &mdev->entities); media_device_register_entity()
446 * media_device_unregister_entity - Unregister an entity
447 * @entity: The entity
449 * If the entity has never been registered this function will return
452 void media_device_unregister_entity(struct media_entity *entity) media_device_unregister_entity() argument
454 struct media_device *mdev = entity->parent; media_device_unregister_entity()
460 list_del(&entity->list); media_device_unregister_entity()
462 entity->parent = NULL; media_device_unregister_entity()
426 media_device_register_entity(struct media_device *mdev, struct media_entity *entity) media_device_register_entity() argument
H A DMakefile5 media-objs := media-device.o media-devnode.o media-entity.o
/linux-4.1.27/drivers/isdn/hardware/eicon/
H A Dum_idi.h13 int divas_um_idi_delete_entity(int adapter_nr, void *entity);
24 int diva_um_idi_read(void *entity,
29 int diva_um_idi_write(void *entity,
34 int diva_user_mode_idi_ind_ready(void *entity, void *os_handle);
35 void *diva_um_id_get_os_context(void *entity);
37 int divas_um_idi_entity_assigned(void *entity);
38 int divas_um_idi_entity_start_remove(void *entity);
40 void diva_um_idi_start_wdog(void *entity);
41 void diva_um_idi_stop_wdog(void *entity);
H A Ddivasi.c80 static int remove_entity(void *entity);
468 DBG_ERR(("entity removal watchdog")) diva_um_timer_function()
472 ** If application exits without entity removal this function will remove
473 ** entity and block until removal is complete
475 static int remove_entity(void *entity) remove_entity() argument
480 diva_um_idi_stop_wdog(entity); remove_entity()
482 if (!entity) { remove_entity()
483 DBG_FTL(("Zero entity on remove")) remove_entity()
489 diva_um_id_get_os_context(entity))) { remove_entity()
490 DBG_FTL(("Zero entity os context on remove")) remove_entity()
494 if (!divas_um_idi_entity_assigned(entity) || p_os->aborted) { remove_entity()
501 DBG_TRC(("E(%08x) check remove", entity)) remove_entity()
507 diva_um_idi_start_wdog(entity); remove_entity()
515 if (!divas_um_idi_entity_start_remove(entity) remove_entity()
525 DBG_TRC(("E(%08x) start remove", entity)) DBG_TRC()
532 if (!divas_um_idi_entity_assigned(entity) DBG_TRC()
542 DBG_TRC(("E(%08x) remove complete, aborted:%d", entity,
545 diva_um_idi_stop_wdog(entity);
555 void diva_um_idi_start_wdog(void *entity) diva_um_idi_start_wdog() argument
559 if (entity && diva_um_idi_start_wdog()
562 diva_um_id_get_os_context(entity)))) { diva_um_idi_start_wdog()
567 void diva_um_idi_stop_wdog(void *entity) diva_um_idi_stop_wdog() argument
571 if (entity && diva_um_idi_stop_wdog()
574 diva_um_id_get_os_context(entity)))) { diva_um_idi_stop_wdog()
H A Dentity.h1 /* $Id: entity.h,v 1.4 2004/03/21 17:26:01 armin Exp $ */
H A Dum_idi.c8 #include "entity.h"
187 Cleanup, but NOT delete this entity
206 Create ENTITY, link it to the adapter and remove pointer to entity
270 Unlink entity and free memory
272 int divas_um_idi_delete_entity(int adapter_nr, void *entity) divas_um_idi_delete_entity() argument
278 if (!(e = (divas_um_idi_entity_t *) entity)) divas_um_idi_delete_entity()
287 diva_um_idi_stop_wdog(entity); divas_um_idi_delete_entity()
301 int diva_um_idi_read(void *entity, diva_um_idi_read() argument
315 e = (divas_um_idi_entity_t *) entity; diva_um_idi_read()
381 int diva_um_idi_write(void *entity, diva_um_idi_write() argument
395 e = (divas_um_idi_entity_t *) entity; diva_um_idi_write()
491 static void diva_um_idi_xdi_callback(ENTITY *entity) diva_um_idi_xdi_callback() argument
493 divas_um_idi_entity_t *e = DIVAS_CONTAINING_RECORD(entity, diva_um_idi_xdi_callback()
731 Write return code to the return code queue of entity
756 Return amount of entries that can be bead from this entity or
759 int diva_user_mode_idi_ind_ready(void *entity, void *os_handle) diva_user_mode_idi_ind_ready() argument
766 if (!entity) diva_user_mode_idi_ind_ready()
769 e = (divas_um_idi_entity_t *) entity; diva_user_mode_idi_ind_ready()
781 entity was removed as result of adapter removal diva_user_mode_idi_ind_ready()
782 user should assign this entity again diva_user_mode_idi_ind_ready()
799 void *diva_um_id_get_os_context(void *entity) diva_um_id_get_os_context() argument
801 return (((divas_um_idi_entity_t *) entity)->os_context); diva_um_id_get_os_context()
804 int divas_um_idi_entity_assigned(void *entity) divas_um_idi_entity_assigned() argument
814 e = (divas_um_idi_entity_t *) entity; divas_um_idi_entity_assigned()
835 int divas_um_idi_entity_start_remove(void *entity) divas_um_idi_entity_start_remove() argument
843 e = (divas_um_idi_entity_t *) entity; divas_um_idi_entity_start_remove()
H A Ddi.c112 DBG_FTL(("XDI: [%02x] !A%d ==> NULL entity ptr - try to ignore", pr_out()
193 /* if we did chaining, this entity is put back into the */ pr_out()
640 /* map entity ptr, selector could be re-mapped by call to */ isdn_ind()
737 Id - Id of the entity that had sent this return code
738 Ch - Channel of the entity that had sent this return code
752 type - the Id that was sent by the ASSIGN of this entity.
773 Id - Id of the entity that had sent this request
774 Ch - Channel of the entity that had sent this request
776 type - the Id that was sent by the ASSIGN of this entity.
796 Id - Id of the entity that had sent this indication
797 Ch - Channel of the entity that had sent this indication
815 type: the Id that was sent by the ASSIGN of this entity. This should
H A Ddi_defs.h78 byte Id; /* ID used by this entity */
91 byte No; /* entity number */
H A Dio.c208 * if the Req field in the entity structure is 0, request()
378 * assign an entity request()
404 * if the entity is still busy, ignore the request call request()
430 * queue this entity in the adapter request queue request()
H A Dpc.h41 byte ReqId; /* request task/entity identification */
43 byte RcId; /* return code task/entity identification */
45 byte IndId; /* Indication task/entity identification */
256 #define WRONG_ID 0x03 /* unknown task/entity id */
257 #define WRONG_CH 0x04 /* wrong task/entity id */
H A Ddivasync.h393 ENTITY *contxt; /* ptr to entity to use */
419 ENTITY *contxt; /* ptr to entity to use */
H A Dos_bri.c221 Create entity table diva_bri_init_card()
/linux-4.1.27/include/media/
H A Dmedia-entity.h2 * Media entity
42 struct media_entity *entity; /* Entity this pad belongs to */ member in struct:media_pad
43 u16 index; /* Pad index in the entity pads array */
48 * struct media_entity_operations - Media entity operations
49 * @link_setup: Notify the entity of link changes. The operation can
52 * @link_validate: Return whether a link is valid from the entity point of
57 int (*link_setup)(struct media_entity *entity,
65 struct media_device *parent; /* Media device this entity belongs to*/
89 int stream_count; /* Stream count for the entity. */
90 int use_count; /* Use count for the entity. */
92 struct media_pipeline *pipe; /* Pipeline this entity belongs to. */
106 static inline u32 media_entity_type(struct media_entity *entity) media_entity_type() argument
108 return entity->type & MEDIA_ENT_TYPE_MASK; media_entity_type()
111 static inline u32 media_entity_subtype(struct media_entity *entity) media_entity_subtype() argument
113 return entity->type & MEDIA_ENT_SUBTYPE_MASK; media_entity_subtype()
121 struct media_entity *entity; member in struct:media_entity_graph::__anon12568
129 int media_entity_init(struct media_entity *entity, u16 num_pads,
131 void media_entity_cleanup(struct media_entity *entity);
135 void __media_entity_remove_links(struct media_entity *entity);
136 void media_entity_remove_links(struct media_entity *entity);
144 struct media_entity *media_entity_get(struct media_entity *entity);
145 void media_entity_put(struct media_entity *entity);
148 struct media_entity *entity);
151 __must_check int media_entity_pipeline_start(struct media_entity *entity,
153 void media_entity_pipeline_stop(struct media_entity *entity);
155 #define media_entity_call(entity, operation, args...) \
156 (((entity)->ops && (entity)->ops->operation) ? \
157 (entity)->ops->operation((entity) , ##args) : -ENOIOCTLCMD)
H A Dmedia-device.h31 #include <media/media-entity.h>
44 * @entity_id: ID of the next entity to be registered
96 struct media_entity *entity);
97 void media_device_unregister_entity(struct media_entity *entity);
100 #define media_device_for_each_entity(entity, mdev) \
101 list_for_each_entry(entity, &(mdev)->entities, list)
H A Dexynos-fimc.h15 #include <media/media-entity.h>
129 * last entity within the pipeline. Implemented by related media device driver.
H A Dv4l2-dev.h19 #include <media/media-entity.h>
88 struct media_entity entity; member in struct:video_device
145 container_of(__e, struct video_device, entity)
H A Dv4l2-subdev.h26 #include <media/media-entity.h>
599 struct media_entity entity; member in struct:v4l2_subdev
633 container_of(ent, struct v4l2_subdev, entity)
657 BUG_ON(pad >= sd->entity.num_pads); \
/linux-4.1.27/drivers/media/platform/xilinx/
H A Dxilinx-vipp.c36 * @node: the entity's DT node
37 * @entity: media entity, from the corresponding V4L2 subdev
44 struct media_entity *entity; member in struct:xvip_graph_entity
58 struct xvip_graph_entity *entity; xvip_graph_find_entity() local
60 list_for_each_entry(entity, &xdev->entities, list) { xvip_graph_find_entity()
61 if (entity->node == node) xvip_graph_find_entity()
62 return entity; xvip_graph_find_entity()
69 struct xvip_graph_entity *entity) xvip_graph_build_one()
72 struct media_entity *local = entity->entity; xvip_graph_build_one()
82 dev_dbg(xdev->dev, "creating links for entity %s\n", local->name); xvip_graph_build_one()
86 next = of_graph_get_next_endpoint(entity->node, ep); xvip_graph_build_one()
130 /* Find the remote entity. */ xvip_graph_build_one()
133 dev_err(xdev->dev, "no entity found for %s\n", xvip_graph_build_one()
140 remote = ent->entity; xvip_graph_build_one()
236 /* Find the remote entity. */ xvip_graph_build_dma()
239 dev_err(xdev->dev, "no entity found for %s\n", xvip_graph_build_dma()
246 if (link.remote_port >= ent->entity->num_pads) { xvip_graph_build_dma()
255 source = &dma->video.entity; xvip_graph_build_dma()
257 sink = ent->entity; xvip_graph_build_dma()
260 source = ent->entity; xvip_graph_build_dma()
262 sink = &dma->video.entity; xvip_graph_build_dma()
293 struct xvip_graph_entity *entity; xvip_graph_notify_complete() local
298 /* Create links for every entity. */ xvip_graph_notify_complete()
299 list_for_each_entry(entity, &xdev->entities, list) { xvip_graph_notify_complete()
300 ret = xvip_graph_build_one(xdev, entity); xvip_graph_notify_complete()
323 struct xvip_graph_entity *entity; xvip_graph_notify_bound() local
325 /* Locate the entity corresponding to the bound subdev and store the xvip_graph_notify_bound()
328 list_for_each_entry(entity, &xdev->entities, list) { xvip_graph_notify_bound()
329 if (entity->node != subdev->dev->of_node) xvip_graph_notify_bound()
332 if (entity->subdev) { xvip_graph_notify_bound()
334 entity->node->full_name); xvip_graph_notify_bound()
339 entity->entity = &subdev->entity; xvip_graph_notify_bound()
340 entity->subdev = subdev; xvip_graph_notify_bound()
344 dev_err(xdev->dev, "no entity for subdev %s\n", subdev->name); xvip_graph_notify_bound()
351 struct xvip_graph_entity *entity; xvip_graph_parse_one() local
382 entity = devm_kzalloc(xdev->dev, sizeof(*entity), GFP_KERNEL); xvip_graph_parse_one()
383 if (entity == NULL) { xvip_graph_parse_one()
389 entity->node = remote; xvip_graph_parse_one()
390 entity->asd.match_type = V4L2_ASYNC_MATCH_OF; xvip_graph_parse_one()
391 entity->asd.match.of.node = remote; xvip_graph_parse_one()
392 list_add_tail(&entity->list, &xdev->entities); xvip_graph_parse_one()
402 struct xvip_graph_entity *entity; xvip_graph_parse() local
415 list_for_each_entry(entity, &xdev->entities, list) { xvip_graph_parse()
416 ret = xvip_graph_parse_one(xdev, entity->node); xvip_graph_parse()
489 struct xvip_graph_entity *entity; xvip_graph_cleanup() local
495 list_for_each_entry_safe(entity, entityp, &xdev->entities, list) { xvip_graph_cleanup()
496 of_node_put(entity->node); xvip_graph_cleanup()
497 list_del(&entity->list); xvip_graph_cleanup()
508 struct xvip_graph_entity *entity; xvip_graph_init() local
543 list_for_each_entry(entity, &xdev->entities, list) xvip_graph_init()
544 subdevs[i++] = &entity->asd; xvip_graph_init()
68 xvip_graph_build_one(struct xvip_composite_device *xdev, struct xvip_graph_entity *entity) xvip_graph_build_one() argument
H A Dxilinx-dma.c53 media_entity_type(remote->entity) != MEDIA_ENT_T_V4L2_SUBDEV) xvip_dma_remote_subdev()
59 return media_entity_to_v4l2_subdev(remote->entity); xvip_dma_remote_subdev()
104 struct media_entity *entity; xvip_pipeline_start_stop() local
109 entity = &dma->video.entity; xvip_pipeline_start_stop()
111 pad = &entity->pads[0]; xvip_pipeline_start_stop()
117 media_entity_type(pad->entity) != MEDIA_ENT_T_V4L2_SUBDEV) xvip_pipeline_start_stop()
120 entity = pad->entity; xvip_pipeline_start_stop()
121 subdev = media_entity_to_v4l2_subdev(entity); xvip_pipeline_start_stop()
183 struct media_entity *entity = &start->video.entity; xvip_pipeline_validate() local
184 struct media_device *mdev = entity->parent; xvip_pipeline_validate()
191 media_entity_graph_walk_start(&graph, entity); xvip_pipeline_validate()
193 while ((entity = media_entity_graph_walk_next(&graph))) { xvip_pipeline_validate()
196 if (entity->type != MEDIA_ENT_T_DEVNODE_V4L) xvip_pipeline_validate()
199 dma = to_xvip_dma(media_entity_to_video_device(entity)); xvip_pipeline_validate()
396 * Start streaming on the pipeline. No link touching an entity in the xvip_dma_start_streaming()
402 pipe = dma->video.entity.pipe xvip_dma_start_streaming()
403 ? to_xvip_pipeline(&dma->video.entity) : &dma->pipe; xvip_dma_start_streaming()
405 ret = media_entity_pipeline_start(&dma->video.entity, &pipe->pipe); xvip_dma_start_streaming()
431 media_entity_pipeline_stop(&dma->video.entity); xvip_dma_start_streaming()
448 struct xvip_pipeline *pipe = to_xvip_pipeline(&dma->video.entity); xvip_dma_stop_streaming()
459 media_entity_pipeline_stop(&dma->video.entity); xvip_dma_stop_streaming()
675 /* Initialize the media entity... */ xvip_dma_init()
679 ret = media_entity_init(&dma->video.entity, 1, &dma->pad, 0); xvip_dma_init()
762 media_entity_cleanup(&dma->video.entity); xvip_dma_cleanup()
H A Dxilinx-dma.h23 #include <media/media-entity.h>
60 * @pad: media pad for the video device entity
H A Dxilinx-tpg.c805 /* Initialize V4L2 subdevice and media entity. Pad numbers depend on the xtpg_probe()
829 /* Initialize V4L2 subdevice and media entity */ xtpg_probe()
837 subdev->entity.ops = &xtpg_media_ops; xtpg_probe()
839 ret = media_entity_init(&subdev->entity, xtpg->npads, xtpg->pads, 0); xtpg_probe()
888 media_entity_cleanup(&subdev->entity); xtpg_probe()
902 media_entity_cleanup(&subdev->entity); xtpg_remove()
/linux-4.1.27/drivers/media/platform/exynos4-is/
H A Dcommon.c16 /* Called with the media graph mutex held or entity->stream_count > 0. */ fimc_find_remote_sensor()
17 struct v4l2_subdev *fimc_find_remote_sensor(struct media_entity *entity) fimc_find_remote_sensor() argument
19 struct media_pad *pad = &entity->pads[0]; fimc_find_remote_sensor()
26 media_entity_type(pad->entity) != MEDIA_ENT_T_V4L2_SUBDEV) fimc_find_remote_sensor()
29 sd = media_entity_to_v4l2_subdev(pad->entity); fimc_find_remote_sensor()
35 pad = &sd->entity.pads[0]; fimc_find_remote_sensor()
H A Dmedia-dev.c63 * @me: media entity terminating the pipeline
92 media_entity_type(pad->entity) != MEDIA_ENT_T_V4L2_SUBDEV) fimc_pipeline_prepare()
94 sd = media_entity_to_v4l2_subdev(pad->entity); fimc_pipeline_prepare()
118 me = &sd->entity; fimc_pipeline_prepare()
143 use_count = &sd->entity.use_count; __subdev_set_power()
192 * @me: media entity to start graph walk with
252 fmd = entity_to_fimc_mdev(&sd->entity); __fimc_pipeline_close()
639 /* If driver of any entity isn't ready try all again later. */ for_each_available_child_of_node()
697 * @source: the source entity to create links to all fimc entities from
698 * @sensor: sensor subdev linked to FIMC[fimc_id] entity, may be null
699 * @pad: the source entity pad index
731 sink = &fmd->fimc[i]->vid_cap.subdev.entity; __fimc_md_create_fimc_sink_links()
737 /* Notify FIMC capture subdev entity */ __fimc_md_create_fimc_sink_links()
751 sink = &fmd->fimc_lite[i]->subdev.entity; __fimc_md_create_fimc_sink_links()
757 /* Notify FIMC-LITE subdev entity */ __fimc_md_create_fimc_sink_links()
781 source = &fimc->subdev.entity; __fimc_md_create_flite_source_links()
782 sink = &fimc->ve.vdev.entity; __fimc_md_create_flite_source_links()
789 sink = &fmd->fimc_is->isp.subdev.entity; __fimc_md_create_flite_source_links()
806 source = &isp->subdev.entity; __fimc_md_create_fimc_is_links()
813 sink = &fmd->fimc[i]->vid_cap.subdev.entity; __fimc_md_create_fimc_is_links()
821 sink = &isp->video_capture.ve.vdev.entity; __fimc_md_create_fimc_is_links()
836 * link with CSI receiver entity specified by mux_id. Any registered CSIS
837 * entity has a link to each registered FIMC capture entity. Enabled links
839 * subsequent FIMC capture entity. The number of default active links is
875 pad = sensor->entity.num_pads - 1; fimc_md_create_links()
876 ret = media_entity_create_link(&sensor->entity, pad, fimc_md_create_links()
877 &csis->entity, CSIS_PAD_SINK, fimc_md_create_links()
884 sensor->entity.name, csis->entity.name); fimc_md_create_links()
891 source = &sensor->entity; fimc_md_create_links()
912 source = &fmd->csis[i].sd->entity; fimc_md_create_links()
927 source = &fmd->fimc[i]->vid_cap.subdev.entity; fimc_md_create_links()
928 sink = &fmd->fimc[i]->vid_cap.ve.vdev.entity; fimc_md_create_links()
1018 static int __fimc_md_modify_pipeline(struct media_entity *entity, bool enable) __fimc_md_modify_pipeline() argument
1025 vdev = media_entity_to_video_device(entity); __fimc_md_modify_pipeline()
1026 if (vdev->entity.use_count == 0) __fimc_md_modify_pipeline()
1039 ret = __fimc_pipeline_open(ve->pipe, entity, true); __fimc_md_modify_pipeline()
1049 /* Locking: called with entity->parent->graph_mutex mutex held. */ __fimc_md_modify_pipelines()
1050 static int __fimc_md_modify_pipelines(struct media_entity *entity, bool enable) __fimc_md_modify_pipelines() argument
1052 struct media_entity *entity_err = entity; __fimc_md_modify_pipelines()
1062 media_entity_graph_walk_start(&graph, entity); __fimc_md_modify_pipelines()
1064 while ((entity = media_entity_graph_walk_next(&graph))) { __fimc_md_modify_pipelines()
1065 if (media_entity_type(entity) != MEDIA_ENT_T_DEVNODE) __fimc_md_modify_pipelines()
1068 ret = __fimc_md_modify_pipeline(entity, enable); __fimc_md_modify_pipelines()
1084 if (entity_err == entity) __fimc_md_modify_pipelines()
1094 struct media_entity *sink = link->sink->entity; fimc_md_link_notify()
H A Dfimc-isp-video.c276 struct media_entity *me = &ve->vdev.entity; isp_video_open()
314 struct media_entity *entity = &ivc->ve.vdev.entity; isp_video_release() local
315 struct media_device *mdev = entity->parent; isp_video_release()
320 media_entity_pipeline_stop(entity); isp_video_release()
330 entity->use_count--; isp_video_release()
459 pad = &sd->entity.pads[0]; isp_video_pipeline_validate()
471 media_entity_type(pad->entity) != MEDIA_ENT_T_V4L2_SUBDEV) isp_video_pipeline_validate()
474 sd = media_entity_to_v4l2_subdev(pad->entity); isp_video_pipeline_validate()
495 struct media_entity *me = &ve->vdev.entity; isp_video_streamon()
528 media_entity_pipeline_stop(&video->ve.vdev.entity); isp_video_streamoff()
621 ret = media_entity_init(&vdev->entity, 1, &iv->pad, 0); fimc_isp_video_device_register()
629 media_entity_cleanup(&vdev->entity); fimc_isp_video_device_register()
653 media_entity_cleanup(&ve->vdev.entity); fimc_isp_video_device_unregister()
H A Dmedia-dev.h19 #include <media/media-entity.h>
57 * source entity (e.g. an image sensor subdevice), a data capture entity
178 mutex_lock(&ve->vdev.entity.parent->graph_mutex); fimc_md_graph_lock()
183 mutex_unlock(&ve->vdev.entity.parent->graph_mutex); fimc_md_graph_unlock()
H A Dfimc-capture.c332 fimc_pipeline_call(ve, open, &ve->vdev.entity, false); fimc_capture_resume()
504 ret = fimc_pipeline_call(ve, open, &ve->vdev.entity, true); fimc_capture_open()
518 ve->vdev.entity.use_count++; fimc_capture_open()
548 media_entity_pipeline_stop(&vc->ve.vdev.entity); fimc_capture_release()
560 vc->ve.vdev.entity.use_count--; fimc_capture_release()
765 me = pad->entity; fimc_pipeline_get_head()
803 me = fimc_pipeline_get_head(&sd->entity); fimc_pipeline_try_format()
818 while (me != &fimc->vid_cap.subdev.entity) { fimc_pipeline_try_format()
838 me = pad->entity; fimc_pipeline_try_format()
885 pad = sensor->entity.num_pads - 1; fimc_get_sensor_frame_desc()
1127 * Find current entity sink pad and any remote sink pad linked fimc_pipeline_validate()
1128 * to it. We stop if there is no sink pad in current entity or fimc_pipeline_validate()
1129 * it is not linked to any other remote entity. fimc_pipeline_validate()
1133 for (i = 0; i < sd->entity.num_pads; i++) { fimc_pipeline_validate()
1134 struct media_pad *p = &sd->entity.pads[i]; fimc_pipeline_validate()
1145 media_entity_type(src_pad->entity) != MEDIA_ENT_T_V4L2_SUBDEV) fimc_pipeline_validate()
1163 sd = media_entity_to_v4l2_subdev(src_pad->entity); fimc_pipeline_validate()
1200 struct media_entity *entity = &vc->ve.vdev.entity; fimc_cap_streamon() local
1208 ret = media_entity_pipeline_start(entity, &vc->ve.pipe->mp); fimc_cap_streamon()
1242 media_entity_pipeline_stop(entity); fimc_cap_streamon()
1257 media_entity_pipeline_stop(&vc->ve.vdev.entity); fimc_cap_streamoff()
1390 /* Capture subdev media entity operations */ fimc_link_setup()
1391 static int fimc_link_setup(struct media_entity *entity, fimc_link_setup() argument
1395 struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity); fimc_link_setup()
1400 if (media_entity_type(remote->entity) != MEDIA_ENT_T_V4L2_SUBDEV) fimc_link_setup()
1407 local->entity->name, remote->entity->name, flags, fimc_link_setup()
1424 sensor = fimc_find_remote_sensor(&vc->subdev.entity); fimc_link_setup()
1462 fmd = entity_to_fimc_mdev(&sd->entity); fimc_sensor_notify()
1807 ret = media_entity_init(&vfd->entity, 1, &vid_cap->vd_pad, 0); fimc_register_capture_device()
1828 media_entity_cleanup(&vfd->entity); fimc_register_capture_device()
1872 media_entity_cleanup(&vdev->entity); fimc_capture_subdev_unregistered()
1899 ret = media_entity_init(&sd->entity, FIMC_SD_PADS_NUM, fimc_initialize_capture_subdev()
1904 sd->entity.ops = &fimc_sd_media_ops; fimc_initialize_capture_subdev()
1915 media_entity_cleanup(&sd->entity); fimc_unregister_capture_subdev()
H A Dfimc-lite.c481 struct media_entity *me = &fimc->ve.vdev.entity; fimc_lite_open()
530 struct media_entity *entity = &fimc->ve.vdev.entity; fimc_lite_release() local
537 media_entity_pipeline_stop(entity); fimc_lite_release()
544 mutex_lock(&entity->parent->graph_mutex); fimc_lite_release()
545 entity->use_count--; fimc_lite_release()
546 mutex_unlock(&entity->parent->graph_mutex); fimc_lite_release()
798 pad = &sd->entity.pads[0]; fimc_pipeline_validate()
818 media_entity_type(pad->entity) != MEDIA_ENT_T_V4L2_SUBDEV) fimc_pipeline_validate()
821 sd = media_entity_to_v4l2_subdev(pad->entity); fimc_pipeline_validate()
840 struct media_entity *entity = &fimc->ve.vdev.entity; fimc_lite_streamon() local
846 ret = media_entity_pipeline_start(entity, &fimc->ve.pipe->mp); fimc_lite_streamon()
854 fimc->sensor = fimc_find_remote_sensor(&fimc->subdev.entity); fimc_lite_streamon()
863 media_entity_pipeline_stop(entity); fimc_lite_streamon()
877 media_entity_pipeline_stop(&fimc->ve.vdev.entity); fimc_lite_streamoff()
984 /* Capture subdev media entity operations */ fimc_lite_link_setup()
985 static int fimc_lite_link_setup(struct media_entity *entity, fimc_lite_link_setup() argument
989 struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity); fimc_lite_link_setup()
991 unsigned int remote_ent_type = media_entity_type(remote->entity); fimc_lite_link_setup()
998 __func__, remote->entity->name, local->entity->name, fimc_lite_link_setup()
1119 sd->entity.stream_count > 0) || fimc_lite_subdev_set_fmt()
1242 * The pipeline links are protected through entity.stream_count fimc_lite_subdev_s_stream()
1245 fimc->sensor = fimc_find_remote_sensor(&sd->entity); fimc_lite_subdev_s_stream()
1325 ret = media_entity_init(&vfd->entity, 1, &fimc->vd_pad, 0); fimc_lite_subdev_registered()
1334 media_entity_cleanup(&vfd->entity); fimc_lite_subdev_registered()
1355 media_entity_cleanup(&fimc->ve.vdev.entity); fimc_lite_subdev_unregistered()
1439 ret = media_entity_init(&sd->entity, FLITE_SD_PADS_NUM, fimc_lite_create_capture_subdev()
1448 media_entity_cleanup(&sd->entity); fimc_lite_create_capture_subdev()
1454 sd->entity.ops = &fimc_lite_subdev_media_ops; fimc_lite_create_capture_subdev()
1466 media_entity_cleanup(&sd->entity); fimc_lite_unregister_capture_subdev()
1632 &fimc->ve.vdev.entity, false); fimc_lite_resume()
H A Dfimc-isp.c102 /* Capture subdev media entity operations */ fimc_is_link_setup()
103 static int fimc_is_link_setup(struct media_entity *entity, fimc_is_link_setup() argument
232 if (sd->entity.stream_count == 0) { fimc_isp_subdev_set_fmt()
711 ret = media_entity_init(&sd->entity, FIMC_ISP_SD_PADS_NUM, fimc_isp_subdev_create()
761 media_entity_cleanup(&sd->entity); fimc_isp_subdev_create()
770 sd->entity.ops = &fimc_is_subdev_media_ops; fimc_isp_subdev_create()
783 media_entity_cleanup(&sd->entity); fimc_isp_subdev_destroy()
H A Dfimc-lite.h21 #include <media/media-entity.h>
113 * @ve: exynos video device entity structure
H A Dfimc-isp.h23 #include <media/media-entity.h>
H A Dfimc-core.h24 #include <media/media-entity.h>
289 * @ve: exynos video device entity structure
405 * struct fimc_dev - abstraction for FIMC entity
H A Dfimc-m2m.c741 ret = media_entity_init(&vfd->entity, 0, NULL, 0); fimc_register_m2m_device()
754 media_entity_cleanup(&vfd->entity); fimc_register_m2m_device()
770 media_entity_cleanup(&fimc->m2m.vfd.entity); fimc_unregister_m2m_device()
H A Dmipi-csis.c868 ret = media_entity_init(&state->sd.entity, s5pcsis_probe()
893 media_entity_cleanup(&state->sd.entity); s5pcsis_probe()
1004 media_entity_cleanup(&state->sd.entity); s5pcsis_remove()
/linux-4.1.27/include/video/
H A Domap-panel-data.h37 * @name: name for this display entity
50 * @name: name for this display entity
66 * @name: name for this display entity
67 * @source: name of the display entity used as a video source
78 * @name: name for this display entity
79 * @source: name of the display entity used as a video source
88 * @name: name for this display entity
89 * @source: name of the display entity used as a video source
103 * @name: name for this display entity
104 * @source: name of the display entity used as a video source
124 * @name: name for this display entity
125 * @source: name of the display entity used as a video source
151 * @name: name for this display entity
152 * @source: name of the display entity used as a video source
167 * @name: name for this display entity
168 * @source: name of the display entity used as a video source
185 * @name: name for this display entity
186 * @source: name of the display entity used as a video source
209 * @name: name for this display entity
210 * @source: name of the display entity used as a video source
225 * @name: name for this display entity
226 * @source: name of the display entity used as a video source
243 * @name: name for display entity
244 * @source: name of the display entity used as a video source
/linux-4.1.27/drivers/staging/media/omap4iss/
H A Diss.c145 ret = v4l2_subdev_call(media_entity_to_v4l2_subdev(link->sink->entity), omap4iss_get_external_info()
371 * To achieve this use the entity use_count field to track the number of users.
388 * @entity: The entity
392 static int iss_pipeline_pm_use_count(struct media_entity *entity) iss_pipeline_pm_use_count() argument
397 media_entity_graph_walk_start(&graph, entity); iss_pipeline_pm_use_count()
399 while ((entity = media_entity_graph_walk_next(&graph))) { iss_pipeline_pm_use_count()
400 if (media_entity_type(entity) == MEDIA_ENT_T_DEVNODE) iss_pipeline_pm_use_count()
401 use += entity->use_count; iss_pipeline_pm_use_count()
408 * iss_pipeline_pm_power_one - Apply power change to an entity
409 * @entity: The entity
412 * Change the entity use count by @change. If the entity is a subdev update its
418 static int iss_pipeline_pm_power_one(struct media_entity *entity, int change) iss_pipeline_pm_power_one() argument
422 subdev = media_entity_type(entity) == MEDIA_ENT_T_V4L2_SUBDEV iss_pipeline_pm_power_one()
423 ? media_entity_to_v4l2_subdev(entity) : NULL; iss_pipeline_pm_power_one()
425 if (entity->use_count == 0 && change > 0 && subdev != NULL) { iss_pipeline_pm_power_one()
433 entity->use_count += change; iss_pipeline_pm_power_one()
434 WARN_ON(entity->use_count < 0); iss_pipeline_pm_power_one()
436 if (entity->use_count == 0 && change < 0 && subdev != NULL) iss_pipeline_pm_power_one()
444 * @entity: The entity
452 static int iss_pipeline_pm_power(struct media_entity *entity, int change) iss_pipeline_pm_power() argument
455 struct media_entity *first = entity; iss_pipeline_pm_power()
461 media_entity_graph_walk_start(&graph, entity); iss_pipeline_pm_power()
463 while (!ret && (entity = media_entity_graph_walk_next(&graph))) iss_pipeline_pm_power()
464 if (media_entity_type(entity) != MEDIA_ENT_T_DEVNODE) iss_pipeline_pm_power()
465 ret = iss_pipeline_pm_power_one(entity, change); iss_pipeline_pm_power()
473 && first != entity) iss_pipeline_pm_power()
481 * omap4iss_pipeline_pm_use - Update the use count of an entity
482 * @entity: The entity
483 * @use: Use (1) or stop using (0) the entity
492 int omap4iss_pipeline_pm_use(struct media_entity *entity, int use) omap4iss_pipeline_pm_use() argument
497 mutex_lock(&entity->parent->graph_mutex); omap4iss_pipeline_pm_use()
500 entity->use_count += change; omap4iss_pipeline_pm_use()
501 WARN_ON(entity->use_count < 0); omap4iss_pipeline_pm_use()
504 ret = iss_pipeline_pm_power(entity, change); omap4iss_pipeline_pm_use()
506 entity->use_count -= change; omap4iss_pipeline_pm_use()
508 mutex_unlock(&entity->parent->graph_mutex); omap4iss_pipeline_pm_use()
529 struct media_entity *source = link->source->entity; iss_pipeline_link_notify()
530 struct media_entity *sink = link->sink->entity; iss_pipeline_link_notify()
566 * @until: entity at which to stop pipeline walk
573 * until entity. This is used to disable a partially started pipeline due to a
580 struct media_entity *entity; iss_pipeline_disable() local
586 entity = &pipe->output->video.entity; iss_pipeline_disable()
588 pad = &entity->pads[0]; iss_pipeline_disable()
594 media_entity_type(pad->entity) != MEDIA_ENT_T_V4L2_SUBDEV) iss_pipeline_disable()
597 entity = pad->entity; iss_pipeline_disable()
598 if (entity == until) iss_pipeline_disable()
601 subdev = media_entity_to_v4l2_subdev(entity); iss_pipeline_disable()
606 /* If the entity failed to stopped, assume it has iss_pipeline_disable()
610 iss->crashed |= 1U << subdev->entity.id; iss_pipeline_disable()
633 struct media_entity *entity; iss_pipeline_enable() local
654 entity = &pipe->output->video.entity; iss_pipeline_enable()
656 pad = &entity->pads[0]; iss_pipeline_enable()
662 media_entity_type(pad->entity) != MEDIA_ENT_T_V4L2_SUBDEV) iss_pipeline_enable()
665 entity = pad->entity; iss_pipeline_enable()
666 subdev = media_entity_to_v4l2_subdev(entity); iss_pipeline_enable()
670 iss_pipeline_disable(pipe, entity); iss_pipeline_enable()
729 * iss_pipeline_is_last - Verify if entity has an enabled link to the output
731 * @me: ISS module's media entity
733 * Returns 1 if the entity has an enabled link to the output video node or 0
748 return pad->entity == me; iss_pipeline_is_last()
806 * @me: ISS submodule's media entity
1090 /* Reset the ISS if an entity has failed to stop. This is the omap4iss_put()
1135 * Return a pointer to the sensor media entity if it has been successfully
1242 input = &iss->csi2a.subdev.entity; iss_register_entities()
1249 input = &iss->csi2b.subdev.entity; iss_register_entities()
1262 ret = media_entity_create_link(&sensor->entity, 0, input, pad, iss_register_entities()
1321 &iss->csi2a.subdev.entity, CSI2_PAD_SOURCE, iss_initialize_modules()
1322 &iss->ipipeif.subdev.entity, IPIPEIF_PAD_SINK, 0); iss_initialize_modules()
1327 &iss->csi2b.subdev.entity, CSI2_PAD_SOURCE, iss_initialize_modules()
1328 &iss->ipipeif.subdev.entity, IPIPEIF_PAD_SINK, 0); iss_initialize_modules()
1333 &iss->ipipeif.subdev.entity, IPIPEIF_PAD_SOURCE_VP, iss_initialize_modules()
1334 &iss->resizer.subdev.entity, RESIZER_PAD_SINK, 0); iss_initialize_modules()
1339 &iss->ipipeif.subdev.entity, IPIPEIF_PAD_SOURCE_VP, iss_initialize_modules()
1340 &iss->ipipe.subdev.entity, IPIPE_PAD_SINK, 0); iss_initialize_modules()
1345 &iss->ipipe.subdev.entity, IPIPE_PAD_SOURCE_VP, iss_initialize_modules()
1346 &iss->resizer.subdev.entity, RESIZER_PAD_SINK, 0); iss_initialize_modules()
H A Diss_video.c195 media_entity_type(remote->entity) != MEDIA_ENT_T_V4L2_SUBDEV) iss_video_remote_subdev()
201 return media_entity_to_v4l2_subdev(remote->entity); iss_video_remote_subdev()
209 struct media_entity *entity = &video->video.entity; iss_video_far_end() local
210 struct media_device *mdev = entity->parent; iss_video_far_end()
214 media_entity_graph_walk_start(&graph, entity); iss_video_far_end()
216 while ((entity = media_entity_graph_walk_next(&graph))) { iss_video_far_end()
217 if (entity == &video->video.entity) iss_video_far_end()
220 if (media_entity_type(entity) != MEDIA_ENT_T_DEVNODE) iss_video_far_end()
223 far_end = to_iss_video(media_entity_to_video_device(entity)); iss_video_far_end()
348 struct iss_pipeline *pipe = to_iss_pipeline(&video->video.entity); iss_video_buf_queue()
419 struct iss_pipeline *pipe = to_iss_pipeline(&video->video.entity); omap4iss_video_buffer_next()
825 struct media_entity *entity; iss_video_streamon() local
837 /* Start streaming on the pipeline. No link touching an entity in the iss_video_streamon()
840 pipe = video->video.entity.pipe iss_video_streamon()
841 ? to_iss_pipeline(&video->video.entity) : &video->pipe; iss_video_streamon()
850 ret = media_entity_pipeline_start(&video->video.entity, &pipe->pipe); iss_video_streamon()
854 entity = &video->video.entity; iss_video_streamon()
855 media_entity_graph_walk_start(&graph, entity); iss_video_streamon()
856 while ((entity = media_entity_graph_walk_next(&graph))) iss_video_streamon()
857 pipe->entities |= 1 << entity->id; iss_video_streamon()
933 media_entity_pipeline_stop(&video->video.entity); iss_video_streamon()
948 struct iss_pipeline *pipe = to_iss_pipeline(&video->video.entity); iss_video_streamoff()
979 media_entity_pipeline_stop(&video->video.entity); iss_video_streamoff()
1062 ret = omap4iss_pipeline_pm_use(&video->video.entity, 1); iss_video_open()
1116 omap4iss_pipeline_pm_use(&video->video.entity, 0); iss_video_release()
1180 ret = media_entity_init(&video->video.entity, 1, &video->pad, 0); omap4iss_video_init()
1210 media_entity_cleanup(&video->video.entity); omap4iss_video_cleanup()
H A Diss_ipipe.c165 if (omap4iss_module_sync_idle(&sd->entity, &ipipe->wait, ipipe_set_stream()
422 * Media entity operations
427 * @entity: IPIPE media entity
434 static int ipipe_link_setup(struct media_entity *entity, ipipe_link_setup() argument
438 struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity); ipipe_link_setup()
442 switch (local->index | media_entity_type(remote->entity)) { ipipe_link_setup()
453 if (remote->entity == &iss->ipipeif.subdev.entity) ipipe_link_setup()
483 * ipipe_init_entities - Initialize V4L2 subdev and media entity
492 struct media_entity *me = &sd->entity; ipipe_init_entities()
569 media_entity_cleanup(&ipipe->subdev.entity); omap4iss_ipipe_cleanup()
H A Diss_resizer.c294 to_iss_pipeline(&resizer->subdev.entity); omap4iss_resizer_isr()
401 if (omap4iss_module_sync_idle(&sd->entity, &resizer->wait, resizer_set_stream()
699 * Media entity operations
704 * @entity: RESIZER media entity
711 static int resizer_link_setup(struct media_entity *entity, resizer_link_setup() argument
715 struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity); resizer_link_setup()
719 switch (local->index | media_entity_type(remote->entity)) { resizer_link_setup()
730 if (remote->entity == &iss->ipipeif.subdev.entity) resizer_link_setup()
732 else if (remote->entity == &iss->ipipe.subdev.entity) resizer_link_setup()
763 * resizer_init_entities - Initialize V4L2 subdev and media entity
772 struct media_entity *me = &sd->entity; resizer_init_entities()
807 ret = media_entity_create_link(&resizer->subdev.entity, resizer_init_entities()
809 &resizer->video_out.video.entity, 0, 0); resizer_init_entities()
873 media_entity_cleanup(&resizer->subdev.entity); omap4iss_resizer_cleanup()
H A Diss_ipipeif.c346 if (omap4iss_module_sync_idle(&sd->entity, &ipipeif->wait, ipipeif_set_stream()
644 * Media entity operations
649 * @entity: IPIPEIF media entity
656 static int ipipeif_link_setup(struct media_entity *entity, ipipeif_link_setup() argument
660 struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity); ipipeif_link_setup()
664 switch (local->index | media_entity_type(remote->entity)) { ipipeif_link_setup()
675 if (remote->entity == &iss->csi2a.subdev.entity) ipipeif_link_setup()
677 else if (remote->entity == &iss->csi2b.subdev.entity) ipipeif_link_setup()
718 * ipipeif_init_entities - Initialize V4L2 subdev and media entity
727 struct media_entity *me = &sd->entity; ipipeif_init_entities()
763 ret = media_entity_create_link(&ipipeif->subdev.entity, ipipeif_init_entities()
765 &ipipeif->video_out.video.entity, 0, 0); ipipeif_init_entities()
829 media_entity_cleanup(&ipipeif->subdev.entity); omap4iss_ipipeif_cleanup()
H A Diss_csi2.c546 sensor = media_entity_to_v4l2_subdev(pad->entity); csi2_configure()
680 to_iss_pipeline(&csi2->subdev.entity); csi2_isr_ctx()
743 struct iss_pipeline *pipe = to_iss_pipeline(&csi2->subdev.entity); omap4iss_csi2_isr()
1020 struct iss_pipeline *pipe = to_iss_pipeline(&csi2->subdev.entity); csi2_link_validate()
1023 pipe->external = media_entity_to_v4l2_subdev(link->source->entity); csi2_link_validate()
1107 if (omap4iss_module_sync_idle(&sd->entity, &csi2->wait, csi2_set_stream()
1149 * Media entity operations
1154 * @entity : Pointer to media entity structure
1160 static int csi2_link_setup(struct media_entity *entity, csi2_link_setup() argument
1164 struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity); csi2_link_setup()
1173 switch (local->index | media_entity_type(remote->entity)) { csi2_link_setup()
1243 * csi2_init_entities - Initialize subdev and media entity.
1251 struct media_entity *me = &sd->entity; csi2_init_entities()
1288 ret = media_entity_create_link(&csi2->subdev.entity, CSI2_PAD_SOURCE, csi2_init_entities()
1289 &csi2->video_out.video.entity, 0, 0); csi2_init_entities()
1298 media_entity_cleanup(&csi2->subdev.entity); csi2_init_entities()
1347 media_entity_cleanup(&csi2a->subdev.entity); omap4iss_csi2_cleanup()
1350 media_entity_cleanup(&csi2b->subdev.entity); omap4iss_csi2_cleanup()
H A Diss_ipipe.h35 * @pads: Sink and source media entity pads
H A Diss_resizer.h36 * @pads: Sink and source media entity pads
H A Diss_video.h18 #include <media/media-entity.h>
70 /* The input entity is idle, ready to be started. */
72 /* The output entity is idle, ready to be started. */
80 * @entities: Bitmask of entities in the pipeline (indexed by entity ID)
H A Diss_ipipeif.h38 * @pads: Sink and source media entity pads
H A Diss.h85 * @crashed: Bitmask of crashed entities (indexed by entity ID)
154 int omap4iss_pipeline_pm_use(struct media_entity *entity, int use);
H A Diss_csiphy.c123 struct iss_pipeline *pipe = to_iss_pipeline(&csi2_subdev->entity); omap4iss_csiphy_config()
/linux-4.1.27/drivers/media/dvb-core/
H A Ddvbdev.c192 dvbdev->entity = kzalloc(sizeof(*dvbdev->entity), GFP_KERNEL); dvb_register_media_device()
193 if (!dvbdev->entity) dvb_register_media_device()
196 dvbdev->entity->info.dev.major = DVB_MAJOR; dvb_register_media_device()
197 dvbdev->entity->info.dev.minor = minor; dvb_register_media_device()
198 dvbdev->entity->name = dvbdev->name; dvb_register_media_device()
217 kfree(dvbdev->entity); dvb_register_media_device()
224 dvbdev->entity->type = MEDIA_ENT_T_DEVNODE_DVB_FE; dvb_register_media_device()
229 dvbdev->entity->type = MEDIA_ENT_T_DEVNODE_DVB_DEMUX; dvb_register_media_device()
234 dvbdev->entity->type = MEDIA_ENT_T_DEVNODE_DVB_DVR; dvb_register_media_device()
238 dvbdev->entity->type = MEDIA_ENT_T_DEVNODE_DVB_CA; dvb_register_media_device()
243 dvbdev->entity->type = MEDIA_ENT_T_DEVNODE_DVB_NET; dvb_register_media_device()
246 kfree(dvbdev->entity); dvb_register_media_device()
247 dvbdev->entity = NULL; dvb_register_media_device()
252 ret = media_entity_init(dvbdev->entity, npads, dvbdev->pads, 0); dvb_register_media_device()
255 dvbdev->entity); dvb_register_media_device()
259 __func__, dvbdev->entity->name); dvb_register_media_device()
261 kfree(dvbdev->entity); dvb_register_media_device()
262 dvbdev->entity = NULL; dvb_register_media_device()
267 __func__, dvbdev->entity->name); dvb_register_media_device()
370 if (dvbdev->entity) { dvb_unregister_device()
371 media_device_unregister_entity(dvbdev->entity); dvb_unregister_device()
372 kfree(dvbdev->entity); dvb_unregister_device()
388 struct media_entity *entity, *tuner = NULL, *fe = NULL; dvb_create_media_graph() local
394 media_device_for_each_entity(entity, mdev) { media_device_for_each_entity()
395 switch (entity->type) { media_device_for_each_entity()
397 tuner = entity; media_device_for_each_entity()
400 fe = entity; media_device_for_each_entity()
403 demux = entity; media_device_for_each_entity()
406 dvr = entity; media_device_for_each_entity()
409 ca = entity; media_device_for_each_entity()
H A Ddvbdev.h105 struct media_entity *entity; member in struct:dvb_device
H A Ddvb_frontend.c622 struct media_entity *entity, *source; dvb_enable_media_tuner() local
631 entity = fepriv->dvbdev->entity; dvb_enable_media_tuner()
632 fepriv->pipe_start_entity = entity; dvb_enable_media_tuner()
634 for (i = 0; i < entity->num_links; i++) { dvb_enable_media_tuner()
635 link = &entity->links[i]; dvb_enable_media_tuner()
636 if (link->sink->entity == entity) { dvb_enable_media_tuner()
659 source = found_link->source->entity; dvb_enable_media_tuner()
666 sink = link->sink->entity; dvb_enable_media_tuner()
668 if (sink == entity) dvb_enable_media_tuner()
/linux-4.1.27/drivers/media/platform/omap3isp/
H A Disp.c554 pipe = to_isp_pipeline(&isp->isp_ccp2.subdev.entity); isp_isr_sbl()
560 pipe = to_isp_pipeline(&isp->isp_csi2a.subdev.entity); isp_isr_sbl()
566 pipe = to_isp_pipeline(&isp->isp_ccdc.subdev.entity); isp_isr_sbl()
572 pipe = to_isp_pipeline(&isp->isp_prev.subdev.entity); isp_isr_sbl()
581 pipe = to_isp_pipeline(&isp->isp_res.subdev.entity); isp_isr_sbl()
667 * To achieve this use the entity use_count field to track the number of users.
684 * @entity: The entity
688 static int isp_pipeline_pm_use_count(struct media_entity *entity) isp_pipeline_pm_use_count() argument
693 media_entity_graph_walk_start(&graph, entity); isp_pipeline_pm_use_count()
695 while ((entity = media_entity_graph_walk_next(&graph))) { isp_pipeline_pm_use_count()
696 if (media_entity_type(entity) == MEDIA_ENT_T_DEVNODE) isp_pipeline_pm_use_count()
697 use += entity->use_count; isp_pipeline_pm_use_count()
704 * isp_pipeline_pm_power_one - Apply power change to an entity
705 * @entity: The entity
708 * Change the entity use count by @change. If the entity is a subdev update its
714 static int isp_pipeline_pm_power_one(struct media_entity *entity, int change) isp_pipeline_pm_power_one() argument
719 subdev = media_entity_type(entity) == MEDIA_ENT_T_V4L2_SUBDEV isp_pipeline_pm_power_one()
720 ? media_entity_to_v4l2_subdev(entity) : NULL; isp_pipeline_pm_power_one()
722 if (entity->use_count == 0 && change > 0 && subdev != NULL) { isp_pipeline_pm_power_one()
728 entity->use_count += change; isp_pipeline_pm_power_one()
729 WARN_ON(entity->use_count < 0); isp_pipeline_pm_power_one()
731 if (entity->use_count == 0 && change < 0 && subdev != NULL) isp_pipeline_pm_power_one()
739 * @entity: The entity
747 static int isp_pipeline_pm_power(struct media_entity *entity, int change) isp_pipeline_pm_power() argument
750 struct media_entity *first = entity; isp_pipeline_pm_power()
756 media_entity_graph_walk_start(&graph, entity); isp_pipeline_pm_power()
758 while (!ret && (entity = media_entity_graph_walk_next(&graph))) isp_pipeline_pm_power()
759 if (media_entity_type(entity) != MEDIA_ENT_T_DEVNODE) isp_pipeline_pm_power()
760 ret = isp_pipeline_pm_power_one(entity, change); isp_pipeline_pm_power()
768 && first != entity) isp_pipeline_pm_power()
776 * omap3isp_pipeline_pm_use - Update the use count of an entity
777 * @entity: The entity
778 * @use: Use (1) or stop using (0) the entity
787 int omap3isp_pipeline_pm_use(struct media_entity *entity, int use) omap3isp_pipeline_pm_use() argument
792 mutex_lock(&entity->parent->graph_mutex); omap3isp_pipeline_pm_use()
795 entity->use_count += change; omap3isp_pipeline_pm_use()
796 WARN_ON(entity->use_count < 0); omap3isp_pipeline_pm_use()
799 ret = isp_pipeline_pm_power(entity, change); omap3isp_pipeline_pm_use()
801 entity->use_count -= change; omap3isp_pipeline_pm_use()
803 mutex_unlock(&entity->parent->graph_mutex); omap3isp_pipeline_pm_use()
825 struct media_entity *source = link->source->entity; isp_pipeline_link_notify()
826 struct media_entity *sink = link->sink->entity; isp_pipeline_link_notify()
875 struct media_entity *entity; isp_pipeline_enable() local
881 /* Refuse to start streaming if an entity included in the pipeline has isp_pipeline_enable()
895 entity = &pipe->output->video.entity; isp_pipeline_enable()
897 pad = &entity->pads[0]; isp_pipeline_enable()
903 media_entity_type(pad->entity) != MEDIA_ENT_T_V4L2_SUBDEV) isp_pipeline_enable()
906 entity = pad->entity; isp_pipeline_enable()
907 subdev = media_entity_to_v4l2_subdev(entity); isp_pipeline_enable()
975 struct media_entity *entity; isp_pipeline_disable() local
985 entity = &pipe->output->video.entity; isp_pipeline_disable()
987 pad = &entity->pads[0]; isp_pipeline_disable()
993 media_entity_type(pad->entity) != MEDIA_ENT_T_V4L2_SUBDEV) isp_pipeline_disable()
996 entity = pad->entity; isp_pipeline_disable()
997 subdev = media_entity_to_v4l2_subdev(entity); isp_pipeline_disable()
1017 /* Handle stop failures. An entity that fails to stop can isp_pipeline_disable()
1033 isp->crashed |= 1U << subdev->entity.id; isp_pipeline_disable()
1114 * isp_pipeline_is_last - Verify if entity has an enabled link to the output
1116 * @me: ISP module's media entity
1118 * Returns 1 if the entity has an enabled link to the output video node or 0
1133 return pad->entity == me; isp_pipeline_is_last()
1138 * @me: ISP module's media entity
1140 * Suspend the whole pipeline if module's entity has an enabled link to the
1152 * @me: ISP module's media entity
1154 * Resume the whole pipeline if module's entity has an enabled link to the
1178 isp_suspend_module_pipeline(&isp->isp_res.subdev.entity); isp_suspend_modules()
1179 isp_suspend_module_pipeline(&isp->isp_prev.subdev.entity); isp_suspend_modules()
1180 isp_suspend_module_pipeline(&isp->isp_ccdc.subdev.entity); isp_suspend_modules()
1181 isp_suspend_module_pipeline(&isp->isp_csi2a.subdev.entity); isp_suspend_modules()
1182 isp_suspend_module_pipeline(&isp->isp_ccp2.subdev.entity); isp_suspend_modules()
1210 isp_resume_module_pipeline(&isp->isp_res.subdev.entity); isp_resume_modules()
1211 isp_resume_module_pipeline(&isp->isp_prev.subdev.entity); isp_resume_modules()
1212 isp_resume_module_pipeline(&isp->isp_ccdc.subdev.entity); isp_resume_modules()
1213 isp_resume_module_pipeline(&isp->isp_csi2a.subdev.entity); isp_resume_modules()
1214 isp_resume_module_pipeline(&isp->isp_ccp2.subdev.entity); isp_resume_modules()
1370 * @me: ISP submodule's media entity
1647 /* Reset the ISP if an entity has failed to stop. This is the __omap3isp_put()
1841 struct isp_device *isp, struct media_entity *entity, isp_link_entity()
1856 input = &isp->isp_ccdc.subdev.entity; isp_link_entity()
1862 input = &isp->isp_csi2a.subdev.entity; isp_link_entity()
1869 input = &isp->isp_ccp2.subdev.entity; isp_link_entity()
1875 input = &isp->isp_csi2c.subdev.entity; isp_link_entity()
1893 dev_err(isp->dev, "%s: invalid input %u\n", entity->name, isp_link_entity()
1898 for (i = 0; i < entity->num_pads; i++) { isp_link_entity()
1899 if (entity->pads[i].flags & MEDIA_PAD_FL_SOURCE) isp_link_entity()
1902 if (i == entity->num_pads) { isp_link_entity()
1903 dev_err(isp->dev, "%s: no source pad in external entity\n", isp_link_entity()
1908 return media_entity_create_link(entity, i, input, pad, flags); isp_link_entity()
1994 ret = isp_link_entity(isp, &sd->entity, isp_register_entities()
2083 &isp->isp_csi2a.subdev.entity, CSI2_PAD_SOURCE, isp_initialize_modules()
2084 &isp->isp_ccdc.subdev.entity, CCDC_PAD_SINK, 0); isp_initialize_modules()
2089 &isp->isp_ccp2.subdev.entity, CCP2_PAD_SOURCE, isp_initialize_modules()
2090 &isp->isp_ccdc.subdev.entity, CCDC_PAD_SINK, 0); isp_initialize_modules()
2095 &isp->isp_ccdc.subdev.entity, CCDC_PAD_SOURCE_VP, isp_initialize_modules()
2096 &isp->isp_prev.subdev.entity, PREV_PAD_SINK, 0); isp_initialize_modules()
2101 &isp->isp_ccdc.subdev.entity, CCDC_PAD_SOURCE_OF, isp_initialize_modules()
2102 &isp->isp_res.subdev.entity, RESZ_PAD_SINK, 0); isp_initialize_modules()
2107 &isp->isp_prev.subdev.entity, PREV_PAD_SOURCE, isp_initialize_modules()
2108 &isp->isp_res.subdev.entity, RESZ_PAD_SINK, 0); isp_initialize_modules()
2113 &isp->isp_ccdc.subdev.entity, CCDC_PAD_SOURCE_VP, isp_initialize_modules()
2114 &isp->isp_aewb.subdev.entity, 0, isp_initialize_modules()
2120 &isp->isp_ccdc.subdev.entity, CCDC_PAD_SOURCE_VP, isp_initialize_modules()
2121 &isp->isp_af.subdev.entity, 0, isp_initialize_modules()
2127 &isp->isp_ccdc.subdev.entity, CCDC_PAD_SOURCE_VP, isp_initialize_modules()
2128 &isp->isp_hist.subdev.entity, 0, isp_initialize_modules()
2365 ret = isp_link_entity(isp, &subdev->entity, isd->bus.interface); isp_subdev_notifier_bound()
1840 isp_link_entity( struct isp_device *isp, struct media_entity *entity, enum isp_interface_type interface) isp_link_entity() argument
H A Dispccp2.h30 /* CCP2 input media entity */
37 /* CCP2 output media entity */
H A Disppreview.h108 * @pads: Media entity pads
113 * @video_in: Input video entity
114 * @video_out: Output video entity
118 * @underrun: Whether the preview entity has queued buffers on the output
H A Dispvideo.c214 media_entity_type(remote->entity) != MEDIA_ENT_T_V4L2_SUBDEV) isp_video_remote_subdev()
220 return media_entity_to_v4l2_subdev(remote->entity); isp_video_remote_subdev()
228 struct media_entity *entity = &video->video.entity; isp_video_get_graph_data() local
229 struct media_device *mdev = entity->parent; isp_video_get_graph_data()
233 media_entity_graph_walk_start(&graph, entity); isp_video_get_graph_data()
235 while ((entity = media_entity_graph_walk_next(&graph))) { isp_video_get_graph_data()
238 pipe->entities |= 1 << entity->id; isp_video_get_graph_data()
243 if (entity == &video->video.entity) isp_video_get_graph_data()
246 if (media_entity_type(entity) != MEDIA_ENT_T_DEVNODE) isp_video_get_graph_data()
249 __video = to_isp_video(media_entity_to_video_device(entity)); isp_video_get_graph_data()
386 struct isp_pipeline *pipe = to_isp_pipeline(&video->video.entity); isp_video_buffer_queue()
451 struct isp_pipeline *pipe = to_isp_pipeline(&video->video.entity); omap3isp_video_buffer_next()
881 &isp->isp_csi2a.subdev.entity, isp_video_check_external_subdevs()
882 &isp->isp_csi2c.subdev.entity, isp_video_check_external_subdevs()
883 &isp->isp_ccp2.subdev.entity, isp_video_check_external_subdevs()
884 &isp->isp_ccdc.subdev.entity isp_video_check_external_subdevs()
900 /* Is the entity part of the pipeline? */ isp_video_check_external_subdevs()
909 source = source_pad->entity; isp_video_check_external_subdevs()
953 if (pipe->entities & (1 << isp->isp_ccdc.subdev.entity.id)) { isp_video_check_external_subdevs()
1013 /* Start streaming on the pipeline. No link touching an entity in the isp_video_streamon()
1016 pipe = video->video.entity.pipe isp_video_streamon()
1017 ? to_isp_pipeline(&video->video.entity) : &video->pipe; isp_video_streamon()
1026 ret = media_entity_pipeline_start(&video->video.entity, &pipe->pipe); isp_video_streamon()
1101 media_entity_pipeline_stop(&video->video.entity); isp_video_streamon()
1124 struct isp_pipeline *pipe = to_isp_pipeline(&video->video.entity); isp_video_streamoff()
1166 media_entity_pipeline_stop(&video->video.entity); isp_video_streamoff()
1247 ret = omap3isp_pipeline_pm_use(&video->video.entity, 1); isp_video_open()
1297 omap3isp_pipeline_pm_use(&video->video.entity, 0); isp_video_release()
1371 ret = media_entity_init(&video->video.entity, 1, &video->pad, 0); omap3isp_video_init()
1405 media_entity_cleanup(&video->video.entity); omap3isp_video_cleanup()
H A Dispccp2.c360 sensor = media_entity_to_v4l2_subdev(pad->entity); ccp2_if_configure()
385 struct isp_pipeline *pipe = to_isp_pipeline(&ccp2->subdev.entity); ccp2_adjust_bandwidth()
537 struct isp_pipeline *pipe = to_isp_pipeline(&ccp2->subdev.entity); ccp2_isr_buffer()
561 struct isp_pipeline *pipe = to_isp_pipeline(&ccp2->subdev.entity); omap3isp_ccp2_isr()
876 if (omap3isp_module_sync_idle(&sd->entity, &ccp2->wait, ccp2_s_stream()
942 * Media entity operations
947 * @entity : Pointer to media entity structure
953 static int ccp2_link_setup(struct media_entity *entity, ccp2_link_setup() argument
957 struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity); ccp2_link_setup()
960 switch (local->index | media_entity_type(remote->entity)) { ccp2_link_setup()
1016 * omap3isp_ccp2_register_entities - Register the subdev media entity
1048 * ccp2_init_entities - Initialize ccp2 subdev and media entity.
1056 struct media_entity *me = &sd->entity; ccp2_init_entities()
1103 ret = media_entity_create_link(&ccp2->video_in.video.entity, 0, ccp2_init_entities()
1104 &ccp2->subdev.entity, CCP2_PAD_SINK, 0); ccp2_init_entities()
1113 media_entity_cleanup(&ccp2->subdev.entity); ccp2_init_entities()
1168 media_entity_cleanup(&ccp2->subdev.entity); omap3isp_ccp2_cleanup()
H A Dispcsi2.c551 struct isp_pipeline *pipe = to_isp_pipeline(&csi2->subdev.entity); csi2_configure()
568 sensor = media_entity_to_v4l2_subdev(pad->entity); csi2_configure()
740 struct isp_pipeline *pipe = to_isp_pipeline(&csi2->subdev.entity); omap3isp_csi2_isr()
1087 if (omap3isp_module_sync_idle(&sd->entity, &csi2->wait, csi2_set_stream()
1129 * Media entity operations
1134 * @entity : Pointer to media entity structure
1140 static int csi2_link_setup(struct media_entity *entity, csi2_link_setup() argument
1144 struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity); csi2_link_setup()
1153 switch (local->index | media_entity_type(remote->entity)) { csi2_link_setup()
1224 * csi2_init_entities - Initialize subdev and media entity.
1232 struct media_entity *me = &sd->entity; csi2_init_entities()
1268 ret = media_entity_create_link(&csi2->subdev.entity, CSI2_PAD_SOURCE, csi2_init_entities()
1269 &csi2->video_out.video.entity, 0, 0); csi2_init_entities()
1278 media_entity_cleanup(&csi2->subdev.entity); csi2_init_entities()
1324 media_entity_cleanup(&csi2a->subdev.entity); omap3isp_csi2_cleanup()
H A Dispvideo.h20 #include <media/media-entity.h>
71 /* The input entity is idle, ready to be started. */
73 /* The output entity is idle, ready to be started. */
83 * @entities: Bitmask of entities in the pipeline (indexed by entity ID)
H A Disp.h158 * @stop_failure: Indicates that an entity failed to stop.
159 * @crashed: Bitmask of crashed entities (indexed by entity ID)
273 int omap3isp_pipeline_pm_use(struct media_entity *entity, int use);
362 if (pad >= subdev->entity.num_pads) isp_pad_buffer_type()
365 if (subdev->entity.pads[pad].flags & MEDIA_PAD_FL_SINK) isp_pad_buffer_type()
H A Dispresizer.c503 struct isp_pipeline *pipe = to_isp_pipeline(&res->subdev.entity); omap3isp_resizer_max_rate()
544 struct isp_pipeline *pipe = to_isp_pipeline(&res->subdev.entity); resizer_adjust_bandwidth()
1017 struct isp_pipeline *pipe = to_isp_pipeline(&res->subdev.entity); resizer_isr_buffer()
1167 if (omap3isp_module_sync_idle(&sd->entity, &res->wait, resizer_set_stream()
1548 struct isp_pipeline *pipe = to_isp_pipeline(&sd->entity); resizer_link_validate()
1609 * Media entity operations
1614 * @entity : Pointer to media entity structure
1620 static int resizer_link_setup(struct media_entity *entity, resizer_link_setup() argument
1624 struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity); resizer_link_setup()
1627 switch (local->index | media_entity_type(remote->entity)) { resizer_link_setup()
1706 * resizer_init_entities - Initialize resizer subdev and media entity.
1714 struct media_entity *me = &sd->entity; resizer_init_entities()
1756 res->video_out.video.entity.flags |= MEDIA_ENT_FL_DEFAULT; resizer_init_entities()
1759 ret = media_entity_create_link(&res->video_in.video.entity, 0, resizer_init_entities()
1760 &res->subdev.entity, RESZ_PAD_SINK, 0); resizer_init_entities()
1764 ret = media_entity_create_link(&res->subdev.entity, RESZ_PAD_SOURCE, resizer_init_entities()
1765 &res->video_out.video.entity, 0, 0); resizer_init_entities()
1776 media_entity_cleanup(&res->subdev.entity); resizer_init_entities()
1802 media_entity_cleanup(&res->subdev.entity); omap3isp_resizer_cleanup()
H A Dispccdc.c807 struct isp_pipeline *pipe = to_isp_pipeline(&ccdc->subdev.entity); ccdc_config_vp()
940 struct isp_pipeline *pipe = to_isp_pipeline(&ccdc->subdev.entity); omap3isp_ccdc_max_rate()
1139 sensor = media_entity_to_v4l2_subdev(pad->entity); ccdc_configure()
1464 struct isp_pipeline *pipe = to_isp_pipeline(&ccdc->subdev.entity); ccdc_hs_vs_isr()
1489 to_isp_pipeline(&ccdc->subdev.entity); ccdc_lsc_isr()
1542 struct isp_pipeline *pipe = to_isp_pipeline(&ccdc->subdev.entity); ccdc_has_all_fields()
1586 struct isp_pipeline *pipe = to_isp_pipeline(&ccdc->subdev.entity); ccdc_isr_buffer()
1611 isp->crashed |= 1U << ccdc->subdev.entity.id; ccdc_isr_buffer()
1649 to_isp_pipeline(&ccdc->subdev.entity); ccdc_vd0_isr()
2422 media_entity_to_v4l2_subdev(link->source->entity) ccdc_link_validate()
2497 * Media entity operations
2502 * @entity: CCDC media entity
2509 static int ccdc_link_setup(struct media_entity *entity, ccdc_link_setup() argument
2513 struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity); ccdc_link_setup()
2517 switch (local->index | media_entity_type(remote->entity)) { ccdc_link_setup()
2530 if (remote->entity == &isp->isp_ccp2.subdev.entity) ccdc_link_setup()
2532 else if (remote->entity == &isp->isp_csi2a.subdev.entity) ccdc_link_setup()
2534 else if (remote->entity == &isp->isp_csi2c.subdev.entity) ccdc_link_setup()
2626 * ccdc_init_entities - Initialize V4L2 subdev and media entity
2635 struct media_entity *me = &sd->entity; ccdc_init_entities()
2670 ret = media_entity_create_link(&ccdc->subdev.entity, CCDC_PAD_SOURCE_OF, ccdc_init_entities()
2671 &ccdc->video_out.video.entity, 0, 0); ccdc_init_entities()
2732 media_entity_cleanup(&ccdc->subdev.entity); omap3isp_ccdc_cleanup()
H A Disppreview.c1171 struct isp_pipeline *pipe = to_isp_pipeline(&prev->subdev.entity); preview_adjust_bandwidth()
1483 struct isp_pipeline *pipe = to_isp_pipeline(&prev->subdev.entity); preview_isr_buffer()
1674 if (omap3isp_module_sync_idle(&sd->entity, &prev->wait, preview_set_stream()
2134 * Media entity operations
2139 * @entity : Pointer to media entity structure
2145 static int preview_link_setup(struct media_entity *entity, preview_link_setup() argument
2149 struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity); preview_link_setup()
2152 switch (local->index | media_entity_type(remote->entity)) { preview_link_setup()
2254 * preview_init_entities - Initialize subdev and media entity.
2262 struct media_entity *me = &sd->entity; preview_init_entities()
2319 ret = media_entity_create_link(&prev->video_in.video.entity, 0, preview_init_entities()
2320 &prev->subdev.entity, PREV_PAD_SINK, 0); preview_init_entities()
2324 ret = media_entity_create_link(&prev->subdev.entity, PREV_PAD_SOURCE, preview_init_entities()
2325 &prev->video_out.video.entity, 0, 0); preview_init_entities()
2336 media_entity_cleanup(&prev->subdev.entity); preview_init_entities()
2363 media_entity_cleanup(&prev->subdev.entity); omap3isp_preview_cleanup()
H A Dispcsiphy.c168 struct isp_pipeline *pipe = to_isp_pipeline(&csi2->subdev.entity); omap3isp_csiphy_config()
309 to_isp_pipeline(&csi2->subdev.entity); omap3isp_csiphy_release()
H A Dispccdc.h104 * @pads: Sink and source media entity pads
H A Dispstat.c903 pipe = to_isp_pipeline(&stat->subdev.entity); __stat_isr()
1021 struct media_entity *me = &subdev->entity; isp_stat_init_entities()
1059 media_entity_cleanup(&stat->subdev.entity); omap3isp_stat_cleanup()
/linux-4.1.27/net/ceph/
H A Dauth_none.h10 * we use a single static authorizer that simply encodes our entity name
H A Dauth.c98 * Initiate protocol negotiation with monitor. Include entity name
/linux-4.1.27/drivers/media/v4l2-core/
H A Dv4l2-subdev.c38 fh->pad = kzalloc(sizeof(*fh->pad) * sd->entity.num_pads, GFP_KERNEL); subdev_fh_init()
59 struct media_entity *entity = NULL; subdev_open() local
78 entity = media_entity_get(&sd->entity); subdev_open()
79 if (!entity) { subdev_open()
96 media_entity_put(entity); subdev_open()
117 media_entity_put(&sd->entity); subdev_close()
136 if (format->pad >= sd->entity.num_pads) check_format()
148 if (crop->pad >= sd->entity.num_pads) check_crop()
161 if (sel->pad >= sd->entity.num_pads) check_selection()
169 if (edid->pad >= sd->entity.num_pads) check_edid()
327 if (code->pad >= sd->entity.num_pads) subdev_do_ioctl()
341 if (fse->pad >= sd->entity.num_pads) subdev_do_ioctl()
351 if (fi->pad >= sd->entity.num_pads) subdev_do_ioctl()
360 if (fi->pad >= sd->entity.num_pads) subdev_do_ioctl()
373 if (fie->pad >= sd->entity.num_pads) subdev_do_ioctl()
425 if (cap->pad >= sd->entity.num_pads) subdev_do_ioctl()
434 if (dvt->pad >= sd->entity.num_pads) subdev_do_ioctl()
529 if (media_entity_type(pad->entity) == MEDIA_ENT_T_V4L2_SUBDEV) { v4l2_subdev_link_validate_get_format()
531 media_entity_to_v4l2_subdev(pad->entity); v4l2_subdev_link_validate_get_format()
538 WARN(pad->entity->type != MEDIA_ENT_T_DEVNODE_V4L, v4l2_subdev_link_validate_get_format()
539 "Driver bug! Wrong media entity type 0x%08x, entity %s\n", v4l2_subdev_link_validate_get_format()
540 pad->entity->type, pad->entity->name); v4l2_subdev_link_validate_get_format()
561 sink = media_entity_to_v4l2_subdev(link->sink->entity); v4l2_subdev_link_validate()
586 sd->entity.name = sd->name; v4l2_subdev_init()
587 sd->entity.type = MEDIA_ENT_T_V4L2_SUBDEV; v4l2_subdev_init()
H A Dv4l2-device.c149 struct media_entity *entity = &sd->entity; v4l2_device_register_subdev() local
186 /* Register the entity. */ v4l2_device_register_subdev()
188 err = media_device_register_entity(v4l2_dev->mdev, entity); v4l2_device_register_subdev()
250 sd->entity.info.dev.major = VIDEO_MAJOR; v4l2_device_register_subdev_nodes()
251 sd->entity.info.dev.minor = vdev->minor; v4l2_device_register_subdev_nodes()
288 media_entity_remove_links(&sd->entity); v4l2_device_unregister_subdev()
289 media_device_unregister_entity(&sd->entity); v4l2_device_unregister_subdev()
H A Dv4l2-dev.c199 media_device_unregister_entity(&vdev->entity); v4l2_device_release()
912 /* Part 5: Register the entity. */ __video_register_device()
915 vdev->entity.type = MEDIA_ENT_T_DEVNODE_V4L; __video_register_device()
916 vdev->entity.name = vdev->name; __video_register_device()
917 vdev->entity.info.dev.major = VIDEO_MAJOR; __video_register_device()
918 vdev->entity.info.dev.minor = vdev->minor; __video_register_device()
920 &vdev->entity); __video_register_device()
H A Dtuner-core.c441 t->sd.entity.name = t->name; set_type()
699 t->sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV_TUNER; tuner_probe()
700 t->sd.entity.name = t->name; tuner_probe()
702 ret = media_entity_init(&t->sd.entity, 1, &t->pad, 0); tuner_probe()
704 tuner_err("failed to initialize media entity!\n"); tuner_probe()
/linux-4.1.27/Documentation/DocBook/media/
H A DMakefile293 entity=`echo $$ident | tr _ -` ; \
294 echo "<!ENTITY func-$$entity \"<link" \
295 "linkend='func-$$entity'><function>$$ident()</function></link>\">" \
302 entity=`echo $$ident | tr _ -` ; \
304 echo "<!ENTITY $$entity \"<link" \
312 entity=`echo $$ident | tr _ -` ; \
313 echo "<!ENTITY $$entity \"<link" \
314 "linkend='$$entity'>$$ident</link>\">" >>$@ ; \
320 entity=`echo $$ident | sed -e "s/v4l2_mpeg_cx2341x_video_\([a-z]*_spatial_filter_type\)/\1/" | tr _ -` ; \
321 echo "<!ENTITY $$entity \"enum&nbsp;<link" \
322 "linkend='$$entity'>$$ident</link>\">" >>$@ ; \
328 entity=`echo $$ident | tr _ - | sed s/v4l2-mpeg-vbi-ITV0/v4l2-mpeg-vbi-itv0-1/g` ; \
329 echo "<!ENTITY $$entity \"struct&nbsp;<link" \
330 "linkend='$$entity'>$$ident</link>\">" >>$@ ; \
343 entity=`echo "$$file" | sed $(FILENAME) -e s/"^([^-]*)"/sub\1/` ; \
346 echo "<!ENTITY sub-$$entity SYSTEM \"$$file\">" >>$@ ; \
355 entity=`echo "$$file" |sed $(FILENAME)` ; \
356 echo "<!ENTITY $$entity SYSTEM \"$$file\">" >>$@ ; \
/linux-4.1.27/arch/alpha/include/asm/
H A Dtimex.h17 * Only the low 32 bits are available as a continuously counting entity.
/linux-4.1.27/drivers/staging/media/davinci_vpfe/
H A Dvpfe_video.c47 return remote->entity; vpfe_get_input_entity()
65 subdev = media_entity_to_v4l2_subdev(remote->entity); vpfe_update_current_ext_subdev()
94 if (remote == NULL || remote->entity->type != MEDIA_ENT_T_V4L2_SUBDEV) vpfe_video_remote_subdev()
98 return media_entity_to_v4l2_subdev(remote->entity); vpfe_video_remote_subdev()
135 struct media_entity *entity = &video->video_dev.entity; vpfe_prepare_pipeline() local
136 struct media_device *mdev = entity->parent; vpfe_prepare_pipeline()
150 media_entity_graph_walk_start(&graph, entity); vpfe_prepare_pipeline()
151 while ((entity = media_entity_graph_walk_next(&graph))) { vpfe_prepare_pipeline()
152 if (entity == &video->video_dev.entity) vpfe_prepare_pipeline()
154 if (media_entity_type(entity) != MEDIA_ENT_T_DEVNODE) vpfe_prepare_pipeline()
156 far_end = to_vpfe_video(media_entity_to_video_device(entity)); vpfe_prepare_pipeline()
235 pad = &subdev->entity.pads[0]; vpfe_video_validate_pipeline()
250 pad->entity->type != MEDIA_ENT_T_V4L2_SUBDEV) vpfe_video_validate_pipeline()
253 subdev = media_entity_to_v4l2_subdev(pad->entity); vpfe_video_validate_pipeline()
284 struct media_entity *entity; vpfe_pipeline_enable() local
290 entity = vpfe_get_input_entity(pipe->outputs[0]); vpfe_pipeline_enable()
292 entity = &pipe->inputs[0]->video_dev.entity; vpfe_pipeline_enable()
294 mdev = entity->parent; vpfe_pipeline_enable()
296 media_entity_graph_walk_start(&graph, entity); vpfe_pipeline_enable()
297 while ((entity = media_entity_graph_walk_next(&graph))) { vpfe_pipeline_enable()
299 if (media_entity_type(entity) == MEDIA_ENT_T_DEVNODE) vpfe_pipeline_enable()
301 subdev = media_entity_to_v4l2_subdev(entity); vpfe_pipeline_enable()
324 struct media_entity *entity; vpfe_pipeline_disable() local
330 entity = vpfe_get_input_entity(pipe->outputs[0]); vpfe_pipeline_disable()
332 entity = &pipe->inputs[0]->video_dev.entity; vpfe_pipeline_disable()
334 mdev = entity->parent; vpfe_pipeline_disable()
336 media_entity_graph_walk_start(&graph, entity); vpfe_pipeline_disable()
338 while ((entity = media_entity_graph_walk_next(&graph))) { vpfe_pipeline_disable()
340 if (media_entity_type(entity) == MEDIA_ENT_T_DEVNODE) vpfe_pipeline_disable()
342 subdev = media_entity_to_v4l2_subdev(entity); vpfe_pipeline_disable()
1604 ret = media_entity_init(&video->video_dev.entity, vpfe_video_init()
1634 media_entity_cleanup(&video->video_dev.entity); vpfe_video_unregister()
H A Dvpfe_mc_capture.c445 /* if entity has no pads (ex: amplifier), vpfe_register_entities()
447 if (vpfe_dev->sd[i]->entity.num_pads) { vpfe_register_entities()
448 ret = media_entity_create_link(&vpfe_dev->sd[i]->entity, vpfe_register_entities()
449 0, &vpfe_dev->vpfe_isif.subdev.entity, vpfe_register_entities()
455 ret = media_entity_create_link(&vpfe_dev->vpfe_isif.subdev.entity, 1, vpfe_register_entities()
456 &vpfe_dev->vpfe_ipipeif.subdev.entity, vpfe_register_entities()
461 ret = media_entity_create_link(&vpfe_dev->vpfe_ipipeif.subdev.entity, 1, vpfe_register_entities()
462 &vpfe_dev->vpfe_ipipe.subdev.entity, vpfe_register_entities()
467 ret = media_entity_create_link(&vpfe_dev->vpfe_ipipe.subdev.entity, vpfe_register_entities()
468 1, &vpfe_dev->vpfe_resizer.crop_resizer.subdev.entity, vpfe_register_entities()
473 ret = media_entity_create_link(&vpfe_dev->vpfe_ipipeif.subdev.entity, 1, vpfe_register_entities()
474 &vpfe_dev->vpfe_resizer.crop_resizer.subdev.entity, vpfe_register_entities()
H A Ddm365_resizer.c1635 * Media entity operations
1640 * @entity: Pointer to media entity structure
1646 static int resizer_link_setup(struct media_entity *entity, resizer_link_setup() argument
1650 struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity); resizer_link_setup()
1657 switch (local->index | media_entity_type(remote->entity)) { resizer_link_setup()
1706 switch (local->index | media_entity_type(remote->entity)) { resizer_link_setup()
1731 switch (local->index | media_entity_type(remote->entity)) { resizer_link_setup()
1767 * vpfe_resizer_unregister_entities() - Unregister entity
1780 /* cleanup entity */ vpfe_resizer_unregister_entities()
1781 media_entity_cleanup(&vpfe_rsz->crop_resizer.subdev.entity); vpfe_resizer_unregister_entities()
1782 media_entity_cleanup(&vpfe_rsz->resizer_a.subdev.entity); vpfe_resizer_unregister_entities()
1783 media_entity_cleanup(&vpfe_rsz->resizer_b.subdev.entity); vpfe_resizer_unregister_entities()
1787 * vpfe_resizer_register_entities() - Register entity
1833 ret = media_entity_create_link(&resizer->crop_resizer.subdev.entity, 1, vpfe_resizer_register_entities()
1834 &resizer->resizer_a.subdev.entity, vpfe_resizer_register_entities()
1840 ret = media_entity_create_link(&resizer->crop_resizer.subdev.entity, 2, vpfe_resizer_register_entities()
1841 &resizer->resizer_b.subdev.entity, vpfe_resizer_register_entities()
1847 ret = media_entity_create_link(&resizer->resizer_a.subdev.entity, 1, vpfe_resizer_register_entities()
1848 &resizer->resizer_a.video_out.video_dev.entity, 0, flags); vpfe_resizer_register_entities()
1853 ret = media_entity_create_link(&resizer->resizer_b.subdev.entity, 1, vpfe_resizer_register_entities()
1854 &resizer->resizer_b.video_out.video_dev.entity, 0, flags); vpfe_resizer_register_entities()
1867 media_entity_cleanup(&resizer->crop_resizer.subdev.entity); vpfe_resizer_register_entities()
1868 media_entity_cleanup(&resizer->resizer_a.subdev.entity); vpfe_resizer_register_entities()
1869 media_entity_cleanup(&resizer->resizer_b.subdev.entity); vpfe_resizer_register_entities()
1883 struct media_entity *me = &sd->entity; vpfe_resizer_init()
1923 me = &sd->entity; vpfe_resizer_init()
1945 me = &sd->entity; vpfe_resizer_init()
H A Ddm365_ipipeif.c882 ipipeif_link_setup(struct media_entity *entity, const struct media_pad *local, ipipeif_link_setup() argument
885 struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity); ipipeif_link_setup()
889 switch (local->index | media_entity_type(remote->entity)) { ipipeif_link_setup()
916 if (remote->entity == &vpfe->vpfe_ipipe.subdev.entity) ipipeif_link_setup()
919 else if (remote->entity == &vpfe->vpfe_resizer. ipipeif_link_setup()
920 crop_resizer.subdev.entity) ipipeif_link_setup()
939 * vpfe_ipipeif_unregister_entities() - Unregister entity
949 /* cleanup entity */ vpfe_ipipeif_unregister_entities()
950 media_entity_cleanup(&ipipeif->subdev.entity); vpfe_ipipeif_unregister_entities()
974 ret = media_entity_create_link(&ipipeif->video_in.video_dev.entity, 0, vpfe_ipipeif_register_entities()
975 &ipipeif->subdev.entity, 0, flags); vpfe_ipipeif_register_entities()
994 struct media_entity *me = &sd->entity; vpfe_ipipeif_init()
H A Ddm365_ipipe.c1693 * Media entity operations
1698 * @entity: ipipe media entity
1706 ipipe_link_setup(struct media_entity *entity, const struct media_pad *local, ipipe_link_setup() argument
1709 struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity); ipipe_link_setup()
1714 switch (local->index | media_entity_type(remote->entity)) { ipipe_link_setup()
1748 * vpfe_ipipe_unregister_entities() - ipipe unregister entity
1755 /* cleanup entity */ vpfe_ipipe_unregister_entities()
1756 media_entity_cleanup(&vpfe_ipipe->subdev.entity); vpfe_ipipe_unregister_entities()
1760 * vpfe_ipipe_register_entities() - ipipe register entity
1793 struct media_entity *me = &sd->entity; vpfe_ipipe_init()
H A Ddm365_isif.c1692 * Media entity operations
1697 * @entity: isif media entity
1705 isif_link_setup(struct media_entity *entity, const struct media_pad *local, isif_link_setup() argument
1708 struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity); isif_link_setup()
1711 switch (local->index | media_entity_type(remote->entity)) { isif_link_setup()
1749 * vpfe_isif_unregister_entities() - isif unregister entity
1757 /* cleanup entity */ vpfe_isif_unregister_entities()
1758 media_entity_cleanup(&isif->subdev.entity); vpfe_isif_unregister_entities()
1795 * vpfe_isif_register_entities() - isif register entity
1820 ret = media_entity_create_link(&isif->subdev.entity, 1, vpfe_isif_register_entities()
1821 &isif->video_out.video_dev.entity, vpfe_isif_register_entities()
1985 * vpfe_isif_init() - Initialize V4L2 subdev and media entity
1994 struct media_entity *me = &sd->entity; vpfe_isif_init()
H A Dvpfe_video.h84 /* media pad of video entity */
/linux-4.1.27/include/uapi/linux/
H A Duvcvideo.h44 __u8 entity[16]; member in struct:uvc_xu_control_mapping
H A Dmedia.h144 __u32 entity; /* entity ID */ member in struct:media_pad_desc
162 __u32 entity; member in struct:media_links_enum
/linux-4.1.27/arch/arm64/include/asm/
H A Dsync_bitops.h11 * under Xen you might be communicating with a completely external entity
/linux-4.1.27/arch/arm/include/asm/
H A Dsync_bitops.h10 * under Xen you might be communicating with a completely external entity
/linux-4.1.27/drivers/video/fbdev/
H A Dsh_mobile_lcdcfb.h30 int (*display_on)(struct sh_mobile_lcdc_entity *entity);
31 void (*display_off)(struct sh_mobile_lcdc_entity *entity);
H A Dsh_mipi_dsi.c55 struct sh_mobile_lcdc_entity entity; member in struct:sh_mipi
63 #define to_sh_mipi(e) container_of(e, struct sh_mipi, entity)
379 static int mipi_display_on(struct sh_mobile_lcdc_entity *entity) mipi_display_on() argument
381 struct sh_mipi *mipi = to_sh_mipi(entity); mipi_display_on()
391 ret = sh_mipi_setup(mipi, &entity->def_mode); mipi_display_on()
407 static void mipi_display_off(struct sh_mobile_lcdc_entity *entity) mipi_display_off() argument
409 struct sh_mipi *mipi = to_sh_mipi(entity); mipi_display_off()
455 mipi->entity.owner = THIS_MODULE; sh_mipi_probe()
456 mipi->entity.ops = &mipi_ops; sh_mipi_probe()
512 platform_set_drvdata(pdev, &mipi->entity); sh_mipi_probe()
H A Dsh_mobile_hdmi.c274 struct sh_mobile_lcdc_entity entity; member in struct:sh_hdmi
296 #define entity_to_sh_hdmi(e) container_of(e, struct sh_hdmi, entity)
847 struct sh_mobile_lcdc_chan *ch = hdmi->entity.lcdc; sh_hdmi_read_edid()
988 if (!found && hdmi->entity.def_mode.xres != 0) { sh_hdmi_read_edid()
989 found = &hdmi->entity.def_mode; sh_hdmi_read_edid()
1102 static int sh_hdmi_display_on(struct sh_mobile_lcdc_entity *entity) sh_hdmi_display_on() argument
1104 struct sh_hdmi *hdmi = entity_to_sh_hdmi(entity); sh_hdmi_display_on()
1126 static void sh_hdmi_display_off(struct sh_mobile_lcdc_entity *entity) sh_hdmi_display_off() argument
1128 struct sh_hdmi *hdmi = entity_to_sh_hdmi(entity); sh_hdmi_display_off()
1179 struct sh_mobile_lcdc_chan *ch = hdmi->entity.lcdc; sh_hdmi_edid_work_fn()
1301 hdmi->entity.owner = THIS_MODULE; sh_hdmi_probe()
1302 hdmi->entity.ops = &sh_hdmi_ops; sh_hdmi_probe()
1352 platform_set_drvdata(pdev, &hdmi->entity); sh_hdmi_probe()
/linux-4.1.27/include/net/9p/
H A D9p.h112 * @P9_TCLUNK: forget about a handle to an entity within the file system
114 * @P9_TREMOVE: request to remove an entity from the hierarchy
115 * @P9_RREMOVE: response when server has removed the entity
116 * @P9_TSTAT: request file entity attributes
117 * @P9_RSTAT: response with file entity attributes
118 * @P9_TWSTAT: request to update file entity attributes
119 * @P9_RWSTAT: response when file entity attributes are updated
316 * used to differentiate semantics for a file system entity via
349 * struct p9_qid - file system entity information
356 * on the entity (ie. read means something different on a directory than
357 * on a file). The path provides a server unique index for an entity
H A Dclient.h171 * struct p9_fid - file system entity handle
/linux-4.1.27/include/net/
H A Dllc_if.h45 /* Reset reasons, remote entity or local LLC */
/linux-4.1.27/include/linux/
H A Dreset-controller.h29 * struct reset_controller_dev - reset controller entity that might
H A Dconcap.h46 * protocol entity. No receive method is offered because the encapsulation
89 /* to be called for each data entity received from lower layer*/
H A Dcoresight.h115 * @dev: The device entity associated to this component.
152 * @dev: The device entity associated to this component.
H A Dkernfs.h103 * accessible. Dereferencing elem or any other outer entity requires
H A Dsched.h1200 /* rq on which this entity is (to be) queued: */
1202 /* rq "owned" by this entity/group: */
1207 /* Per-entity load-tracking */
1221 /* rq on which this entity is (to be) queued: */
1223 /* rq "owned" by this entity/group: */
/linux-4.1.27/lib/
H A Dratelimit.c40 * the entity that is holding the lock already: ___ratelimit()
/linux-4.1.27/drivers/gpu/drm/rcar-du/
H A Drcar_du_kms.c514 struct device_node *entity; rcar_du_encoders_init_one() local
518 * Locate the connected entity and infer its type from the number of rcar_du_encoders_init_one()
521 entity = of_graph_get_remote_port_parent(ep->local_node); rcar_du_encoders_init_one()
522 if (!entity) { rcar_du_encoders_init_one()
530 for_each_endpoint_of_node(entity, ep_node) { for_each_endpoint_of_node()
538 encoder = entity; for_each_endpoint_of_node()
581 * If no encoder has been found the entity must be the
584 connector = entity;
/linux-4.1.27/arch/parisc/include/asm/
H A Dpdc_chassis.h168 * Caller subactivity, Reporting entity type, Reporting entity ID,
229 /* Reporting entity type */
235 /* Reporting entity ID */
H A Dpdcpat.h41 /* PDC_PAT_CELL_MODULE entity type values */
238 * Bit 0 to 7 - entity type
/linux-4.1.27/arch/arm/mach-omap2/
H A Dprcm_mpu54xx.h49 * point of view the PRCM_MPU is a single entity. It shares the same
H A Dprcm_mpu44xx.h50 * point of view the PRCM_MPU is a single entity. It shares the same
/linux-4.1.27/drivers/media/i2c/
H A Dlm3646.c285 rval = media_entity_init(&flash->subdev_led.entity, 0, NULL, 0); lm3646_subdev_init()
288 flash->subdev_led.entity.type = MEDIA_ENT_T_V4L2_SUBDEV_FLASH; lm3646_subdev_init()
388 media_entity_cleanup(&flash->subdev_led.entity); lm3646_remove()
H A Ds5k6a3.c336 ret = media_entity_init(&sd->entity, 1, &sensor->pad, 0); s5k6a3_probe()
347 media_entity_cleanup(&sd->entity); s5k6a3_probe()
359 media_entity_cleanup(&sd->entity); s5k6a3_remove()
H A Ds5k5baf.c28 #include <media/media-entity.h>
411 return sd->entity.type == MEDIA_ENT_T_V4L2_SUBDEV_SENSOR; s5k5baf_is_cis_subdev()
1759 ret = media_entity_create_link(&state->cis_sd.entity, PAD_CIS, s5k5baf_registered()
1760 &state->sd.entity, PAD_CIS, s5k5baf_registered()
1907 sd->entity.type = MEDIA_ENT_T_V4L2_SUBDEV_SENSOR; s5k5baf_configure_subdevs()
1908 ret = media_entity_init(&sd->entity, NUM_CIS_PADS, &state->cis_pad, 0); s5k5baf_configure_subdevs()
1922 sd->entity.type = MEDIA_ENT_T_V4L2_SUBDEV; s5k5baf_configure_subdevs()
1923 ret = media_entity_init(&sd->entity, NUM_ISP_PADS, state->pads, 0); s5k5baf_configure_subdevs()
1928 media_entity_cleanup(&state->cis_sd.entity); s5k5baf_configure_subdevs()
1930 dev_err(&c->dev, "cannot init media entity %s\n", sd->name); s5k5baf_configure_subdevs()
2012 media_entity_cleanup(&state->sd.entity); s5k5baf_probe()
2013 media_entity_cleanup(&state->cis_sd.entity); s5k5baf_probe()
2024 media_entity_cleanup(&sd->entity); s5k5baf_remove()
2028 media_entity_cleanup(&sd->entity); s5k5baf_remove()
H A Dlm3560.c368 rval = media_entity_init(&flash->subdev_led[led_no].entity, 0, NULL, 0); lm3560_subdev_init()
371 flash->subdev_led[led_no].entity.type = MEDIA_ENT_T_V4L2_SUBDEV_FLASH; lm3560_subdev_init()
460 media_entity_cleanup(&flash->subdev_led[i].entity); lm3560_remove()
H A Dadp1653.c436 ret = media_entity_init(&flash->subdev.entity, 0, NULL, 0); adp1653_probe()
440 flash->subdev.entity.type = MEDIA_ENT_T_V4L2_SUBDEV_FLASH; adp1653_probe()
456 media_entity_cleanup(&flash->subdev.entity); adp1653_remove()
H A Dmt9m032.c33 #include <media/media-entity.h>
802 ret = media_entity_init(&sensor->subdev.entity, 1, &sensor->pad, 0); mt9m032_probe()
861 media_entity_cleanup(&sensor->subdev.entity); mt9m032_probe()
876 media_entity_cleanup(&subdev->entity); mt9m032_remove()
H A Dov2659.c39 #include <media/media-entity.h>
1428 sd->entity.type = MEDIA_ENT_T_V4L2_SUBDEV_SENSOR; ov2659_probe()
1429 ret = media_entity_init(&sd->entity, 1, &ov2659->pad, 0); ov2659_probe()
1460 media_entity_cleanup(&sd->entity); ov2659_probe()
1474 media_entity_cleanup(&sd->entity); ov2659_remove()
H A Ds5k4ecgx.c29 #include <media/media-entity.h>
964 sd->entity.type = MEDIA_ENT_T_V4L2_SUBDEV_SENSOR; s5k4ecgx_probe()
965 ret = media_entity_init(&sd->entity, 1, &priv->pad, 0); s5k4ecgx_probe()
995 media_entity_cleanup(&priv->sd.entity); s5k4ecgx_probe()
1009 media_entity_cleanup(&sd->entity); s5k4ecgx_remove()
H A Dtvp514x.c48 #include <media/media-entity.h>
1158 decoder->sd.entity.flags |= MEDIA_ENT_T_V4L2_SUBDEV_DECODER; tvp514x_probe()
1160 ret = media_entity_init(&decoder->sd.entity, 1, &decoder->pad, 0); tvp514x_probe()
1193 media_entity_cleanup(&decoder->sd.entity); tvp514x_probe()
1213 media_entity_cleanup(&decoder->sd.entity); tvp514x_remove()
H A Das3645a.c830 ret = media_entity_init(&flash->subdev.entity, 0, NULL, 0); as3645a_probe()
834 flash->subdev.entity.type = MEDIA_ENT_T_V4L2_SUBDEV_FLASH; as3645a_probe()
854 media_entity_cleanup(&flash->subdev.entity); as3645a_remove()
H A Dmt9t001.c936 ret = media_entity_init(&mt9t001->subdev.entity, 1, &mt9t001->pad, 0); mt9t001_probe()
941 media_entity_cleanup(&mt9t001->subdev.entity); mt9t001_probe()
954 media_entity_cleanup(&subdev->entity); mt9t001_remove()
H A Dnoon010pc30.c782 sd->entity.type = MEDIA_ENT_T_V4L2_SUBDEV_SENSOR; noon010_probe()
783 ret = media_entity_init(&sd->entity, 1, &info->pad, 0); noon010_probe()
804 media_entity_cleanup(&sd->entity); noon010_remove()
H A Dtvp7002.c1070 device->sd.entity.flags |= MEDIA_ENT_T_V4L2_SUBDEV_DECODER; tvp7002_probe()
1072 error = media_entity_init(&device->sd.entity, 1, &device->pad, 0); tvp7002_probe()
1096 media_entity_cleanup(&device->sd.entity); tvp7002_probe()
1117 media_entity_cleanup(&device->sd.entity); tvp7002_remove()
H A Dadv7180.c1215 sd->entity.flags |= MEDIA_ENT_T_V4L2_SUBDEV_DECODER; adv7180_probe()
1216 ret = media_entity_init(&sd->entity, 1, &state->pad, 0); adv7180_probe()
1242 media_entity_cleanup(&sd->entity); adv7180_probe()
1265 media_entity_cleanup(&sd->entity); adv7180_remove()
H A Dov9650.c25 #include <media/media-entity.h>
1503 sd->entity.type = MEDIA_ENT_T_V4L2_SUBDEV_SENSOR; ov965x_probe()
1504 ret = media_entity_init(&sd->entity, 1, &ov965x->pad, 0); ov965x_probe()
1527 media_entity_cleanup(&sd->entity); ov965x_probe()
1537 media_entity_cleanup(&sd->entity); ov965x_remove()
H A Ds5k6aa.c26 #include <media/media-entity.h>
1580 sd->entity.type = MEDIA_ENT_T_V4L2_SUBDEV_SENSOR; s5k6aa_probe()
1581 ret = media_entity_init(&sd->entity, 1, &s5k6aa->pad, 0); s5k6aa_probe()
1613 media_entity_cleanup(&s5k6aa->sd.entity); s5k6aa_probe()
1623 media_entity_cleanup(&sd->entity); s5k6aa_remove()
H A Dmt9p031.c1115 ret = media_entity_init(&mt9p031->subdev.entity, 1, &mt9p031->pad, 0); mt9p031_probe()
1148 media_entity_cleanup(&mt9p031->subdev.entity); mt9p031_probe()
1162 media_entity_cleanup(&subdev->entity); mt9p031_remove()
H A Dmt9v032.c1049 ret = media_entity_init(&mt9v032->subdev.entity, 1, &mt9v032->pad, 0); mt9v032_probe()
1061 media_entity_cleanup(&mt9v032->subdev.entity); mt9v032_probe()
1073 media_entity_cleanup(&subdev->entity); mt9v032_remove()
H A Dad9389b.c1161 err = media_entity_init(&sd->entity, 1, &state->pad, 0); ad9389b_probe()
1201 media_entity_cleanup(&sd->entity); ad9389b_probe()
1226 media_entity_cleanup(&sd->entity); ad9389b_remove()
H A Dadv7511.c1381 err = media_entity_init(&sd->entity, 1, &state->pad, 0); adv7511_probe()
1426 media_entity_cleanup(&sd->entity); adv7511_probe()
1449 media_entity_cleanup(&sd->entity); adv7511_remove()
/linux-4.1.27/drivers/tty/
H A Dn_tracerouter.c63 * n_tracerouter_open() - Called when a tty is opened by a SW entity.
69 * Caveats: This should only be opened one time per SW entity.
97 * Called when a software entity wants to close a connection.
H A Dn_tracesink.c61 * n_tracesink_open() - Called when a tty is opened by a SW entity.
72 * SW entity calls it.
98 * Called when a software entity wants to close a connection.
/linux-4.1.27/kernel/sched/
H A Ddeadline.c312 * - the absolute deadline of the entity has to be placed at
314 * - the runtime of the entity has to be set to the maximum value.
317 * entity wants to (try to!) synchronize its behaviour with the scheduler's
341 * possibility of a entity lasting more than what it declared, and thus
345 * not want a entity which is misbehaving to affect the scheduling of all
348 * is used, in order to confine each entity within its own bandwidth.
351 * of a entity is replenished, its deadline is also postponed. That ensures
352 * the overrunning entity can't interfere with other entity in the system and
354 * could happen are, typically, a entity voluntarily trying to overcome its
376 * available runtime for the entity. This ensures correct replenish_dl_entity()
392 * entity. replenish_dl_entity()
407 * Here we check if --at time t-- an entity (which is probably being
461 * When a -deadline entity is queued back on the runqueue, its runtime and
464 * The policy here is that we update the deadline of the entity only if:
467 * the entity exceed its bandwidth.
492 * If the entity depleted all its runtime, and if we want it to sleep
H A Dsched.h112 * Tells if entity @a should preempt entity @b.
272 * are queued on this cfs_rq, so a weight of a entity should not be
351 * 'curr' points to currently running entity on this cfs_rq.
363 * Under CFS, load is tracked on a per-entity basis and aggregated up.
399 * leaf cfs_rqs are those that hold tasks (lowest schedulable entity in
911 /* Change a task's cfs_rq and parent entity if it moves across CPUs/groups */ set_task_rq()
H A Dfair.c254 /* An entity is a task if it doesn't "own" a runqueue */
274 /* runqueue on which this entity is (to be) queued */ cfs_rq_of()
489 * Enqueue an entity into the rb-tree:
2503 * Let u_i denote the fraction of p_i that the entity was runnable.
2603 /* Synchronize an entity's decay with its parenting cfs_rq.*/ __synchronize_entity_decay()
2788 * For a group entity we need to use their owned cfs_rq_clock_task() in update_entity_load_avg()
2849 * We track migrations using entity decay_count <= 0, on a wake-up enqueue_entity_load_avg()
2892 * Remove se's load from this cfs_rq child load-average, if the entity is
3177 * Normalize the entity after updating the min_vruntime because the dequeue_entity()
3279 * If curr is set we have to see if its left of the leftmost entity pick_next_entity()
3285 se = left; /* ideally we run the leftmost entity */ pick_next_entity()
3648 /* throttled entity or throttle-on-deactivate */ for_each_sched_entity()
3988 * it's possible for a throttled entity to be forced into a running check_cfs_rq_runtime()
4300 /* avoid re-evaluating load for this entity */ for_each_sched_entity()
5068 * Bias pick_next to pick the sched entity that is check_preempt_wakeup()
5126 * entity, update_curr() will update its vruntime, otherwise pick_next_task_fair()
5137 * throttle and dequeue its entity in the parent(s). pick_next_task_fair()
/linux-4.1.27/drivers/media/i2c/s5c73m3/
H A Ds5c73m3-core.c32 #include <media/media-entity.h>
1485 ret = media_entity_create_link(&state->sensor_sd.entity, s5c73m3_oif_registered()
1486 S5C73M3_ISP_PAD, &state->oif_sd.entity, OIF_ISP_PAD, s5c73m3_oif_registered()
1489 ret = media_entity_create_link(&state->sensor_sd.entity, s5c73m3_oif_registered()
1490 S5C73M3_JPEG_PAD, &state->oif_sd.entity, OIF_JPEG_PAD, s5c73m3_oif_registered()
1691 sd->entity.type = MEDIA_ENT_T_V4L2_SUBDEV; s5c73m3_probe()
1693 ret = media_entity_init(&sd->entity, S5C73M3_NUM_PADS, s5c73m3_probe()
1707 oif_sd->entity.type = MEDIA_ENT_T_V4L2_SUBDEV; s5c73m3_probe()
1709 ret = media_entity_init(&oif_sd->entity, OIF_NUM_PADS, s5c73m3_probe()
1772 media_entity_cleanup(&sd->entity); s5c73m3_probe()
1785 media_entity_cleanup(&oif_sd->entity); s5c73m3_remove()
1788 media_entity_cleanup(&sensor_sd->entity); s5c73m3_remove()
H A Ds5c73m3-ctrls.c30 #include <media/media-entity.h>
/linux-4.1.27/drivers/hwtracing/coresight/
H A Dcoresight-replicator.c29 * @dev: the device entity associated with this component
H A Dcoresight-tpiu.c52 * @dev: the device entity associated to this component.
H A Dcoresight-etm.h142 * @dev: the device entity associated to this component.
H A Dcoresight-funnel.c37 * @dev: the device entity associated to this component.
H A Dcoresight-etb10.c68 * @dev: the device entity associated to this component.
H A Dcoresight-tmc.c104 * @dev: the device entity associated to this component.
/linux-4.1.27/drivers/media/platform/s3c-camif/
H A Dcamif-core.c266 ret = media_entity_create_link(&camif->sensor.sd->entity, 0, camif_create_media_links()
267 &camif->subdev.entity, CAMIF_SD_PAD_SINK, camif_create_media_links()
274 ret = media_entity_create_link(&camif->subdev.entity, i, camif_create_media_links()
275 &camif->vp[i - 1].vdev.entity, 0, camif_create_media_links()
H A Dcamif-capture.c837 if (!pad || media_entity_type(pad->entity) != MEDIA_ENT_T_V4L2_SUBDEV) camif_pipeline_validate()
859 struct media_entity *sensor = &camif->sensor.sd->entity; s3c_camif_streamon()
903 media_entity_pipeline_stop(&camif->sensor.sd->entity); s3c_camif_streamoff()
1159 ret = media_entity_init(&vfd->entity, 1, &vp->pad, 0); s3c_camif_register_video_node()
1192 media_entity_cleanup(&vfd->entity); s3c_camif_register_video_node()
1204 media_entity_cleanup(&vfd->entity); s3c_camif_unregister_video_node()
1574 ret = media_entity_init(&sd->entity, CAMIF_SD_PADS_NUM, s3c_camif_create_subdev()
1598 media_entity_cleanup(&sd->entity); s3c_camif_create_subdev()
1621 media_entity_cleanup(&sd->entity); s3c_camif_unregister_subdev()
H A Dcamif-core.h23 #include <media/media-entity.h>
253 * @m_pipeline: video entity pipeline description
/linux-4.1.27/arch/mips/include/asm/
H A Dtimex.h33 * Only the low 32 bits are available as a continuously counting entity.
/linux-4.1.27/include/net/irda/
H A Dirttp.h117 int remote_credit; /* Credit held by peer TTP entity */
118 int send_credit; /* Credit held by local TTP entity */
/linux-4.1.27/drivers/usb/gadget/function/
H A Df_fs.c1704 typedef int (*ffs_entity_callback)(enum ffs_entity_type entity,
1709 typedef int (*ffs_os_desc_callback)(enum ffs_os_desc_type entity,
1714 ffs_entity_callback entity, ffs_do_single_desc()
1740 pr_vdebug("entity " #type "(%02x)\n", (val)); \ ffs_do_single_desc()
1742 pr_vdebug("invalid entity's value\n"); \ ffs_do_single_desc()
1745 ret = entity(FFS_ ##type, &val, _ds, priv); \ ffs_do_single_desc()
1747 pr_debug("entity " #type "(%02x); ret = %d\n", \ ffs_do_single_desc()
1843 ffs_entity_callback entity, void *priv) ffs_do_descs()
1856 /* Record "descriptor" entity */ ffs_do_descs()
1857 ret = entity(FFS_DESCRIPTOR, (u8 *)num, (void *)data, priv); ffs_do_descs()
1859 pr_debug("entity DESCRIPTOR(%02lx); ret = %d\n", ffs_do_descs()
1867 ret = ffs_do_single_desc(data, len, entity, priv); ffs_do_descs()
1962 ffs_os_desc_callback entity, ffs_do_single_os_desc()
1973 ret = entity(type, h, data, len, priv); ffs_do_single_os_desc()
1987 ffs_os_desc_callback entity, void *priv) ffs_do_os_descs()
2004 * Record "descriptor" entity. ffs_do_os_descs()
2015 pr_debug("entity OS_DESCRIPTOR(%02lx); ret = %d\n", ffs_do_os_descs()
2034 feature_count, entity, priv, desc); ffs_do_os_descs()
1713 ffs_do_single_desc(char *data, unsigned len, ffs_entity_callback entity, void *priv) ffs_do_single_desc() argument
1842 ffs_do_descs(unsigned count, char *data, unsigned len, ffs_entity_callback entity, void *priv) ffs_do_descs() argument
1959 ffs_do_single_os_desc(char *data, unsigned len, enum ffs_os_desc_type type, u16 feature_count, ffs_os_desc_callback entity, void *priv, struct usb_os_desc_header *h) ffs_do_single_os_desc() argument
1985 ffs_do_os_descs(unsigned count, char *data, unsigned len, ffs_os_desc_callback entity, void *priv) ffs_do_os_descs() argument
H A Df_uac1.c396 DBG(cdev, "bRequest 0x%x, w_value 0x%04x, len %d, entity %d\n", audio_set_intf_req()
433 DBG(cdev, "bRequest 0x%x, w_value 0x%04x, len %d, entity %d\n", audio_get_intf_req()
/linux-4.1.27/drivers/media/usb/cx231xx/
H A Dcx231xx-cards.c1208 struct media_entity *entity; cx231xx_create_media_graph() local
1214 media_device_for_each_entity(entity, mdev) { media_device_for_each_entity()
1215 switch (entity->type) { media_device_for_each_entity()
1217 tuner = entity; media_device_for_each_entity()
1220 decoder = entity; media_device_for_each_entity()
1233 media_entity_create_link(decoder, 1, &dev->vdev.entity, 0,
1235 media_entity_create_link(decoder, 2, &dev->vbi_dev.entity, 0,
H A Dcx231xx-video.c107 struct media_entity *entity, *decoder = NULL, *source; cx231xx_enable_analog_tuner() local
121 media_device_for_each_entity(entity, mdev) { media_device_for_each_entity()
122 if (entity->type == MEDIA_ENT_T_V4L2_SUBDEV_DECODER) { media_device_for_each_entity()
123 decoder = entity; media_device_for_each_entity()
132 if (link->sink->entity == decoder) {
143 source = found_link->source->entity;
149 sink = link->sink->entity;
151 if (sink == entity)
2176 ret = media_entity_init(&dev->vdev.entity, 1, &dev->video_pad, 0); cx231xx_register_analog_devices()
2178 dev_err(dev->dev, "failed to initialize video media entity!\n"); cx231xx_register_analog_devices()
2203 ret = media_entity_init(&dev->vbi_dev.entity, 1, &dev->vbi_pad, 0); cx231xx_register_analog_devices()
2205 dev_err(dev->dev, "failed to initialize vbi media entity!\n"); cx231xx_register_analog_devices()
/linux-4.1.27/include/acpi/
H A Dacexcep.h231 EXCEP_TXT("AE_NOT_FOUND", "A requested entity is not found"),
232 EXCEP_TXT("AE_NOT_EXIST", "A required entity does not exist"),
233 EXCEP_TXT("AE_ALREADY_EXISTS", "An entity already exists"),
/linux-4.1.27/fs/sysfs/
H A Ddir.c83 * symlinking entity usually doesn't own @kobj and thus has no sysfs_remove_dir()
/linux-4.1.27/drivers/md/persistent-data/
H A Ddm-btree.h131 * subtrees represent a separate entity, like a snapshot map, so this is
/linux-4.1.27/include/linux/ceph/
H A Dauth.h87 const char *name; /* entity name */
/linux-4.1.27/drivers/base/
H A Dtransport_class.c132 * @dev: the generic device representing the entity being added
169 * @dev: the generic device representing the entity being added
/linux-4.1.27/drivers/isdn/hisax/
H A Dtei.c338 /* wrong management entity identifier, ignore */ tei_l1l2()
340 "tei handler wrong entity id %x", tei_l1l2()
/linux-4.1.27/drivers/media/i2c/m5mols/
H A Dm5mols_core.c978 ret = media_entity_init(&sd->entity, 1, &info->pad, 0); m5mols_probe()
981 sd->entity.type = MEDIA_ENT_T_V4L2_SUBDEV_SENSOR; m5mols_probe()
1008 media_entity_cleanup(&sd->entity); m5mols_probe()
1018 media_entity_cleanup(&sd->entity); m5mols_remove()
/linux-4.1.27/drivers/net/wireless/ti/wlcore/
H A Dps.c132 * the completion variable in one entity. wl1271_ps_elp_wakeup()
/linux-4.1.27/arch/sparc/include/asm/
H A Dspitfire.h28 /* These registers only exist as one entity, and are accessed
/linux-4.1.27/drivers/char/agp/
H A Dbackend.c88 * is read for use by another entity.
/linux-4.1.27/arch/arm/common/
H A Dscoop.c26 single entity for the pxa2xx_pcmcia device so this structure
/linux-4.1.27/fs/ceph/
H A Ddebugfs.c169 /* The 'num' portion of an 'entity name' */ mds_sessions_show()
/linux-4.1.27/net/core/
H A Dutils.c2 * Generic address resultion entity
/linux-4.1.27/drivers/media/i2c/smiapp/
H A Dsmiapp-core.c1662 for (i = 0; i < subdev->entity.num_pads; i++) smiapp_get_crop_compose()
1668 for (i = 0; i < subdev->entity.num_pads; i++) { smiapp_get_crop_compose()
2490 rval = media_entity_init(&this->sd.entity, smiapp_register_subdevs()
2498 rval = media_entity_create_link(&this->sd.entity, smiapp_register_subdevs()
2500 &last->sd.entity, smiapp_register_subdevs()
2749 this->sd.entity.ops = &smiapp_entity_ops; smiapp_init()
2766 sensor->pixel_array->sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV_SENSOR; smiapp_init()
3082 rval = media_entity_init(&sensor->src->sd.entity, 2, smiapp_probe()
3100 media_entity_cleanup(&sensor->src->sd.entity); smiapp_probe()
3125 media_entity_cleanup(&sensor->ssds[i].sd.entity); smiapp_remove()
/linux-4.1.27/drivers/uwb/
H A Dneh.c95 * Represents an entity waiting for an event coming from the UWB Radio
541 * The entity that reads from the device notification/event channel has
/linux-4.1.27/drivers/hwmon/
H A Dfschmd.c1013 /* entity 1 - 3: voltage multiplier and offset */ fschmd_dmi_decode()
1019 /* Check for twice the same entity */ fschmd_dmi_decode()
1029 /* entity 7: reference voltage */ fschmd_dmi_decode()
1031 /* Check for twice the same entity */ fschmd_dmi_decode()
/linux-4.1.27/drivers/net/ethernet/intel/fm10k/
H A Dfm10k_mbx.h87 * entity and the remote. It will fall back to connect in the event of
/linux-4.1.27/drivers/acpi/acpica/
H A Dexresolv.c88 * The entity pointed to by the stack_ptr can be either acpi_ex_resolve_to_value()
/linux-4.1.27/drivers/hv/
H A Dhv.c400 * If it is already initialized by another entity (ie x2v shim), we need to
H A Dhyperv_vmbus.h427 * The guest ID is a 64 bit entity and the structure of this ID is
/linux-4.1.27/include/uapi/scsi/fc/
H A Dfc_fs.h325 FC_RJT_FAB_CLASS = 0x15, /* class unsupported by fabric entity */
/linux-4.1.27/sound/usb/
H A Dclock.c204 /* the entity ID we are looking for is a selector. __uac_clock_find_source()
/linux-4.1.27/drivers/misc/vmw_vmci/
H A Dvmci_datagram.c31 * struct datagram_entry describes the datagram entity. It is used for datagram
/linux-4.1.27/drivers/media/platform/exynos-gsc/
H A Dgsc-core.h319 * struct gsc_dev - abstraction for G-Scaler entity
/linux-4.1.27/drivers/scsi/lpfc/
H A Dlpfc_disc.h87 #define NLP_FABRIC 0x4 /* entry rep a Fabric entity */
/linux-4.1.27/drivers/scsi/
H A D3w-xxxx.h104 {0x10, 0x0b, 0x14, 0x00}, // ID not found Recorded entity not found
/linux-4.1.27/include/scsi/
H A Dlibfcoe.h198 * A Fibre-Channel Forwarder (FCF) is the entity on the Ethernet that
H A Dscsi_transport_fc.h308 * port is considered a separate entity, independent of "role" (such
381 * subsystem, we leave the Target as a separate entity. Doing so
/linux-4.1.27/drivers/media/platform/s5p-tv/
H A Dmixer_video.c532 /* timings change cannot be done while there is an entity mxr_s_dv_timings()
591 /* standard change cannot be done while there is an entity mxr_s_std()
/linux-4.1.27/drivers/net/wireless/iwlwifi/mvm/
H A Ddebugfs-vif.c677 IWL_ERR(mvm, "Can't create debugfs entity\n"); iwl_mvm_vif_dbgfs_register()
/linux-4.1.27/fs/ntfs/
H A Dlogfile.h48 * circular entity.
/linux-4.1.27/fs/nfsd/
H A Dnfs4acl.c432 * entity: */

Completed in 7718 milliseconds

12