summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/ipu-v3
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2018-09-18 11:34:21 +0200
committerPhilipp Zabel <p.zabel@pengutronix.de>2018-11-05 14:40:08 +0100
commit815b02e3c05dcfae759a96903025beb5dab85f97 (patch)
treeba001e276a2de31e54d1993cadb28b46263fe7d4 /drivers/gpu/ipu-v3
parentf1ef14f30f058f063dfdab32d1e4b9536294e0ed (diff)
downloadlinux-815b02e3c05dcfae759a96903025beb5dab85f97.tar.bz2
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>
Diffstat (limited to 'drivers/gpu/ipu-v3')
-rw-r--r--drivers/gpu/ipu-v3/ipu-image-convert.c7
1 files changed, 1 insertions, 6 deletions
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;
}
/*