OSDN Git Service

dma-buf: add DMA_RESV_USAGE_KERNEL v3
authorChristian König <christian.koenig@amd.com>
Fri, 26 Nov 2021 13:12:42 +0000 (14:12 +0100)
committerChristian König <christian.koenig@amd.com>
Thu, 7 Apr 2022 10:53:54 +0000 (12:53 +0200)
commitb29895e18304feb7e8afc6388db7ece60327b23c
tree655d830be03f3088f5f5293372a49d592dbd533c
parent047a1b877ed48098bed71fcfb1d4891e1b54441d
dma-buf: add DMA_RESV_USAGE_KERNEL v3

Add an usage for kernel submissions. Waiting for those are mandatory for
dynamic DMA-bufs.

As a precaution this patch also changes all occurrences where fences are
added as part of memory management in TTM, VMWGFX and i915 to use the
new value because it now becomes possible for drivers to ignore fences
with the WRITE usage.

v2: use "must" in documentation, fix whitespaces
v3: separate out some driver changes and better document why some
    changes should still be part of this patch.

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-5-christian.koenig@amd.com
drivers/dma-buf/dma-resv.c
drivers/dma-buf/st-dma-resv.c
drivers/gpu/drm/i915/gem/i915_gem_clflush.c
drivers/gpu/drm/ttm/ttm_bo.c
drivers/gpu/drm/ttm/ttm_bo_util.c
drivers/gpu/drm/vmwgfx/vmwgfx_bo.c
include/linux/dma-resv.h