]> git.ipfire.org Git - thirdparty/linux.git/commit
dma-buf: add dma_fence_was_initialized function v2
authorChristian König <christian.koenig@amd.com>
Fri, 19 Dec 2025 10:41:54 +0000 (11:41 +0100)
committerChristian König <christian.koenig@amd.com>
Thu, 5 Feb 2026 10:02:56 +0000 (11:02 +0100)
commit2bcbc706dfa02ae50118173a6f6d8a12e735480c
tree9fcaf1eaca2d7a94cb3001e085bb5e5d26358c01
parent2bebc88d5e37ddcb5ea5039a39f39527662b27f0
dma-buf: add dma_fence_was_initialized function v2

Some driver use fence->ops to test if a fence was initialized or not.
The problem is that this utilizes internal behavior of the dma_fence
implementation.

So better abstract that into a function.

v2: use a flag instead of testing fence->ops, rename the function, move
    to the beginning of the patch set.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Link: https://lore.kernel.org/r/20260120105655.7134-2-christian.koenig@amd.com
drivers/dma-buf/dma-fence.c
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
drivers/gpu/drm/qxl/qxl_release.c
include/linux/dma-fence.h