Message ID | 20181019121539.12778-23-p.zabel@pengutronix.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-media-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6E08B3B73 for <patchwork-linux-media@patchwork.kernel.org>; Fri, 19 Oct 2018 12:15:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5E35328AB2 for <patchwork-linux-media@patchwork.kernel.org>; Fri, 19 Oct 2018 12:15:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 52F2828AB7; Fri, 19 Oct 2018 12:15:53 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0C5BA28AB2 for <patchwork-linux-media@patchwork.kernel.org>; Fri, 19 Oct 2018 12:15:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727653AbeJSUVl (ORCPT <rfc822;patchwork-linux-media@patchwork.kernel.org>); Fri, 19 Oct 2018 16:21:41 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:47595 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727627AbeJSUVg (ORCPT <rfc822;linux-media@vger.kernel.org>); Fri, 19 Oct 2018 16:21:36 -0400 Received: from lupine.hi.pengutronix.de ([2001:67c:670:100:3ad5:47ff:feaf:1a17] helo=lupine.pengutronix.de.) by metis.ext.pengutronix.de with esmtp (Exim 4.89) (envelope-from <p.zabel@pengutronix.de>) id 1gDTgt-0007Oc-Po; Fri, 19 Oct 2018 14:15:43 +0200 From: Philipp Zabel <p.zabel@pengutronix.de> To: linux-media@vger.kernel.org, Steve Longerbeam <slongerbeam@gmail.com> Cc: Nicolas Dufresne <nicolas@ndufresne.ca>, Tim Harvey <tharvey@gateworks.com>, kernel@pengutronix.de Subject: [PATCH v4 22/22] gpu: ipu-v3: image-convert: allow three rows or columns Date: Fri, 19 Oct 2018 14:15:39 +0200 Message-Id: <20181019121539.12778-23-p.zabel@pengutronix.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181019121539.12778-1-p.zabel@pengutronix.de> References: <20181019121539.12778-1-p.zabel@pengutronix.de> X-SA-Exim-Connect-IP: 2001:67c:670:100:3ad5:47ff:feaf:1a17 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-media@vger.kernel.org Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
i.MX media mem2mem scaler
|
expand
|
diff --git a/drivers/gpu/ipu-v3/ipu-image-convert.c b/drivers/gpu/ipu-v3/ipu-image-convert.c index 3e73494d5930..13103ab86050 100644 --- a/drivers/gpu/ipu-v3/ipu-image-convert.c +++ b/drivers/gpu/ipu-v3/ipu-image-convert.c @@ -379,12 +379,7 @@ static int alloc_dma_buf(struct ipu_image_convert_priv *priv, static inline int num_stripes(int dim) { - if (dim <= 1024) - return 1; - else if (dim <= 2048) - return 2; - else - return 4; + return (dim - 1) / 1024 + 1; } /*
If width or height are in the [2049, 3072] range, allow to use just three tiles in this dimension, instead of four. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> --- No changes since v3. --- drivers/gpu/ipu-v3/ipu-image-convert.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)