]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/etnaviv: only check if the cmdbuf is inside the linear window on MMUv1
authorLucas Stach <l.stach@pengutronix.de>
Wed, 17 Aug 2016 14:19:53 +0000 (16:19 +0200)
committerLucas Stach <l.stach@pengutronix.de>
Thu, 15 Sep 2016 13:29:33 +0000 (15:29 +0200)
There is no linear window on MMUv2 and the FE can access the full 4GB
address space either directly (as long as the MMU isn't configured) or
through the MMU, once it is up.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
drivers/gpu/drm/etnaviv/etnaviv_gpu.c

index 5dab777e57d04fe70a0eb8a99f9f96fd18349644..deb1d0c192dccf046ebf11052f8122f1cdb86fe7 100644 (file)
@@ -678,7 +678,9 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu)
                dev_err(gpu->dev, "could not create command buffer\n");
                goto destroy_iommu;
        }
-       if (gpu->buffer->paddr - gpu->memory_base > 0x80000000) {
+
+       if (gpu->mmu->version == ETNAVIV_IOMMU_V1 &&
+           gpu->buffer->paddr - gpu->memory_base > 0x80000000) {
                ret = -EINVAL;
                dev_err(gpu->dev,
                        "command buffer outside valid memory window\n");