summaryrefslogtreecommitdiff
path: root/drivers/media/platform/exynos4-is/fimc-lite.c
diff options
context:
space:
mode:
authorArun Kumar K <arun.kk@samsung.com>2013-07-15 07:51:23 -0300
committerBeata Michalska <b.michalska@samsung.com>2015-02-12 17:46:13 +0100
commit486f8c074067cdb644ea118e71cd3f1aa16700c5 (patch)
tree25064b1d0081cf7dc530b1b364d3d8d89ff0c2ab /drivers/media/platform/exynos4-is/fimc-lite.c
parent21c58beb711b825d679aea0a8d40778b9fcc7a52 (diff)
downloadlinux-3.10-486f8c074067cdb644ea118e71cd3f1aa16700c5.tar.gz
linux-3.10-486f8c074067cdb644ea118e71cd3f1aa16700c5.tar.bz2
linux-3.10-486f8c074067cdb644ea118e71cd3f1aa16700c5.zip
[media] exynos4-is: Fix fimc-lite bayer formats
The 10-bit and 12-bit Bayer output formats supported by FIMC-LITE actually use 16 bits where the extra bits are padded with zeros. The patch corrects buffer allocation for these two formats by modifying the depth field. This prevents memory corruption by the output DMA due to insufficient buffer size. Signed-off-by: Arun Kumar K <arun.kk@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Cc: stable@vger.kernel.org Change-Id: Id0e3f13ce13de51218aa0b99f86311fcf411e4ec
Diffstat (limited to 'drivers/media/platform/exynos4-is/fimc-lite.c')
-rw-r--r--drivers/media/platform/exynos4-is/fimc-lite.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/platform/exynos4-is/fimc-lite.c b/drivers/media/platform/exynos4-is/fimc-lite.c
index 7e41268749c..ff03f601d68 100644
--- a/drivers/media/platform/exynos4-is/fimc-lite.c
+++ b/drivers/media/platform/exynos4-is/fimc-lite.c
@@ -90,7 +90,7 @@ static const struct fimc_fmt fimc_lite_formats[] = {
.name = "RAW10 (GRBG)",
.fourcc = V4L2_PIX_FMT_SGRBG10,
.colorspace = V4L2_COLORSPACE_SRGB,
- .depth = { 10 },
+ .depth = { 16 },
.color = FIMC_FMT_RAW10,
.memplanes = 1,
.mbus_code = V4L2_MBUS_FMT_SGRBG10_1X10,
@@ -99,7 +99,7 @@ static const struct fimc_fmt fimc_lite_formats[] = {
.name = "RAW12 (GRBG)",
.fourcc = V4L2_PIX_FMT_SGRBG12,
.colorspace = V4L2_COLORSPACE_SRGB,
- .depth = { 12 },
+ .depth = { 16 },
.color = FIMC_FMT_RAW12,
.memplanes = 1,
.mbus_code = V4L2_MBUS_FMT_SGRBG12_1X12,