Commit 665b693c authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab

[media] v4l: vsp1: Move entity route setup function to vsp1_entity.c

The function will be used by the DU code, move it out of vsp1_video.c.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent dc3bdddb
...@@ -58,6 +58,18 @@ int vsp1_entity_set_streaming(struct vsp1_entity *entity, bool streaming) ...@@ -58,6 +58,18 @@ int vsp1_entity_set_streaming(struct vsp1_entity *entity, bool streaming)
return ret; return ret;
} }
void vsp1_entity_route_setup(struct vsp1_entity *source)
{
struct vsp1_entity *sink;
if (source->route->reg == 0)
return;
sink = container_of(source->sink, struct vsp1_entity, subdev.entity);
vsp1_write(source->vsp1, source->route->reg,
sink->route->inputs[source->sink_pad]);
}
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* V4L2 Subdevice Operations * V4L2 Subdevice Operations
*/ */
......
...@@ -96,4 +96,6 @@ void vsp1_entity_init_formats(struct v4l2_subdev *subdev, ...@@ -96,4 +96,6 @@ void vsp1_entity_init_formats(struct v4l2_subdev *subdev,
bool vsp1_entity_is_streaming(struct vsp1_entity *entity); bool vsp1_entity_is_streaming(struct vsp1_entity *entity);
int vsp1_entity_set_streaming(struct vsp1_entity *entity, bool streaming); int vsp1_entity_set_streaming(struct vsp1_entity *entity, bool streaming);
void vsp1_entity_route_setup(struct vsp1_entity *source);
#endif /* __VSP1_ENTITY_H__ */ #endif /* __VSP1_ENTITY_H__ */
...@@ -674,18 +674,6 @@ static void vsp1_video_buffer_queue(struct vb2_buffer *vb) ...@@ -674,18 +674,6 @@ static void vsp1_video_buffer_queue(struct vb2_buffer *vb)
spin_unlock_irqrestore(&pipe->irqlock, flags); spin_unlock_irqrestore(&pipe->irqlock, flags);
} }
static void vsp1_entity_route_setup(struct vsp1_entity *source)
{
struct vsp1_entity *sink;
if (source->route->reg == 0)
return;
sink = container_of(source->sink, struct vsp1_entity, subdev.entity);
vsp1_write(source->vsp1, source->route->reg,
sink->route->inputs[source->sink_pad]);
}
static int vsp1_video_start_streaming(struct vb2_queue *vq, unsigned int count) static int vsp1_video_start_streaming(struct vb2_queue *vq, unsigned int count)
{ {
struct vsp1_video *video = vb2_get_drv_priv(vq); struct vsp1_video *video = vb2_get_drv_priv(vq);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment