]> git.baikalelectronics.ru Git - kernel.git/commit
drm/tegra: gem: Remove premature import restrictions
authorThierry Reding <treding@nvidia.com>
Tue, 3 Dec 2019 16:19:08 +0000 (17:19 +0100)
committerThierry Reding <treding@nvidia.com>
Wed, 4 Dec 2019 12:36:23 +0000 (13:36 +0100)
commit3773dd0adb99336f748c1ca09f965be925de3f67
tree8f12ee098efe70df2c5c9823477ef4860fff7a10
parent86023cda0c51b57ad0209b2bda93c66c362debb0
drm/tegra: gem: Remove premature import restrictions

All the display related blocks on Tegra require contiguous memory. Using
the DMA API, there is no knowing at import time which device will end up
using the buffer, so it's not known whether or not an IOMMU will be used
to map the buffer.

Move the check for non-contiguous buffers/mappings to the tegra_dc_pin()
function which is now the earliest point where it is known if a DMA BUF
can be used by the given device or not.

v2: add check for contiguous buffer/mapping in tegra_dc_pin()

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/tegra/gem.c
drivers/gpu/drm/tegra/plane.c