drm/shmem-helper: Switch to reservation lock
authorDmitry Osipenko <dmitry.osipenko@collabora.com>
Mon, 21 Mar 2022 00:35:41 +0000 (03:35 +0300)
committerDmitry Osipenko <dmitry.osipenko@collabora.com>
Mon, 27 Feb 2023 04:10:56 +0000 (07:10 +0300)
commit67b7836d4458790f1261e31fe0ce3250989784f0
treee3b6a5fa97ca607ab09dedf4ec74a235a7f96e39
parent67fe7487fe8946f33009c7b5a7eafec535a7826b
drm/shmem-helper: Switch to reservation lock

Replace all drm-shmem locks with a GEM reservation lock. This makes locks
consistent with dma-buf locking convention where importers are responsible
for holding reservation lock for all operations performed over dma-bufs,
preventing deadlock between dma-buf importers and exporters.

Suggested-by: Daniel Vetter <daniel@ffwll.ch>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Link: https://lore.kernel.org/all/20230108210445.3948344-8-dmitry.osipenko@collabora.com/
drivers/gpu/drm/drm_gem_shmem_helper.c
drivers/gpu/drm/lima/lima_gem.c
drivers/gpu/drm/panfrost/panfrost_drv.c
drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
drivers/gpu/drm/panfrost/panfrost_mmu.c
include/drm/drm_gem_shmem_helper.h