drm/etnaviv: mmuv2: allocate 2nd level page tables on demand
authorLucas Stach <l.stach@pengutronix.de>
Tue, 17 Apr 2018 10:15:13 +0000 (12:15 +0200)
committerLucas Stach <l.stach@pengutronix.de>
Fri, 18 May 2018 13:27:56 +0000 (15:27 +0200)
commita1fb6f204f956cc8385c31600354e2039978ebb4
treedfaab8a4f571be43139ec9f3a26a90f3e4345395
parent1af998b27c6c63d43c491783144ad0310d13a747
drm/etnaviv: mmuv2: allocate 2nd level page tables on demand

With etnaviv not being tied into the IOMMU framework anymore, the MMU
functions will only be called under sleeping locks. Thus we are able
to allocate the memory for the 2nd level page tables on demand without
having to deal with memory allocation in atomic context.

This speeds up driver intitialization on MMUv2 GPU cores, as we don't
need to preallocate all the page table memory and also reduces memory
consumption for most workloads, as most of them won't use the full
GPU virtual address space.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
drivers/gpu/drm/etnaviv/etnaviv_iommu_v2.c