diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2015-08-05 16:40:31 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-02-19 09:22:38 -0200 |
commit | 96bfa6a5fd1dc5a7f2b5cd6f58bdcf1501146d17 (patch) | |
tree | d648e4fa4efaa9ba6fb849bcab67e8e84d9808fc /drivers/media/platform/vsp1/vsp1_pipe.c | |
parent | f2ed459db7a1537cddc50a58ee26df6b8f3fbe1f (diff) |
[media] v4l: vsp1: Make pipeline inputs array index by RPF index
The pipeline inputs array stores pointers to all RPFs contained in the
pipeline. It's currently indexed contiguously by adding RPFs in the
order they are found during graph walk. This can't easily support
dynamic addition and removal of RPFs while streaming, which will be
required for combined VSP+DU support.
Make the array indexed by RPF index instead and skip NULL elements when
iterating over RPFs.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/vsp1/vsp1_pipe.c')
-rw-r--r-- | drivers/media/platform/vsp1/vsp1_pipe.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_pipe.c b/drivers/media/platform/vsp1/vsp1_pipe.c index b850aeb885bf..05d4c3870cff 100644 --- a/drivers/media/platform/vsp1/vsp1_pipe.c +++ b/drivers/media/platform/vsp1/vsp1_pipe.c @@ -161,14 +161,18 @@ const struct vsp1_format_info *vsp1_get_format_info(u32 fourcc) void vsp1_pipeline_reset(struct vsp1_pipeline *pipe) { + unsigned int i; + if (pipe->bru) { struct vsp1_bru *bru = to_bru(&pipe->bru->subdev); - unsigned int i; for (i = 0; i < ARRAY_SIZE(bru->inputs); ++i) bru->inputs[i].rpf = NULL; } + for (i = 0; i < ARRAY_SIZE(pipe->inputs); ++i) + pipe->inputs[i] = NULL; + INIT_LIST_HEAD(&pipe->entities); pipe->state = VSP1_PIPELINE_STOPPED; pipe->buffers_ready = 0; |