dma-buf: specify usage while adding fences to dma_resv obj v7
authorChristian König <christian.koenig@amd.com>
Tue, 9 Nov 2021 10:08:18 +0000 (11:08 +0100)
committerChristian König <christian.koenig@amd.com>
Thu, 7 Apr 2022 10:53:53 +0000 (12:53 +0200)
commit73511edf8b196e6f1ccda0fdf294ff57aa2dc9db
treeededfa9aaa8241cdec2f33f26150baad470feb13
parent7bc80a5462c37eab58a9ea386064307c0f447fd1
dma-buf: specify usage while adding fences to dma_resv obj v7

Instead of distingting between shared and exclusive fences specify
the fence usage while adding fences.

Rework all drivers to use this interface instead and deprecate the old one.

v2: some kerneldoc comments suggested by Daniel
v3: fix a missing case in radeon
v4: rebase on nouveau changes, fix lockdep and temporary disable warning
v5: more documentation updates
v6: separate internal dma_resv changes from this patch, avoids to
    disable warning temporary, rebase on upstream changes
v7: fix missed case in lima driver, minimize changes to i915_gem_busy_ioctl

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20220407085946.744568-3-christian.koenig@amd.com
30 files changed:
drivers/dma-buf/dma-resv.c
drivers/dma-buf/st-dma-resv.c
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c
drivers/gpu/drm/i915/gem/i915_gem_busy.c
drivers/gpu/drm/i915/gem/i915_gem_clflush.c
drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c
drivers/gpu/drm/i915/gem/selftests/i915_gem_migrate.c
drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
drivers/gpu/drm/i915/i915_vma.c
drivers/gpu/drm/i915/selftests/intel_memory_region.c
drivers/gpu/drm/lima/lima_gem.c
drivers/gpu/drm/msm/msm_gem_submit.c
drivers/gpu/drm/nouveau/nouveau_bo.c
drivers/gpu/drm/nouveau/nouveau_fence.c
drivers/gpu/drm/panfrost/panfrost_job.c
drivers/gpu/drm/qxl/qxl_release.c
drivers/gpu/drm/radeon/radeon_object.c
drivers/gpu/drm/ttm/ttm_bo.c
drivers/gpu/drm/ttm/ttm_bo_util.c
drivers/gpu/drm/ttm/ttm_execbuf_util.c
drivers/gpu/drm/v3d/v3d_gem.c
drivers/gpu/drm/vc4/vc4_gem.c
drivers/gpu/drm/vgem/vgem_fence.c
drivers/gpu/drm/virtio/virtgpu_gem.c
drivers/gpu/drm/vmwgfx/vmwgfx_bo.c
include/linux/dma-buf.h
include/linux/dma-resv.h