diff options
author | Jacek Anaszewski <j.anaszewski@samsung.com> | 2014-07-11 11:19:45 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-07-30 18:17:43 -0400 |
commit | fac4d961263d054658f42328ca7b7384d11a0487 (patch) | |
tree | 7df28232859608186777efc57137377fedeada67 /drivers/media | |
parent | e9e7dfe5ef577d07d20925f7d1680e246f0f8949 (diff) |
[media] s5p-jpeg: fix g_selection op
V4L2_SEL_TGT_COMPOSE_DEFAULT switch case should select whole
available area of the image and V4L2_SEL_TGT_COMPOSE
should apply user settings.
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/platform/s5p-jpeg/jpeg-core.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c b/drivers/media/platform/s5p-jpeg/jpeg-core.c index 5ef7f5b1e829..d11357f5fc45 100644 --- a/drivers/media/platform/s5p-jpeg/jpeg-core.c +++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c | |||
@@ -1505,21 +1505,23 @@ static int s5p_jpeg_g_selection(struct file *file, void *priv, | |||
1505 | case V4L2_SEL_TGT_CROP: | 1505 | case V4L2_SEL_TGT_CROP: |
1506 | case V4L2_SEL_TGT_CROP_BOUNDS: | 1506 | case V4L2_SEL_TGT_CROP_BOUNDS: |
1507 | case V4L2_SEL_TGT_CROP_DEFAULT: | 1507 | case V4L2_SEL_TGT_CROP_DEFAULT: |
1508 | case V4L2_SEL_TGT_COMPOSE: | ||
1509 | case V4L2_SEL_TGT_COMPOSE_DEFAULT: | 1508 | case V4L2_SEL_TGT_COMPOSE_DEFAULT: |
1510 | s->r.width = ctx->out_q.w; | 1509 | s->r.width = ctx->out_q.w; |
1511 | s->r.height = ctx->out_q.h; | 1510 | s->r.height = ctx->out_q.h; |
1511 | s->r.left = 0; | ||
1512 | s->r.top = 0; | ||
1512 | break; | 1513 | break; |
1514 | case V4L2_SEL_TGT_COMPOSE: | ||
1513 | case V4L2_SEL_TGT_COMPOSE_BOUNDS: | 1515 | case V4L2_SEL_TGT_COMPOSE_BOUNDS: |
1514 | case V4L2_SEL_TGT_COMPOSE_PADDED: | 1516 | case V4L2_SEL_TGT_COMPOSE_PADDED: |
1515 | s->r.width = ctx->cap_q.w; | 1517 | s->r.width = ctx->crop_rect.width; |
1516 | s->r.height = ctx->cap_q.h; | 1518 | s->r.height = ctx->crop_rect.height; |
1519 | s->r.left = ctx->crop_rect.left; | ||
1520 | s->r.top = ctx->crop_rect.top; | ||
1517 | break; | 1521 | break; |
1518 | default: | 1522 | default: |
1519 | return -EINVAL; | 1523 | return -EINVAL; |
1520 | } | 1524 | } |
1521 | s->r.left = 0; | ||
1522 | s->r.top = 0; | ||
1523 | return 0; | 1525 | return 0; |
1524 | } | 1526 | } |
1525 | 1527 | ||