diff options
author | Lucas Stach <l.stach@pengutronix.de> | 2019-07-05 19:17:23 +0200 |
---|---|---|
committer | Lucas Stach <l.stach@pengutronix.de> | 2019-08-15 10:56:03 +0200 |
commit | 4900dda90af2cb13bc1d4c12ce94b98acc8fe64e (patch) | |
tree | 780a86737440fa80ac72d6daf93e4e9216a720f1 /drivers/gpu/drm/etnaviv/etnaviv_mmu.c | |
parent | drm/etnaviv: share a single cmdbuf suballoc region across all GPUs (diff) | |
download | linux-dev-4900dda90af2cb13bc1d4c12ce94b98acc8fe64e.tar.xz linux-dev-4900dda90af2cb13bc1d4c12ce94b98acc8fe64e.zip |
drm/etnaviv: replace MMU flush marker with flush sequence
If a MMU is shared between multiple GPUs, all of them need to flush their
TLBs, so a single marker that gets reset on the first flush won't do.
Replace the flush marker with a sequence number, so that it's possible to
check if the TLB is in sync with the current page table state for each GPU.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Guido Günther <agx@sigxcpu.org>
Diffstat (limited to 'drivers/gpu/drm/etnaviv/etnaviv_mmu.c')
-rw-r--r-- | drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_mmu.c b/drivers/gpu/drm/etnaviv/etnaviv_mmu.c index 09f516093b91..bbd1624a3df8 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_mmu.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_mmu.c @@ -263,7 +263,7 @@ int etnaviv_iommu_map_gem(struct etnaviv_iommu *mmu, } list_add_tail(&mapping->mmu_node, &mmu->mappings); - mmu->need_flush = true; + mmu->flush_seq++; unlock: mutex_unlock(&mmu->lock); @@ -282,7 +282,7 @@ void etnaviv_iommu_unmap_gem(struct etnaviv_iommu *mmu, etnaviv_iommu_remove_mapping(mmu, mapping); list_del(&mapping->mmu_node); - mmu->need_flush = true; + mmu->flush_seq++; mutex_unlock(&mmu->lock); } @@ -369,7 +369,7 @@ int etnaviv_iommu_get_suballoc_va(struct etnaviv_iommu *mmu, return ret; } - mmu->need_flush = true; + mmu->flush_seq++; } list_add_tail(&mapping->mmu_node, &mmu->mappings); |