diff options
author | Jacek Anaszewski <j.anaszewski@samsung.com> | 2015-03-05 08:56:25 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-04-07 07:14:54 -0400 |
commit | 12b055662ac6216c518d7ec09bf2f7d75435015c (patch) | |
tree | 7e32cc900e64148a7dab479865f04a607e4d2e61 /drivers | |
parent | 7c15fd4bf3d367bfc80f76814559f51f75c4d28a (diff) |
[media] s5p-jpeg: Initialize jpeg_addr fields to zero
JPEG codecs on Exynos4 and Exynos3250 SoCs utilize different number
of planes for storing the raw image data, depending on the format
of the image being processed. For the unused planes a random data
was being written to the related registers. Regardless of the fact
that this seemed not to be harmful, fix the issue for clarity reasons.
Reported-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/platform/s5p-jpeg/jpeg-core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c b/drivers/media/platform/s5p-jpeg/jpeg-core.c index 8b0ca2ea9c72..697dc0e1945d 100644 --- a/drivers/media/platform/s5p-jpeg/jpeg-core.c +++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c | |||
@@ -1844,7 +1844,7 @@ static void exynos4_jpeg_set_img_addr(struct s5p_jpeg_ctx *ctx) | |||
1844 | struct s5p_jpeg *jpeg = ctx->jpeg; | 1844 | struct s5p_jpeg *jpeg = ctx->jpeg; |
1845 | struct s5p_jpeg_fmt *fmt; | 1845 | struct s5p_jpeg_fmt *fmt; |
1846 | struct vb2_buffer *vb; | 1846 | struct vb2_buffer *vb; |
1847 | struct s5p_jpeg_addr jpeg_addr; | 1847 | struct s5p_jpeg_addr jpeg_addr = {}; |
1848 | u32 pix_size, padding_bytes = 0; | 1848 | u32 pix_size, padding_bytes = 0; |
1849 | 1849 | ||
1850 | pix_size = ctx->cap_q.w * ctx->cap_q.h; | 1850 | pix_size = ctx->cap_q.w * ctx->cap_q.h; |
@@ -1945,7 +1945,7 @@ static void exynos3250_jpeg_set_img_addr(struct s5p_jpeg_ctx *ctx) | |||
1945 | struct s5p_jpeg *jpeg = ctx->jpeg; | 1945 | struct s5p_jpeg *jpeg = ctx->jpeg; |
1946 | struct s5p_jpeg_fmt *fmt; | 1946 | struct s5p_jpeg_fmt *fmt; |
1947 | struct vb2_buffer *vb; | 1947 | struct vb2_buffer *vb; |
1948 | struct s5p_jpeg_addr jpeg_addr; | 1948 | struct s5p_jpeg_addr jpeg_addr = {}; |
1949 | u32 pix_size; | 1949 | u32 pix_size; |
1950 | 1950 | ||
1951 | pix_size = ctx->cap_q.w * ctx->cap_q.h; | 1951 | pix_size = ctx->cap_q.w * ctx->cap_q.h; |