media: s5p-jpeg: add RGB565 format to Exynos4 buffer size workaround
authorMarek Szyprowski <m.szyprowski@samsung.com>
Thu, 16 Apr 2015 09:52:33 +0000 (11:52 +0200)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Thu, 31 Mar 2016 07:58:51 +0000 (16:58 +0900)
JPEG HW can access buffer beyond the image data for images, which width
or height is not properly aligned. This patch adds RGB565 format to
workaround code to solve IOMMU page fault issue. The exact needed buffer
enlargement workaround need to be determined experimentally.

Reported-by: Inha Song <ideal.song@samsung.com>
Suggested-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
drivers/media/platform/s5p-jpeg/jpeg-core.c

index bfbf1575677ca93c2d81426daaef885f7675022f..5f1ce6281f1b829ee64bf9ea0e82d21023a1027b 100644 (file)
@@ -1300,7 +1300,8 @@ static int exynos4_jpeg_get_output_buffer_size(struct s5p_jpeg_ctx *ctx,
            pix_fmt == V4L2_PIX_FMT_NV42 ||
            pix_fmt == V4L2_PIX_FMT_NV12 ||
            pix_fmt == V4L2_PIX_FMT_NV21 ||
-           pix_fmt == V4L2_PIX_FMT_YUV420)
+           pix_fmt == V4L2_PIX_FMT_YUV420 ||
+           pix_fmt == V4L2_PIX_FMT_RGB565)
                wh_align = 4;
        else
                wh_align = 1;