diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2012-11-26 18:08:26 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-12-21 17:55:13 +0400 |
commit | 1bc05e77db1b0c2f5ec3917a9b21d64c01342b5f (patch) | |
tree | e7d24203cb54b033dddd4bd76de57a91cefbf275 /drivers/media | |
parent | fe4abb550f68ace5bbc23030c968c138c6a69759 (diff) | |
download | linux-1bc05e77db1b0c2f5ec3917a9b21d64c01342b5f.tar.xz |
[media] s5p-fimc: Fix horizontal/vertical image flip
Setting FIMC_REG_CITRGFMT_FLIP_X_MIRROR bit causes X-axis image
flip (vertical flip) and thus it corresponds to V4L2_CID_VFLIP.
Likewise, setting FIMC_REG_CITRGFMT_FLIP_Y_MIRROR bit causes Y-axis
image flip (horizontal flip) and thus it corresponds to V4L2_CID_HFLIP.
Currently the driver does X-axis flip when V4L2_CID_HFLIP is set and
Y-axis flip for V4L2_CID_VFLIP. Fix this incorrect assignment by setting
proper FIMC_REG_CITRGFMT register bits for ctx->hflip and ctx->vflip.
Reported-by: Kyungmin Park <kyungmin.park@samsung.com>
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')
-rw-r--r-- | drivers/media/platform/s5p-fimc/fimc-reg.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/platform/s5p-fimc/fimc-reg.c b/drivers/media/platform/s5p-fimc/fimc-reg.c index 2c9d0c06c9e8..9c3c461a5099 100644 --- a/drivers/media/platform/s5p-fimc/fimc-reg.c +++ b/drivers/media/platform/s5p-fimc/fimc-reg.c @@ -44,9 +44,9 @@ static u32 fimc_hw_get_in_flip(struct fimc_ctx *ctx) u32 flip = FIMC_REG_MSCTRL_FLIP_NORMAL; if (ctx->hflip) - flip = FIMC_REG_MSCTRL_FLIP_X_MIRROR; - if (ctx->vflip) flip = FIMC_REG_MSCTRL_FLIP_Y_MIRROR; + if (ctx->vflip) + flip = FIMC_REG_MSCTRL_FLIP_X_MIRROR; if (ctx->rotation <= 90) return flip; @@ -59,9 +59,9 @@ static u32 fimc_hw_get_target_flip(struct fimc_ctx *ctx) u32 flip = FIMC_REG_CITRGFMT_FLIP_NORMAL; if (ctx->hflip) - flip |= FIMC_REG_CITRGFMT_FLIP_X_MIRROR; - if (ctx->vflip) flip |= FIMC_REG_CITRGFMT_FLIP_Y_MIRROR; + if (ctx->vflip) + flip |= FIMC_REG_CITRGFMT_FLIP_X_MIRROR; if (ctx->rotation <= 90) return flip; |