]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
drm/shmem-helpers: Ensure get_pages is not called on imported dma-buf
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 11 May 2020 09:35:53 +0000 (11:35 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 8 Jun 2020 15:03:41 +0000 (17:03 +0200)
commit5264083573184aba8a0e760f6ebb902326e40162
treefdd2da7af9f724e464b9d6012f039955709bc497
parent6e60d5ded06baa69cca0b6337053c99b54211624
drm/shmem-helpers: Ensure get_pages is not called on imported dma-buf

Just a bit of light paranoia. Also sprinkle this check over
drm_gem_shmem_get_sg_table, which should only be called when
exporting, same for the pin/unpin functions, on which it relies to
work correctly.

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