]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[media] exynos4-is: Fix fimc-lite bayer formats
authorArun Kumar K <arun.kk@samsung.com>
Mon, 15 Jul 2013 10:51:23 +0000 (07:51 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Sun, 18 Aug 2013 10:05:03 +0000 (07:05 -0300)
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>
drivers/media/platform/exynos4-is/fimc-lite.c

index 08fbfedea90fd59e705b244b81442a4515e2403c..e85dc4f24da631cb2ac6f1ba3b3d3112063df047 100644 (file)
@@ -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,