drm/shmem-helpers: Don't call get/put_pages on imported dma-buf in vmap
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 14 May 2020 20:22:56 +0000 (22:22 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 3 Jun 2020 13:06:38 +0000 (15:06 +0200)
commit0cc5fb4e87216320e5bc42603f735d666e101e43
tree3bc79bb0e06bbded5ff3b0fb1e8e8e126bd58062
parent3a5a5971bc1fe34a9a24b59118db0b3a1f9c2902
drm/shmem-helpers: Don't call get/put_pages on imported dma-buf in vmap

There's no direct harm, because for the shmem helpers these are noops
on imported buffers. The trouble is in the locks these take - I want
to change dma_buf_vmap locking, and so need to make sure that we only
ever take certain locks on one side of the dma-buf interface: Either
for exporters, or for importers.

v2: Change the control flow less compared to what's there (Thomas)

Tested-by: Boris Brezillon <boris.brezillon@collabora.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Noralf Trønnes <noralf@tronnes.org>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200514202256.490926-1-daniel.vetter@ffwll.ch
drivers/gpu/drm/drm_gem_shmem_helper.c