diff options
Diffstat (limited to 'drivers/media/video/s5p-fimc/fimc-capture.c')
-rw-r--r-- | drivers/media/video/s5p-fimc/fimc-capture.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/media/video/s5p-fimc/fimc-capture.c b/drivers/media/video/s5p-fimc/fimc-capture.c index 62ce5399c4cf..a3cd78d33913 100644 --- a/drivers/media/video/s5p-fimc/fimc-capture.c +++ b/drivers/media/video/s5p-fimc/fimc-capture.c | |||
@@ -655,7 +655,7 @@ static void fimc_capture_try_selection(struct fimc_ctx *ctx, | |||
655 | r->left = r->top = 0; | 655 | r->left = r->top = 0; |
656 | return; | 656 | return; |
657 | } | 657 | } |
658 | if (target == V4L2_SEL_TGT_COMPOSE_ACTIVE) { | 658 | if (target == V4L2_SEL_TGT_COMPOSE) { |
659 | if (ctx->rotation != 90 && ctx->rotation != 270) | 659 | if (ctx->rotation != 90 && ctx->rotation != 270) |
660 | align_h = 1; | 660 | align_h = 1; |
661 | max_sc_h = min(SCALER_MAX_HRATIO, 1 << (ffs(sink->width) - 3)); | 661 | max_sc_h = min(SCALER_MAX_HRATIO, 1 << (ffs(sink->width) - 3)); |
@@ -682,7 +682,7 @@ static void fimc_capture_try_selection(struct fimc_ctx *ctx, | |||
682 | rotate ? sink->f_height : sink->f_width); | 682 | rotate ? sink->f_height : sink->f_width); |
683 | max_h = min_t(u32, FIMC_CAMIF_MAX_HEIGHT, sink->f_height); | 683 | max_h = min_t(u32, FIMC_CAMIF_MAX_HEIGHT, sink->f_height); |
684 | 684 | ||
685 | if (target == V4L2_SEL_TGT_COMPOSE_ACTIVE) { | 685 | if (target == V4L2_SEL_TGT_COMPOSE) { |
686 | min_w = min_t(u32, max_w, sink->f_width / max_sc_h); | 686 | min_w = min_t(u32, max_w, sink->f_width / max_sc_h); |
687 | min_h = min_t(u32, max_h, sink->f_height / max_sc_v); | 687 | min_h = min_t(u32, max_h, sink->f_height / max_sc_v); |
688 | if (rotate) { | 688 | if (rotate) { |
@@ -1147,9 +1147,9 @@ static int fimc_cap_g_selection(struct file *file, void *fh, | |||
1147 | s->r.height = f->o_height; | 1147 | s->r.height = f->o_height; |
1148 | return 0; | 1148 | return 0; |
1149 | 1149 | ||
1150 | case V4L2_SEL_TGT_COMPOSE_ACTIVE: | 1150 | case V4L2_SEL_TGT_COMPOSE: |
1151 | f = &ctx->d_frame; | 1151 | f = &ctx->d_frame; |
1152 | case V4L2_SEL_TGT_CROP_ACTIVE: | 1152 | case V4L2_SEL_TGT_CROP: |
1153 | s->r.left = f->offs_h; | 1153 | s->r.left = f->offs_h; |
1154 | s->r.top = f->offs_v; | 1154 | s->r.top = f->offs_v; |
1155 | s->r.width = f->width; | 1155 | s->r.width = f->width; |
@@ -1185,9 +1185,9 @@ static int fimc_cap_s_selection(struct file *file, void *fh, | |||
1185 | if (s->type != V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) | 1185 | if (s->type != V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) |
1186 | return -EINVAL; | 1186 | return -EINVAL; |
1187 | 1187 | ||
1188 | if (s->target == V4L2_SEL_TGT_COMPOSE_ACTIVE) | 1188 | if (s->target == V4L2_SEL_TGT_COMPOSE) |
1189 | f = &ctx->d_frame; | 1189 | f = &ctx->d_frame; |
1190 | else if (s->target == V4L2_SEL_TGT_CROP_ACTIVE) | 1190 | else if (s->target == V4L2_SEL_TGT_CROP) |
1191 | f = &ctx->s_frame; | 1191 | f = &ctx->s_frame; |
1192 | else | 1192 | else |
1193 | return -EINVAL; | 1193 | return -EINVAL; |
@@ -1483,7 +1483,7 @@ static int fimc_subdev_set_selection(struct v4l2_subdev *sd, | |||
1483 | return -EINVAL; | 1483 | return -EINVAL; |
1484 | 1484 | ||
1485 | mutex_lock(&fimc->lock); | 1485 | mutex_lock(&fimc->lock); |
1486 | fimc_capture_try_selection(ctx, r, V4L2_SEL_TGT_CROP_ACTIVE); | 1486 | fimc_capture_try_selection(ctx, r, V4L2_SEL_TGT_CROP); |
1487 | 1487 | ||
1488 | switch (sel->target) { | 1488 | switch (sel->target) { |
1489 | case V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS: | 1489 | case V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS: |