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>
This commit is contained in:
Lucas Stach 2016-09-15 13:06:43 +02:00
parent 12ff4bdef1
commit 7c971c62dd
1 changed files with 6 additions and 1 deletions

View File

@ -342,7 +342,12 @@ u32 etnaviv_iommu_get_cmdbuf_va(struct etnaviv_gpu *gpu,
mutex_unlock(&mmu->lock);
return 0;
}
mmu->last_iova = buf->vram_node.start + buf->size;
/*
* At least on GC3000 the FE MMU doesn't properly flush old TLB
* entries. Make sure to space the command buffers out in a way
* that the FE MMU prefetch won't load invalid entries.
*/
mmu->last_iova = buf->vram_node.start + buf->size + SZ_64K;
gpu->mmu->need_flush = true;
mutex_unlock(&mmu->lock);