summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/s5p-fimc
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2013-01-30 09:55:46 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-02-05 17:53:25 -0200
commit8b164105d87d1c0101dfbf8d2bacee82c70d91aa (patch)
tree24bf643f45f2dd288405a9bd18a30b75d23a0146 /drivers/media/platform/s5p-fimc
parent81619ce1931a1d96e53b455ca2f35757f0c457a5 (diff)
downloadop-kernel-dev-8b164105d87d1c0101dfbf8d2bacee82c70d91aa.zip
op-kernel-dev-8b164105d87d1c0101dfbf8d2bacee82c70d91aa.tar.gz
[media] s5p-fimc: Fix FIMC.n subdev set_selection ioctl handler
The V4L2_SEL_TGT_CROP_BOUNDS, V4L2_SEL_TGT_COMPOSE_BOUNDS selection targets are not supposed to be handled in the set_selection ioctl. Remove the code that doesn't do anything sensible now and make sure ctx->state is modified with the spinlock held. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/platform/s5p-fimc')
-rw-r--r--drivers/media/platform/s5p-fimc/fimc-capture.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/media/platform/s5p-fimc/fimc-capture.c b/drivers/media/platform/s5p-fimc/fimc-capture.c
index 5ec2f48..f553cc2 100644
--- a/drivers/media/platform/s5p-fimc/fimc-capture.c
+++ b/drivers/media/platform/s5p-fimc/fimc-capture.c
@@ -1688,16 +1688,6 @@ static int fimc_subdev_set_selection(struct v4l2_subdev *sd,
fimc_capture_try_selection(ctx, r, V4L2_SEL_TGT_CROP);
switch (sel->target) {
- case V4L2_SEL_TGT_COMPOSE_BOUNDS:
- f = &ctx->d_frame;
- case V4L2_SEL_TGT_CROP_BOUNDS:
- r->width = f->o_width;
- r->height = f->o_height;
- r->left = 0;
- r->top = 0;
- mutex_unlock(&fimc->lock);
- return 0;
-
case V4L2_SEL_TGT_CROP:
try_sel = v4l2_subdev_get_try_crop(fh, sel->pad);
break;
@@ -1716,9 +1706,9 @@ static int fimc_subdev_set_selection(struct v4l2_subdev *sd,
spin_lock_irqsave(&fimc->slock, flags);
set_frame_crop(f, r->left, r->top, r->width, r->height);
set_bit(ST_CAPT_APPLY_CFG, &fimc->state);
- spin_unlock_irqrestore(&fimc->slock, flags);
if (sel->target == V4L2_SEL_TGT_COMPOSE)
ctx->state |= FIMC_COMPOSE;
+ spin_unlock_irqrestore(&fimc->slock, flags);
}
dbg("target %#x: (%d,%d)/%dx%d", sel->target, r->left, r->top,
OpenPOWER on IntegriCloud