diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2010-10-08 05:01:22 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-21 07:55:45 -0200 |
commit | 47654df8a925ea4f6660b357cbd4ef2ead50c6ad (patch) | |
tree | 53e0ded9f86c14c970a84276a3aebd8ea7b504f7 /drivers/media/video/s5p-fimc/fimc-core.c | |
parent | 548aafcd9e73b14fd959ec3689d1551bf7f388d3 (diff) | |
download | kernel_samsung_tuna-47654df8a925ea4f6660b357cbd4ef2ead50c6ad.zip kernel_samsung_tuna-47654df8a925ea4f6660b357cbd4ef2ead50c6ad.tar.gz kernel_samsung_tuna-47654df8a925ea4f6660b357cbd4ef2ead50c6ad.tar.bz2 |
[media] s5p-fimc: Fix 90/270 deg rotation errors
Due to errorneous swapping of image dimensions the rotation
control was not handled properly in subsequent calls.
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/video/s5p-fimc/fimc-core.c')
-rw-r--r-- | drivers/media/video/s5p-fimc/fimc-core.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/media/video/s5p-fimc/fimc-core.c b/drivers/media/video/s5p-fimc/fimc-core.c index fccab13..27379a6 100644 --- a/drivers/media/video/s5p-fimc/fimc-core.c +++ b/drivers/media/video/s5p-fimc/fimc-core.c @@ -207,8 +207,13 @@ static int fimc_set_scaler_info(struct fimc_ctx *ctx) int tx, ty, sx, sy; int ret; - tx = d_frame->width; - ty = d_frame->height; + if (ctx->rotation == 90 || ctx->rotation == 270) { + ty = d_frame->width; + tx = d_frame->height; + } else { + tx = d_frame->width; + ty = d_frame->height; + } if (tx <= 0 || ty <= 0) { v4l2_err(&ctx->fimc_dev->m2m.v4l2_dev, "invalid target size: %d x %d", tx, ty); @@ -429,12 +434,6 @@ static int fimc_prepare_config(struct fimc_ctx *ctx, u32 flags) d_frame = &ctx->d_frame; if (flags & FIMC_PARAMS) { - if ((ctx->out_path == FIMC_DMA) && - (ctx->rotation == 90 || ctx->rotation == 270)) { - swap(d_frame->f_width, d_frame->f_height); - swap(d_frame->width, d_frame->height); - } - /* Prepare the DMA offset ratios for scaler. */ fimc_prepare_dma_offset(ctx, &ctx->s_frame); fimc_prepare_dma_offset(ctx, &ctx->d_frame); |