diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2018-09-18 11:34:21 +0200 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2018-11-05 14:40:08 +0100 |
commit | 815b02e3c05dcfae759a96903025beb5dab85f97 (patch) | |
tree | ba001e276a2de31e54d1993cadb28b46263fe7d4 /drivers/gpu/ipu-v3 | |
parent | f1ef14f30f058f063dfdab32d1e4b9536294e0ed (diff) | |
download | linux-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.c | 7 |
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; } /* |