summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2016-08-17 17:15:25 +0300
committerLucas Stach <l.stach@pengutronix.de>2016-09-15 16:29:32 +0300
commit1486b1cb80cb8676d573a27ced5423658fdd32de (patch)
tree71f4116acca92ed1ea13036d7392d6cb98cc3c97 /drivers/gpu/drm/etnaviv/etnaviv_mmu.c
parent9c7310c05d9e6a8d12717ced20ac62f0e4a696aa (diff)
downloadlinux-1486b1cb80cb8676d573a27ced5423658fdd32de.tar.xz
drm/etnaviv: only try to use the linear window on MMUv1
As the comment above the code states, the linear window is only available on MMUv1. Don't try to use it on MMUv2. Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Diffstat (limited to 'drivers/gpu/drm/etnaviv/etnaviv_mmu.c')
-rw-r--r--drivers/gpu/drm/etnaviv/etnaviv_mmu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_mmu.c b/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
index 29a723fabc17..e2013b5b3f6a 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
@@ -115,7 +115,8 @@ int etnaviv_iommu_map_gem(struct etnaviv_iommu *mmu,
mutex_lock(&mmu->lock);
/* v1 MMU can optimize single entry (contiguous) scatterlists */
- if (sgt->nents == 1 && !(etnaviv_obj->flags & ETNA_BO_FORCE_MMU)) {
+ if (mmu->version == ETNAVIV_IOMMU_V1 &&
+ sgt->nents == 1 && !(etnaviv_obj->flags & ETNA_BO_FORCE_MMU)) {
u32 iova;
iova = sg_dma_address(sgt->sgl) - memory_base;