diff options
author | Thierry Reding <treding@nvidia.com> | 2019-12-03 19:19:08 +0300 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2019-12-04 15:36:23 +0300 |
commit | 49f821919bb9d45de7f1cde6072de01d36235b5d (patch) | |
tree | 8f12ee098efe70df2c5c9823477ef4860fff7a10 /drivers/gpu/drm/tegra/gem.c | |
parent | 1f16deac766926f1f59a7c038e939b09ef8edfc8 (diff) | |
download | linux-49f821919bb9d45de7f1cde6072de01d36235b5d.tar.xz |
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>
Diffstat (limited to 'drivers/gpu/drm/tegra/gem.c')
-rw-r--r-- | drivers/gpu/drm/tegra/gem.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/gpu/drm/tegra/gem.c b/drivers/gpu/drm/tegra/gem.c index 6dfad56eee2b..bc15b430156d 100644 --- a/drivers/gpu/drm/tegra/gem.c +++ b/drivers/gpu/drm/tegra/gem.c @@ -440,13 +440,6 @@ static struct tegra_bo *tegra_bo_import(struct drm_device *drm, err = tegra_bo_iommu_map(tegra, bo); if (err < 0) goto detach; - } else { - if (bo->sgt->nents > 1) { - err = -EINVAL; - goto detach; - } - - bo->iova = sg_dma_address(bo->sgt->sgl); } bo->gem.import_attach = attach; |