summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/ipu-v3/ipu-prg.c
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2017-11-10 17:09:59 +0100
committerPhilipp Zabel <p.zabel@pengutronix.de>2017-12-19 12:49:11 +0100
commita2ceec52d9a48bd046e5496e266dda1c57872f4b (patch)
tree4cc2831f0045786572ec927b97ede1c184faf4ba /drivers/gpu/ipu-v3/ipu-prg.c
parent2f64a554435da851a9593115b96bdc67e455047a (diff)
downloadlinux-a2ceec52d9a48bd046e5496e266dda1c57872f4b.tar.gz
linux-a2ceec52d9a48bd046e5496e266dda1c57872f4b.tar.bz2
linux-a2ceec52d9a48bd046e5496e266dda1c57872f4b.zip
gpu: ipu-v3: prg: add modifier support
Allow to pass through the modifier to the PRE unit and extend the format check with the supported modifiers. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'drivers/gpu/ipu-v3/ipu-prg.c')
-rw-r--r--drivers/gpu/ipu-v3/ipu-prg.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/gpu/ipu-v3/ipu-prg.c b/drivers/gpu/ipu-v3/ipu-prg.c
index 1a4d3a635d1d..067365c733c6 100644
--- a/drivers/gpu/ipu-v3/ipu-prg.c
+++ b/drivers/gpu/ipu-v3/ipu-prg.c
@@ -133,7 +133,14 @@ bool ipu_prg_format_supported(struct ipu_soc *ipu, uint32_t format,
if (info->num_planes != 1)
return false;
- return true;
+ switch (modifier) {
+ case DRM_FORMAT_MOD_LINEAR:
+ case DRM_FORMAT_MOD_VIVANTE_TILED:
+ case DRM_FORMAT_MOD_VIVANTE_SUPER_TILED:
+ return true;
+ default:
+ return false;
+ }
}
EXPORT_SYMBOL_GPL(ipu_prg_format_supported);
@@ -266,7 +273,7 @@ EXPORT_SYMBOL_GPL(ipu_prg_channel_disable);
int ipu_prg_channel_configure(struct ipuv3_channel *ipu_chan,
unsigned int axi_id, unsigned int width,
unsigned int height, unsigned int stride,
- u32 format, unsigned long *eba)
+ u32 format, uint64_t modifier, unsigned long *eba)
{
int prg_chan = ipu_prg_ipu_to_prg_chan(ipu_chan->num);
struct ipu_prg *prg = ipu_chan->ipu->prg_priv;
@@ -287,7 +294,7 @@ int ipu_prg_channel_configure(struct ipuv3_channel *ipu_chan,
return ret;
ipu_pre_configure(prg->pres[chan->used_pre],
- width, height, stride, format, 0, *eba);
+ width, height, stride, format, modifier, *eba);
pm_runtime_get_sync(prg->dev);