]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
dma-buf/dma-fence: Add dma_fence_test_signaled_flag()
authorPhilipp Stanner <phasta@kernel.org>
Mon, 1 Dec 2025 10:50:05 +0000 (11:50 +0100)
committerPhilipp Stanner <phasta@kernel.org>
Thu, 4 Dec 2025 14:03:39 +0000 (15:03 +0100)
commite58b4dea9054c85688c8f639ebdfc8115261dae2
treefc8551ccf8d59f2399318c90f8c35cfe9035d859
parent2976aeb0de77da599ad37691963efbdcb07435ce
dma-buf/dma-fence: Add dma_fence_test_signaled_flag()

The dma_fence framework checks at many places whether the signaled flag
of a fence is already set. The code can be simplified and made more
readable by providing a helper function for that.

Add dma_fence_test_signaled_flag(), which only checks whether a fence is
signaled. Use it internally.

Suggested-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://patch.msgid.link/20251201105011.19386-3-phasta@kernel.org
drivers/dma-buf/dma-fence.c
include/linux/dma-fence.h