aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2016-09-15 07:06:43 -0400
committerLucas Stach <l.stach@pengutronix.de>2016-09-15 09:29:44 -0400
commit7c971c62dd543a323a0cabc0c559caea1759f59f (patch)
treefb8404e76bfc26d4c3abf762066d7407686897bf /drivers/gpu
parent12ff4bdef1a015945e4b19ed80dd9e50626cd3bc (diff)
drm/etnaviv: space out IOVA layout for cmdbufs on MMUv2
At least on the GC3000 the FE MMU is not properly flushing stale TLB entries. Make sure to map the cmdbufs with a big enough spacing in the IOVAs to not hit old/prefetched TLB entries when jumping to a newly mapped cmdbuf. Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/etnaviv/etnaviv_mmu.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_mmu.c b/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
index 304c0b4a9d58..d3796ed8d8c5 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
@@ -342,7 +342,12 @@ u32 etnaviv_iommu_get_cmdbuf_va(struct etnaviv_gpu *gpu,
342 mutex_unlock(&mmu->lock); 342 mutex_unlock(&mmu->lock);
343 return 0; 343 return 0;
344 } 344 }
345 mmu->last_iova = buf->vram_node.start + buf->size; 345 /*
346 * At least on GC3000 the FE MMU doesn't properly flush old TLB
347 * entries. Make sure to space the command buffers out in a way
348 * that the FE MMU prefetch won't load invalid entries.
349 */
350 mmu->last_iova = buf->vram_node.start + buf->size + SZ_64K;
346 gpu->mmu->need_flush = true; 351 gpu->mmu->need_flush = true;
347 mutex_unlock(&mmu->lock); 352 mutex_unlock(&mmu->lock);
348 353