From patchwork Tue Mar 25 20:53:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Dufresne X-Patchwork-Id: 3890591 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 85ACB9F2B6 for ; Tue, 25 Mar 2014 20:53:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C2094201EC for ; Tue, 25 Mar 2014 20:53:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 30279201BA for ; Tue, 25 Mar 2014 20:53:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755010AbaCYUxh (ORCPT ); Tue, 25 Mar 2014 16:53:37 -0400 Received: from bhuna.collabora.co.uk ([93.93.135.160]:34258 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754472AbaCYUxh (ORCPT ); Tue, 25 Mar 2014 16:53:37 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: nicolas) with ESMTPSA id B12C7600992 Message-ID: <1395780812.11851.20.camel@nicolas-tpx230> Subject: [PATCH 5/5] s5p-fimc: Reuse calculated sizes From: Nicolas Dufresne Reply-To: Nicolas Dufresne To: LMML Cc: s.nawrocki@samsung.com Date: Tue, 25 Mar 2014 16:53:32 -0400 In-Reply-To: <1395780301.11851.14.camel@nicolas-tpx230> References: <1395780301.11851.14.camel@nicolas-tpx230> Organization: Collabora Ltd. X-Mailer: Evolution 3.10.4 (3.10.4-2.fc20) Mime-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_TVD_MIME_EPI, UNPARSEABLE_RELAY autolearn=ham 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 This formula did not take into account the required tiled alignement for NV12MT format. As this was already computed an stored in payload array initially, reuse that value. Signed-off-by: Nicolas Dufresne --- drivers/media/platform/exynos4-is/fimc-m2m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/exynos4-is/fimc-m2m.c b/drivers/media/platform/exynos4-is/fimc-m2m.c index 07b8f97..c648e5f 100644 --- a/drivers/media/platform/exynos4-is/fimc-m2m.c +++ b/drivers/media/platform/exynos4-is/fimc-m2m.c @@ -197,7 +197,7 @@ static int fimc_queue_setup(struct vb2_queue *vq, const struct v4l2_format *fmt, *num_planes = f->fmt->memplanes; for (i = 0; i < f->fmt->memplanes; i++) { - sizes[i] = (f->f_width * f->f_height * f->fmt->depth[i]) / 8; + sizes[i] = f->payload[i]; allocators[i] = ctx->fimc_dev->alloc_ctx; } return 0;