]> git.baikalelectronics.ru Git - kernel.git/commit
dma-buf: add dma_resv_replace_fences v2
authorChristian König <christian.koenig@amd.com>
Fri, 24 Sep 2021 08:55:45 +0000 (10:55 +0200)
committerChristian König <christian.koenig@amd.com>
Thu, 24 Mar 2022 11:02:26 +0000 (12:02 +0100)
commit752d5859860b68512c4f05015a70dfc5f6de8ff1
tree7901fc8bff98ceb6edf8381b7ba39533b58d9b37
parent5da7439dfb2c22757342defc800795afbc4e1ed8
dma-buf: add dma_resv_replace_fences v2

This function allows to replace fences from the shared fence list when
we can gurantee that the operation represented by the original fence has
finished or no accesses to the resources protected by the dma_resv
object any more when the new fence finishes.

Then use this function in the amdkfd code when BOs are unmapped from the
process.

v2: add an example when this is usefull.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20220321135856.1331-1-christian.koenig@amd.com
drivers/dma-buf/dma-resv.c
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
include/linux/dma-resv.h