drm/tegra: gem: Properly pin imported buffers
authorThierry Reding <treding@nvidia.com>
Tue, 3 Dec 2019 16:19:07 +0000 (17:19 +0100)
committerThierry Reding <treding@nvidia.com>
Wed, 4 Dec 2019 12:35:53 +0000 (13:35 +0100)
commit1f16deac766926f1f59a7c038e939b09ef8edfc8
treec8a3017cdc86bde138dd6aea865cf4b70fee3a18
parent9569c3e9227c03e2b5eb341676e46b0bcbbeaa01
drm/tegra: gem: Properly pin imported buffers

Buffers that are imported from a DMA-BUF don't have pages allocated with
them. At the same time an SG table for them can't be derived using the
DMA API helpers because the necessary information doesn't exist. However
there's already an SG table that was created during import, so this can
simply be duplicated.

Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/tegra/gem.c