aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/s5p-fimc/fimc-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/s5p-fimc/fimc-core.c')
-rw-r--r--drivers/media/video/s5p-fimc/fimc-core.c15
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 fccab1398425..27379a6c503c 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)
207 int tx, ty, sx, sy; 207 int tx, ty, sx, sy;
208 int ret; 208 int ret;
209 209
210 tx = d_frame->width; 210 if (ctx->rotation == 90 || ctx->rotation == 270) {
211 ty = d_frame->height; 211 ty = d_frame->width;
212 tx = d_frame->height;
213 } else {
214 tx = d_frame->width;
215 ty = d_frame->height;
216 }
212 if (tx <= 0 || ty <= 0) { 217 if (tx <= 0 || ty <= 0) {
213 v4l2_err(&ctx->fimc_dev->m2m.v4l2_dev, 218 v4l2_err(&ctx->fimc_dev->m2m.v4l2_dev,
214 "invalid target size: %d x %d", tx, ty); 219 "invalid target size: %d x %d", tx, ty);
@@ -429,12 +434,6 @@ static int fimc_prepare_config(struct fimc_ctx *ctx, u32 flags)
429 d_frame = &ctx->d_frame; 434 d_frame = &ctx->d_frame;
430 435
431 if (flags & FIMC_PARAMS) { 436 if (flags & FIMC_PARAMS) {
432 if ((ctx->out_path == FIMC_DMA) &&
433 (ctx->rotation == 90 || ctx->rotation == 270)) {
434 swap(d_frame->f_width, d_frame->f_height);
435 swap(d_frame->width, d_frame->height);
436 }
437
438 /* Prepare the DMA offset ratios for scaler. */ 437 /* Prepare the DMA offset ratios for scaler. */
439 fimc_prepare_dma_offset(ctx, &ctx->s_frame); 438 fimc_prepare_dma_offset(ctx, &ctx->s_frame);
440 fimc_prepare_dma_offset(ctx, &ctx->d_frame); 439 fimc_prepare_dma_offset(ctx, &ctx->d_frame);