drm/msm/iommu: optimize map/unmap
authorRob Clark <robdclark@chromium.org>
Tue, 23 Aug 2022 16:37:19 +0000 (09:37 -0700)
committerRob Clark <robdclark@chromium.org>
Sun, 28 Aug 2022 15:32:12 +0000 (08:32 -0700)
commit70bccecfcaf6c506191aed487f3cf2695fc3008c
tree03afe9b7d5ce083c90f8ac0fc3ec346b7c46f1a9
parent6d29709de8028cfd5a827d02f93a5076ba632563
drm/msm/iommu: optimize map/unmap

Using map_pages/unmap_pages cuts down on the # of pgtable walks needed
in the process of finding where to insert/remove an entry.  The end
result is ~5-10x faster than mapping a single page at a time.

v2: Rename iommu_pgsize(), drop obsolete comments, fix error handling
    in msm_iommu_pagetable_map()

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Sai Prakash Ranjan <quic_saipraka@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/498892/
Link: https://lore.kernel.org/r/20220823163719.90399-1-robdclark@gmail.com
drivers/gpu/drm/msm/msm_iommu.c