diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2015-11-01 14:58:29 (GMT) |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-04-13 20:42:45 (GMT) |
commit | 59d0b2bf1d8de62d3ee8cce5c5b9463608095642 (patch) | |
tree | 365f679b2a3428ffb326a97ae04dba333eed1c2f | |
parent | d884a8b2a5dc2fad784a60f356d1d8d90cecb436 (diff) | |
download | linux-59d0b2bf1d8de62d3ee8cce5c5b9463608095642.tar.xz |
[media] v4l: vsp1: Don't setup control handler when starting streaming
The control handler set operations don't program the hardware anymore,
there's thus no need to call them when starting the stream.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r-- | drivers/media/platform/vsp1/vsp1_bru.c | 5 | ||||
-rw-r--r-- | drivers/media/platform/vsp1/vsp1_entity.c | 18 | ||||
-rw-r--r-- | drivers/media/platform/vsp1/vsp1_entity.h | 2 | ||||
-rw-r--r-- | drivers/media/platform/vsp1/vsp1_rpf.c | 5 | ||||
-rw-r--r-- | drivers/media/platform/vsp1/vsp1_sru.c | 5 | ||||
-rw-r--r-- | drivers/media/platform/vsp1/vsp1_wpf.c | 5 |
6 files changed, 6 insertions, 34 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_bru.c b/drivers/media/platform/vsp1/vsp1_bru.c index 4c1bd04..27a9043 100644 --- a/drivers/media/platform/vsp1/vsp1_bru.c +++ b/drivers/media/platform/vsp1/vsp1_bru.c @@ -66,11 +66,8 @@ static int bru_s_stream(struct v4l2_subdev *subdev, int enable) struct v4l2_mbus_framefmt *format; unsigned int flags; unsigned int i; - int ret; - ret = vsp1_entity_set_streaming(&bru->entity, enable); - if (ret < 0) - return ret; + vsp1_entity_set_streaming(&bru->entity, enable); if (!enable) return 0; diff --git a/drivers/media/platform/vsp1/vsp1_entity.c b/drivers/media/platform/vsp1/vsp1_entity.c index a94f544..6b425ae 100644 --- a/drivers/media/platform/vsp1/vsp1_entity.c +++ b/drivers/media/platform/vsp1/vsp1_entity.c @@ -45,29 +45,13 @@ bool vsp1_entity_is_streaming(struct vsp1_entity *entity) return streaming; } -int vsp1_entity_set_streaming(struct vsp1_entity *entity, bool streaming) +void vsp1_entity_set_streaming(struct vsp1_entity *entity, bool streaming) { unsigned long flags; - int ret; spin_lock_irqsave(&entity->lock, flags); entity->streaming = streaming; spin_unlock_irqrestore(&entity->lock, flags); - - if (!streaming) - return 0; - - if (!entity->vsp1->info->uapi || !entity->subdev.ctrl_handler) - return 0; - - ret = v4l2_ctrl_handler_setup(entity->subdev.ctrl_handler); - if (ret < 0) { - spin_lock_irqsave(&entity->lock, flags); - entity->streaming = false; - spin_unlock_irqrestore(&entity->lock, flags); - } - - return ret; } void vsp1_entity_route_setup(struct vsp1_entity *source) diff --git a/drivers/media/platform/vsp1/vsp1_entity.h b/drivers/media/platform/vsp1/vsp1_entity.h index 259880e..c0d6db8 100644 --- a/drivers/media/platform/vsp1/vsp1_entity.h +++ b/drivers/media/platform/vsp1/vsp1_entity.h @@ -101,7 +101,7 @@ void vsp1_entity_init_formats(struct v4l2_subdev *subdev, struct v4l2_subdev_pad_config *cfg); bool vsp1_entity_is_streaming(struct vsp1_entity *entity); -int vsp1_entity_set_streaming(struct vsp1_entity *entity, bool streaming); +void vsp1_entity_set_streaming(struct vsp1_entity *entity, bool streaming); void vsp1_entity_route_setup(struct vsp1_entity *source); diff --git a/drivers/media/platform/vsp1/vsp1_rpf.c b/drivers/media/platform/vsp1/vsp1_rpf.c index 9ccfb57..48870b2 100644 --- a/drivers/media/platform/vsp1/vsp1_rpf.c +++ b/drivers/media/platform/vsp1/vsp1_rpf.c @@ -45,11 +45,8 @@ static int rpf_s_stream(struct v4l2_subdev *subdev, int enable) const struct v4l2_rect *crop = &rpf->crop; u32 pstride; u32 infmt; - int ret; - ret = vsp1_entity_set_streaming(&rpf->entity, enable); - if (ret < 0) - return ret; + vsp1_entity_set_streaming(&rpf->entity, enable); if (!enable) return 0; diff --git a/drivers/media/platform/vsp1/vsp1_sru.c b/drivers/media/platform/vsp1/vsp1_sru.c index ec4741e..15fc562 100644 --- a/drivers/media/platform/vsp1/vsp1_sru.c +++ b/drivers/media/platform/vsp1/vsp1_sru.c @@ -113,11 +113,8 @@ static int sru_s_stream(struct v4l2_subdev *subdev, int enable) struct v4l2_mbus_framefmt *input; struct v4l2_mbus_framefmt *output; u32 ctrl0; - int ret; - ret = vsp1_entity_set_streaming(&sru->entity, enable); - if (ret < 0) - return ret; + vsp1_entity_set_streaming(&sru->entity, enable); if (!enable) return 0; diff --git a/drivers/media/platform/vsp1/vsp1_wpf.c b/drivers/media/platform/vsp1/vsp1_wpf.c index 2135cca..d68c90d 100644 --- a/drivers/media/platform/vsp1/vsp1_wpf.c +++ b/drivers/media/platform/vsp1/vsp1_wpf.c @@ -46,11 +46,8 @@ static int wpf_s_stream(struct v4l2_subdev *subdev, int enable) unsigned int i; u32 srcrpf = 0; u32 outfmt = 0; - int ret; - ret = vsp1_entity_set_streaming(&wpf->entity, enable); - if (ret < 0) - return ret; + vsp1_entity_set_streaming(&wpf->entity, enable); if (!enable) { vsp1_write(vsp1, VI6_WPF_IRQ_ENB(wpf->entity.index), 0); |