]> 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)
commit369a206fc838a2f2bd7889a428bfc569d5245c07
tree8f12ee098efe70df2c5c9823477ef4860fff7a10
parent45631bb5b8ec0698b6b347a0efb39e7a968a73a3
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