]> git.karo-electronics.de Git - karo-tx-linux.git/commit
drm/etnaviv: always flush MMU TLBs on map/unmap
authorLucas Stach <l.stach@pengutronix.de>
Tue, 17 Jan 2017 09:59:37 +0000 (10:59 +0100)
committerLucas Stach <l.stach@pengutronix.de>
Thu, 2 Feb 2017 09:30:08 +0000 (10:30 +0100)
commitd46450737c007b16bb81f9d5dea56d1f4b9a2c21
tree02810e20c2af00eaa6fc59984e5453cc7ee68bbf
parentbc179f08d26a61f11260ee7528484f317c59e6b0
drm/etnaviv: always flush MMU TLBs on map/unmap

This ensures that the GPU isn't able to write into already freed
objects, as doing this in the IOVA reaper isn't enough, as the
gem_free_object path will also cause unmaps to happen.

On MMUv2 this also ensures that stale entries, which may have
been prefetched into the TLB will be purged.

The flush is low overhead, as it gets batched up with the next
user command buffer, so this isn't incuring an overhead for
each buffer map/unmap.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
drivers/gpu/drm/etnaviv/etnaviv_mmu.c