From: Philipp Zabel Date: Tue, 18 Sep 2018 09:34:21 +0000 (+0200) Subject: gpu: ipu-v3: image-convert: allow three rows or columns X-Git-Tag: v5.4-rc1~1841^2~15^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=815b02e3c05dcfae759a96903025beb5dab85f97;p=platform%2Fkernel%2Flinux-rpi.git 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 Acked-by: Steve Longerbeam Tested-by: Steve Longerbeam --- diff --git a/drivers/gpu/ipu-v3/ipu-image-convert.c b/drivers/gpu/ipu-v3/ipu-image-convert.c index 3e73494..13103ab 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; } /*