]> git.baikalelectronics.ru Git - kernel.git/commit
drm/tegra: Reuse IOVA mapping where possible
authorThierry Reding <treding@nvidia.com>
Tue, 4 Feb 2020 13:59:25 +0000 (14:59 +0100)
committerThierry Reding <treding@nvidia.com>
Thu, 6 Feb 2020 17:21:55 +0000 (18:21 +0100)
commit1506822485a3586f4eee4f72ee48d1a9dea049aa
tree00894e2c40171bee6c9ad2bb0cd02bae0071bf29
parentce66247803bf3eb56673056812cc598168840a10
drm/tegra: Reuse IOVA mapping where possible

This partially reverts the DMA API support that was recently merged
because it was causing performance regressions on older Tegra devices.
Unfortunately, the cache maintenance performed by dma_map_sg() and
dma_unmap_sg() causes performance to drop by a factor of 10.

The right solution for this would be to cache mappings for buffers per
consumer device, but that's a bit involved. Instead, we simply revert to
the old behaviour of sharing IOVA mappings when we know that devices can
do so (i.e. they share the same IOMMU domain).

Cc: <stable@vger.kernel.org> # v5.5
Reported-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Tested-by: Dmitry Osipenko <digetx@gmail.com>
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
drivers/gpu/drm/tegra/gem.c
drivers/gpu/drm/tegra/plane.c
drivers/gpu/host1x/job.c