All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: linux-media@vger.kernel.org, Steve Longerbeam <slongerbeam@gmail.com>
Cc: Nicolas Dufresne <nicolas@ndufresne.ca>, kernel@pengutronix.de
Subject: [PATCH v3 16/16] gpu: ipu-v3: image-convert: allow three rows or columns
Date: Tue, 18 Sep 2018 11:34:21 +0200	[thread overview]
Message-ID: <20180918093421.12930-17-p.zabel@pengutronix.de> (raw)
In-Reply-To: <20180918093421.12930-1-p.zabel@pengutronix.de>

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>
---
New since v2.
---
 drivers/gpu/ipu-v3/ipu-image-convert.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/gpu/ipu-v3/ipu-image-convert.c b/drivers/gpu/ipu-v3/ipu-image-convert.c
index 6ab880416919..5bce03b73502 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;
 }
 
 /*
-- 
2.19.0

  parent reply	other threads:[~2018-09-18 15:06 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-18  9:34 [PATCH v3 00/16] i.MX media mem2mem scaler Philipp Zabel
2018-09-18  9:34 ` [PATCH v3 01/16] media: imx: add mem2mem device Philipp Zabel
2018-10-18 22:53   ` Tim Harvey
2018-10-19  9:53     ` Philipp Zabel
2018-10-19 20:19       ` Steve Longerbeam
2018-10-19 23:54         ` Tim Harvey
2018-10-21 17:43         ` Philipp Zabel
2018-10-23 23:23           ` Steve Longerbeam
2018-09-18  9:34 ` [PATCH v3 02/16] gpu: ipu-cpmem: add WARN_ON_ONCE() for unaligned dma buffers Philipp Zabel
2018-09-18  9:34 ` [PATCH v3 03/16] gpu: ipu-v3: ipu-ic: allow to manually set resize coefficients Philipp Zabel
2018-09-18  9:34 ` [PATCH v3 04/16] gpu: ipu-v3: image-convert: prepare for per-tile configuration Philipp Zabel
2018-09-18  9:34 ` [PATCH v3 05/16] gpu: ipu-v3: image-convert: calculate per-tile resize coefficients Philipp Zabel
2018-09-18  9:34 ` [PATCH v3 06/16] gpu: ipu-v3: image-convert: reconfigure IC per tile Philipp Zabel
2018-09-18  9:34 ` [PATCH v3 07/16] gpu: ipu-v3: image-convert: store tile top/left position Philipp Zabel
2018-09-18  9:34 ` [PATCH v3 08/16] gpu: ipu-v3: image-convert: calculate tile dimensions and offsets outside fill_image Philipp Zabel
2018-09-18  9:34 ` [PATCH v3 09/16] gpu: ipu-v3: image-convert: move tile alignment helpers Philipp Zabel
2018-09-18  9:34 ` [PATCH v3 10/16] gpu: ipu-v3: image-convert: select optimal seam positions Philipp Zabel
2018-10-13  0:33   ` Steve Longerbeam
2018-10-17 11:10     ` Philipp Zabel
2018-10-17 23:44       ` Steve Longerbeam
2018-09-18  9:34 ` [PATCH v3 11/16] gpu: ipu-v3: image-convert: fix debug output for varying tile sizes Philipp Zabel
2018-09-18  9:34 ` [PATCH v3 12/16] gpu: ipu-v3: image-convert: relax alignment restrictions Philipp Zabel
2018-09-18  9:34 ` [PATCH v3 13/16] gpu: ipu-v3: image-convert: fix bytesperline adjustment Philipp Zabel
2018-09-18  9:34 ` [PATCH v3 14/16] gpu: ipu-v3: image-convert: add some ASCII art to the exposition Philipp Zabel
2018-09-18  9:34 ` [PATCH v3 15/16] gpu: ipu-v3: image-convert: disable double buffering if necessary Philipp Zabel
2018-09-18  9:34 ` Philipp Zabel [this message]
2018-10-13  0:29 ` [PATCH v3 00/16] i.MX media mem2mem scaler Steve Longerbeam
2018-10-17 23:46   ` Steve Longerbeam
2018-10-19 12:18     ` Philipp Zabel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180918093421.12930-17-p.zabel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=kernel@pengutronix.de \
    --cc=linux-media@vger.kernel.org \
    --cc=nicolas@ndufresne.ca \
    --cc=slongerbeam@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.