Lines Matching refs:entity

17 #include <media/media-entity.h>
25 bool vsp1_entity_is_streaming(struct vsp1_entity *entity)
29 mutex_lock(&entity->lock);
30 streaming = entity->streaming;
31 mutex_unlock(&entity->lock);
36 int vsp1_entity_set_streaming(struct vsp1_entity *entity, bool streaming)
40 mutex_lock(&entity->lock);
41 entity->streaming = streaming;
42 mutex_unlock(&entity->lock);
47 if (!entity->subdev.ctrl_handler)
50 ret = v4l2_ctrl_handler_setup(entity->subdev.ctrl_handler);
52 mutex_lock(&entity->lock);
53 entity->streaming = false;
54 mutex_unlock(&entity->lock);
65 vsp1_entity_get_pad_format(struct vsp1_entity *entity,
73 return &entity->formats[pad];
94 for (pad = 0; pad < subdev->entity.num_pads - 1; ++pad) {
121 static int vsp1_entity_link_setup(struct media_entity *entity,
130 source = container_of(local->entity, struct vsp1_entity, subdev.entity);
138 source->sink = remote->entity;
180 int vsp1_entity_init(struct vsp1_device *vsp1, struct vsp1_entity *entity,
186 if (vsp1_routes[i].type == entity->type &&
187 vsp1_routes[i].index == entity->index) {
188 entity->route = &vsp1_routes[i];
196 mutex_init(&entity->lock);
198 entity->vsp1 = vsp1;
199 entity->source_pad = num_pads - 1;
202 entity->formats = devm_kzalloc(vsp1->dev,
203 num_pads * sizeof(*entity->formats),
205 if (entity->formats == NULL)
208 entity->pads = devm_kzalloc(vsp1->dev, num_pads * sizeof(*entity->pads),
210 if (entity->pads == NULL)
215 entity->pads[i].flags = MEDIA_PAD_FL_SINK;
217 entity->pads[num_pads - 1].flags = MEDIA_PAD_FL_SOURCE;
219 /* Initialize the media entity. */
220 return media_entity_init(&entity->subdev.entity, num_pads,
221 entity->pads, 0);
224 void vsp1_entity_destroy(struct vsp1_entity *entity)
226 if (entity->video)
227 vsp1_video_cleanup(entity->video);
228 if (entity->subdev.ctrl_handler)
229 v4l2_ctrl_handler_free(entity->subdev.ctrl_handler);
230 media_entity_cleanup(&entity->subdev.entity);
232 mutex_destroy(&entity->lock);