gpu: ipu-v3: image-convert: allow three rows or columns

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>
Acked-by: Steve Longerbeam <slongerbeam@gmail.com>
Tested-by: Steve Longerbeam <slongerbeam@gmail.com>
This commit is contained in:
Philipp Zabel 2018-09-18 11:34:21 +02:00
parent f1ef14f30f
commit 815b02e3c0

View File

@ -379,12 +379,7 @@ static int alloc_dma_buf(struct ipu_image_convert_priv *priv,
static inline int num_stripes(int dim) static inline int num_stripes(int dim)
{ {
if (dim <= 1024) return (dim - 1) / 1024 + 1;
return 1;
else if (dim <= 2048)
return 2;
else
return 4;
} }
/* /*