From patchwork Tue Aug 8 11:27:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Pietrasiewicz X-Patchwork-Id: 9887605 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 70C78601EB for ; Tue, 8 Aug 2017 11:32:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 61E29287B5 for ; Tue, 8 Aug 2017 11:32:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 559A5287C7; Tue, 8 Aug 2017 11:32:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8F11A287B5 for ; Tue, 8 Aug 2017 11:32:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-reply-to:Message-id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=3SSYLH0n0Q2ISIa0PqgsZgakz998zM5vSPqT2uFH/No=; b=VSgaqmRR+TUwEjwjj+ozLFsU9K bbhHfX0C5gBQVLUofgzvYx5K/Wlo0B5Ypq8G58+UUpIgDW22mx/ItrBXgacu5dNhmNWfLAm1OcG1l e6k3T2Wn8SDJE1n5moj6YmgeXFwvPHEX+uMMhoxxxGQkq3VphLQrBpwASdZexjEBfpGK/ottKdNeW x9gzXaGhnoPHcaY3AZN51b6X32/Ye7pK29+KMbGbeTHqYBds1ggNJ+sxtYltxVCTmhAj8HQl/xQTw C7lO6LLQ8yRuVhkUoPpTkMGbn/1zUbL0Hs/CimFbO5YadAHyj50O+GBRUkySKSIYuN6rc93aN5/4u rBKggo9Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1df2kq-00078D-4S; Tue, 08 Aug 2017 11:32:56 +0000 Received: from mailout4.w1.samsung.com ([210.118.77.14]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1df2fl-00034W-HM for linux-arm-kernel@lists.infradead.org; Tue, 08 Aug 2017 11:27:43 +0000 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OUD001YY6HIR390@mailout4.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 08 Aug 2017 12:27:18 +0100 (BST) Received: from eusmges1.samsung.com (unknown [203.254.199.239]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170808112717eucas1p2338be2a905d3520507ed27449066ec6d~Y21X3Je9Y2481024810eucas1p2M; Tue, 8 Aug 2017 11:27:17 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1.samsung.com (EUCPMTA) with SMTP id A9.83.12576.510A9895; Tue, 8 Aug 2017 12:27:17 +0100 (BST) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170808112717eucas1p21f42a5991fc862df2d010a7ccfae634b~Y21XJvhPf2479724797eucas1p2E; Tue, 8 Aug 2017 11:27:17 +0000 (GMT) X-AuditID: cbfec7ef-f79ee6d000003120-87-5989a015cd4b Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 33.51.20118.510A9895; Tue, 8 Aug 2017 12:27:17 +0100 (BST) Received: from AMDC831.digital.local ([106.116.147.122]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OUD002SM6H90300@eusync1.samsung.com>; Tue, 08 Aug 2017 12:27:17 +0100 (BST) From: Andrzej Pietrasiewicz To: linux-samsung-soc@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 5/5] media: platform: s5p-jpeg: directly use parsed subsampling on 5433 Date: Tue, 08 Aug 2017 13:27:08 +0200 Message-id: <1502191628-11958-5-git-send-email-andrzej.p@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1502191628-11958-1-git-send-email-andrzej.p@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrIIsWRmVeSWpSXmKPExsWy7djP87qiCzojDdY16FrMetnOYrFxxnpW i9tbN7BYnD+/gd1i0+NrrBY9G7ayWsw4v4/JYu2Ru+wWq59VWPRfvcTmwOWx4+4SRo+ds+6y e2xa1cnmsXlJvceWfiCvb8sqRo/Pm+QC2KO4bFJSczLLUov07RK4MnqOv2YsaOSs6Pq4lbGB 8Q57FyMnh4SAicSfqw1MELaYxIV769m6GLk4hASWMUpM/3sHyvnMKPF5+TwghwOsY9Y+Wbii g+s+MEI4DUwSW240MIKMYhMwlth7sAPMFhHIkjg9qRFsBbPAFSaJn+v1QGxhgUiJz2t3sYHY LAKqEq9v32cBsXkFXCUOHfzEDHGSnMTJY5NZQWxOATeJj/dmsIMskxCYzi5xa+IlRoiLZCU2 HYCqd5G49vsPK4QtLPHq+BaoN2UkLk/uZoHoncwoseHmByhn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GJpbGhoZW1iYGxkpifOqX26KFBJITyxJzU5NLUgtgulj 4uCUamBkYbGJaJLxf7Bv24fN5w1vHJogcIxH+1BIckKJYUSY4XkZxY2BGZN6Ft59mLEx1Mvz gVeZg1G1yevPn1ybAsp+STxTnLtBb+HhKx8seLIr4pOmdn2YnHOV2f5uOVNmz74mb6Grcw9t cZp2pbjI23aC67PaLXqtD2+0hhYWKHfE5q15e2RnnJwSS3FGoqEWc1FxIgDzlQjGkwIAAA== X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170808112717eucas1p21f42a5991fc862df2d010a7ccfae634b X-Msg-Generator: CA X-Sender-IP: 182.198.249.180 X-Local-Sender: =?UTF-8?B?QW5kcnplaiBQaWV0cmFzaWV3aWN6G1NSUE9MLUtlcm5lbCAo?= =?UTF-8?B?VFApG+yCvOyEseyghOyekBtTZW5pb3IgU29mdHdhcmUgRW5naW5lZXI=?= X-Global-Sender: =?UTF-8?B?QW5kcnplaiBUb21hc3ogUGlldHJhc2lld2ljehtTUlBPTC1L?= =?UTF-8?B?ZXJuZWwgKFRQKRtTYW1zdW5nIEVsZWN0cm9uaWNzG1NlbmlvciBTb2Z0d2Fy?= =?UTF-8?B?ZSBFbmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDAyQ0QwMjczOTI=?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20170808112717eucas1p21f42a5991fc862df2d010a7ccfae634b X-RootMTR: 20170808112717eucas1p21f42a5991fc862df2d010a7ccfae634b References: <1502191352-11595-1-git-send-email-andrzej.p@samsung.com> <1502191628-11958-1-git-send-email-andrzej.p@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170808_042741_743026_AA965445 X-CRM114-Status: GOOD ( 14.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thierry Escande , Bartlomiej Zolnierkiewicz , Mauro Carvalho Chehab , Krzysztof Kozlowski , Jacek Anaszewski , Andrzej Pietrasiewicz , Marek Szyprowski MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP On 5433 variant JPEG data is parsed by hardware only from SOS marker, so subsampling is parsed by software. As such, its value need not be translated from hardware-specific encoding to V4L2 encoding. Signed-off-by: Andrzej Pietrasiewicz --- drivers/media/platform/s5p-jpeg/jpeg-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c b/drivers/media/platform/s5p-jpeg/jpeg-core.c index 492fab1..0225c82 100644 --- a/drivers/media/platform/s5p-jpeg/jpeg-core.c +++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c @@ -627,10 +627,11 @@ static int s5p_jpeg_to_user_subsampling(struct s5p_jpeg_ctx *ctx) return V4L2_JPEG_CHROMA_SUBSAMPLING_411; return exynos3250_decoded_subsampling[ctx->subsampling]; case SJPEG_EXYNOS4: - case SJPEG_EXYNOS5433: if (ctx->subsampling > 2) return V4L2_JPEG_CHROMA_SUBSAMPLING_420; return exynos4x12_decoded_subsampling[ctx->subsampling]; + case SJPEG_EXYNOS5433: + return ctx->subsampling; /* parsed from header */ default: return V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY; }