diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2015-11-17 18:10:26 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-04-14 00:56:14 +0300 |
commit | 7b905f0583b2e6fe1494a85303a89aa0cd30b0b3 (patch) | |
tree | a5da79d56457b44624280f2f2fb73a5e0937ab03 /drivers/media/platform/vsp1/vsp1_drm.c | |
parent | b7e5107eebb73d27affed95c20cedbf4784bf17c (diff) | |
download | linux-7b905f0583b2e6fe1494a85303a89aa0cd30b0b3.tar.xz |
[media] v4l: vsp1: Create a new configure operation to setup modules
The subdev s_stream operation is abused as a generic way to setup
modules at every frame. Move the code out to a new VSP1 entity configure
operation.
Most modules now have an empty s_stream operation that can be removed.
The only exception is the WPF module that needs to perform hardware
configuration when stopping the stream. The code can be simplified
accordingly as we know that that operation never fails.
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_drm.c')
-rw-r--r-- | drivers/media/platform/vsp1/vsp1_drm.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_drm.c b/drivers/media/platform/vsp1/vsp1_drm.c index acbf36d315b9..bec7a651d152 100644 --- a/drivers/media/platform/vsp1/vsp1_drm.c +++ b/drivers/media/platform/vsp1/vsp1_drm.c @@ -448,7 +448,6 @@ void vsp1_du_atomic_flush(struct device *dev) struct vsp1_entity *entity; unsigned long flags; bool stop = false; - int ret; list_for_each_entry(entity, &pipe->entities, list_pipe) { /* Disconnect unused RPFs from the pipeline. */ @@ -464,19 +463,16 @@ void vsp1_du_atomic_flush(struct device *dev) vsp1_entity_route_setup(entity); - ret = v4l2_subdev_call(&entity->subdev, video, - s_stream, 1); - if (ret < 0) { - dev_err(vsp1->dev, - "DRM pipeline start failure on entity %s\n", - entity->subdev.name); - return; - } + if (entity->ops->configure) + entity->ops->configure(entity); if (entity->type == VSP1_ENTITY_RPF) vsp1_rwpf_set_memory(to_rwpf(&entity->subdev)); } + /* We know that the WPF s_stream operation never fails. */ + v4l2_subdev_call(&pipe->output->entity.subdev, video, s_stream, 1); + vsp1_dl_list_commit(pipe->dl); pipe->dl = NULL; |