From patchwork Wed Dec 17 07:21:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tony nadackal X-Patchwork-Id: 5505441 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2B9CCBEEA8 for ; Wed, 17 Dec 2014 07:28:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 55C5720A24 for ; Wed, 17 Dec 2014 07:28:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 67D0A20A15 for ; Wed, 17 Dec 2014 07:28:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751087AbaLQH2r (ORCPT ); Wed, 17 Dec 2014 02:28:47 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:48359 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750995AbaLQH2r (ORCPT ); Wed, 17 Dec 2014 02:28:47 -0500 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NGP00JNYU3VN780@mailout4.samsung.com>; Wed, 17 Dec 2014 16:28:44 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.126]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id 76.EF.17016.BA031945; Wed, 17 Dec 2014 16:28:43 +0900 (KST) X-AuditID: cbfee68d-f79296d000004278-b5-549130ab4737 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 14.A8.20081.BA031945; Wed, 17 Dec 2014 16:28:43 +0900 (KST) Received: from chromebld-server.sisodomain.com ([107.108.73.106]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NGP00ENPU32ZC30@mmp1.samsung.com>; Wed, 17 Dec 2014 16:28:43 +0900 (KST) From: Tony K Nadackal To: linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Cc: mchehab@osg.samsung.com, j.anaszewski@samsung.com, kgene@kernel.org, k.debski@samsung.com, s.nawrocki@samsung.com, bhushan.r@samsung.com, Tony K Nadackal Subject: [PATCH] [media] s5p-jpeg: Initialize cb and cr to zero. Date: Wed, 17 Dec 2014 12:51:21 +0530 Message-id: <1418800881-7428-1-git-send-email-tony.kn@samsung.com> X-Mailer: git-send-email 2.2.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrALMWRmVeSWpSXmKPExsWyRsSkTne1wcQQg6615hbL1v5jsei9+pzR 4sfrC2wW/Y9fM1tsenyN1aJnw1ZWixnn9zFZrH5WYXH4TTurxauLr5gcuDw2repk89i8pN5j S/9ddo++LasYPT5vkgtgjeKySUnNySxLLdK3S+DKON1+hK1gPXtF69U7LA2Ms9i6GDk5JARM JM5P/s0MYYtJXLi3HijOxSEksJRRYtqc6YwwRfv+TGeFSCxilLjZ8QWqagKTxL6u2WDtbALa EjN+PGQHsUUEsiQu3lwHtoJZYDujxNt5UiC2sICDxIOf/UD1HBwsAqoS5+77gIR5BZwkftx6 yg6xTE5iy61H7CDzJQQms0uc7F7IBJJgERCQ+Db5EAtIr4SArMSmA1BXS0ocXHGDZQKj4AJG hlWMoqkFyQXFSelFhnrFibnFpXnpesn5uZsYgQF9+t+z3h2Mtw9YH2IU4GBU4uF9cX1CiBBr YllxZe4hRlOgDROZpUST84Fxk1cSb2hsZmRhamJqbGRuaaYkzqso9TNYSCA9sSQ1OzW1ILUo vqg0J7X4ECMTB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QDfdU7qrQIAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP To avoid garbage value written into image base address planes, initialize cb and cr of structure s5p_jpeg_addr to zero. Signed-off-by: Tony K Nadackal --- This patch is created and tested on top of linux-next-20141210. It can be cleanly applied on media-next and kgene/for-next. drivers/media/platform/s5p-jpeg/jpeg-core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c b/drivers/media/platform/s5p-jpeg/jpeg-core.c index 91bd3e6..54fa5d9 100644 --- a/drivers/media/platform/s5p-jpeg/jpeg-core.c +++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c @@ -1845,6 +1845,9 @@ static void exynos4_jpeg_set_img_addr(struct s5p_jpeg_ctx *ctx) struct s5p_jpeg_addr jpeg_addr; u32 pix_size, padding_bytes = 0; + jpeg_addr.cb = 0; + jpeg_addr.cr = 0; + pix_size = ctx->cap_q.w * ctx->cap_q.h; if (ctx->mode == S5P_JPEG_ENCODE) {